??? 08/24/06 20:09 Read: times |
#122950 - Simple UART question |
Hi everyone,
Device: AT89s8252, Compiler: Keil uVision CODE: <pre> #include <reg52.h> <pre> #include <stdio.h> <pre> void main (void) <pre> { <pre> /* <pre> SCON = 0x50; <pre> TMOD |= 0x22; <pre> TH1 = 0xf5; <pre> TR1 = 1; <pre> TI = 1; <pre> */ <pre> <pre> SCON = 0x50; <pre> T2CON= 0x34; <pre> TH2=0xFe; <pre> TL2=0xa5; <pre> RCAP2H=0xfe; <pre> RCAP2L=0xa5; <pre> TR2 = 1; <pre> while(1) putchar("A"); <pre> } So, using timer1 as baud rate generator forks fine, but when i switch to timer2 (settings are from Atmel example code, seem to be OK) nothing appears on Tx pin? Thanks! |
Topic | Author | Date |
Simple UART question | 01/01/70 00:00 | |
whre is T2MOD? | 01/01/70 00:00 | |
not T2MOD, but solved | 01/01/70 00:00 | |
With a reply like that...![]() | 01/01/70 00:00 |