??? 07/14/08 17:20 Modified: 07/14/08 17:24 Read: times |
#156702 - setting TMOD Responding to: ???'s previous message |
That line existed on the listing
and as it is stated inteferes with Timer1, should not write anything to upper nibble. TMOD = 0x09; // timer 0 mode 1 valid should be for Timer0 mode1 TMOD |= 0x01; // Set Timer0 to mode1 16bit you may decide what the desired mode of Timer0 is and set it to, without alter the settings of Timer1. BTW what is the clock XTAL of the system? to achive 2400 baud rate using Timer1 at serial port with reload value -26 these are the combinations: XTAL / CLKREG.0 /PCON.7(SMOD0) / UART SPEED = THx RELOAD VALUE 12MHz 0=x1 12 1=x2 16 2400 -26 12MHz 1=x2 6 0=x1 32 2400 -26 24MHz 0=x1 12 0=x1 32 2400 -26 K.L.Angelis |