??? 08/10/06 12:15 Read: times |
#121955 - did you not read Responding to: ???'s previous message |
Refering to 89LPC9xx usermanual, the clock used for timer is PCLK which is 7.xxMhz/2 (CCLK/2). Hence, i thought the timer reload value should be calculated this way:
(65535-x)(1/3.xxM) = 1/3.xxM => x = 65534 => TH0 = 0xff, TL0 = 0xfe I think the above formula is incorrect since the output doesn't create a clock pulse of 3.xxMhz/2. did you not read there is no way you can do that. entering an ISR usually takes 4 cycles (maybe in the LPC only 2 - look it up) and the return takes - again look it up - cycles. Thus it is patently impossible to create anything 1/2 oscillator by using an interrupt. it's bible time as jan suggetsted get familiar with mode 2. Erik |