Pond Electronics - Home of the µFlash876 & µFlash876B embedded controllers, µStack & µConnect Bus.

PWM Modulation

Support for three 8 bit PWM channels on the uCore. These PWM functions use the H8/3664 Timer W to generate PWM signals.

init_pwm

void init_pwm(BYTE mode);

Sets up the the H8/3664 Timer W for 8 bit PWM generation on pins P82,P83 and P84.The mode parameter represents the base frequency of the PWM signal generated. The following modes are available:

    PWM_DIV0    // ~62.8KHz
    PWM_DIV2    // ~31.4Khz
    PWM_DIV4    // ~15.7KHz
    PWM_DIV8    // ~7.85KHz

Note that no pwm signal is actually generated until the value is set using a pwmn(val) function call.

pwm0

void pwm0(BYTE x);

Sets PWM channel 0 to generate a PWM signal of value x at the frequency set by init_pwm().

pwm1

void pwm1(BYTE x);

Sets PWM channel 1 to generate a PWM signal of value x at the frequency set by init_pwm().

pwm2

void pwm2(BYTE x);

Sets PWM channel 2 to generate a PWM signal of value x at the frequency set by init_pwm().


Home | Products | Technical Info | How to Order | Contact Us | Links