This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Serial and timer seem conflict

void enable_timer(void)
{
TH0=0x01;
TL0=0x01;
TMOD = (TMOD & 0xF0) | 0x01;
ET0 = 1;
TR0 = 1;
EA = 1;
}

void serial_init(void)
{
PCON |= 0x80;
SCON = 0x52;
TMOD |= 0x20;
TH1 = 0xF3;
TR1 = 1;
ES = 1;
// PS = 1;
EA = 1;
}

I don't know why when i use 2 subs to initialize serial port and timer 0 but i don't know why timer 0 runs so slowly.Could anyone can tell me the reason why and show me the solution?Please answer me soon because I need it

0