Datasheet

EVAL-ADM8843 Preliminary Technical Data
14 REV. PrC 02/05
WRITING TO THE ADuC832
To program the ADuC832 PWM generator, five 8 bit words are written to the ADuC832 using the SPI interface.
1: PWM Frequency Low Bit
2: PWM Frequency High Bit
3: PWM Duty Low Bit
4: PWM Duty High Bit
5: PWM Mode
The ADuC832 takes a 16.777612MHz clock and divides this down by a 16 bit divisor
(PWM Frequency High Bit & PWM Frequency Low Bit)
This gives the PWM Frequency
The Duty Cycle 16 bit value is = (PWM Frequency High Bit & PWM Frequency Low Bit) * duty cycle
The PWM mode sets the PWMCON SFR
For example: 100 kHz and 80 % Duty Cycle
Frequency Divisor: 16.777612 MHz/ 100kHz = 167.77612 => 168
Duty Cycle: 168 * 0.80 = 134.4 => 134
1: PWM Frequency Low Bit = 10101000
2: PWM Frequency High Bit = 00000000
3: PWM Duty Low Bit = 10000110
4: PWM Duty High Bit = 00000000
5: PWM Mode = 10011
For example: 100Hz and 60 % Duty Cycle
Frequency Divisor: 32 kHz/ 100Hz = 320
Duty Cycle: 320 * 0.60 = 134.4 => 192
1: PWM Frequency Low Bit = 01000000
2: PWM Frequency High Bit = 00000001
3: PWM Duty Low Bit = 11000000
4: PWM Duty High Bit = 00000000
5: PWM Mode = 10001
The details of the ADuC832 can be found at:
http://products.analog.com/products/info.asp?product=ADuC832