mauricio fernandez montoya

(MC68HC908JK1) TIM module configuration Question

Discussion created by mauricio fernandez montoya on Jan 9, 2008
Latest reply on Jan 10, 2008 by mauricio fernandez montoya
i need some help with the configuration of this module (TIM) on the MC68HC908JK1 microcontroller

with a crystal of 4.9152 Mhz i need a PWM signal of this characteristics:

40Khz frecuency
10% of Duty (high time)

maybe this could be the code:

void Init_PWM(void){
    TSC  = 0x30;  
    TMOD = 123;                       
    TCH0 = 12; 
    TSC0 = 0x1A;                   
    TSC  = 0x00;                

i'm all right???

please help me