??? 12/06/08 11:36 Read: times |
#160665 - UART and PC hyper terminal Responding to: ???'s previous message |
It seems to me that hardware to PC is OK. I would like recommend:
1. For correct baudrate If you have a small PC program, BPS calculation would be more easy. I have one this PC software but in Chinese. If you need it, I would like to give it to you anyway. For a 22.1184M Xtal, the generated proto-type code for 9600bps is #include "reg51.h" void initUart(void) { TMOD|=0x20; SCON=0x50; TH1=0xfa; TL1=0xfa; TR1=1; } void main(void) { initUart(); //EA=1; } 2. Perhaps you have to use sprintf to convert data to ASCII since Hyper Terminal shows ASCII code. Say, n=sprintf(tbuffer,"%04d", (int)tsum); 3. If you could say more specific, then I could say more about UART. J.S. |
Topic | Author | Date |
about serial communication problem | 01/01/70 00:00 | |
be more specific | 01/01/70 00:00 | |
check baudrate | 01/01/70 00:00 | |
Loopback? | 01/01/70 00:00 | |
more specified | 01/01/70 00:00 | |
Just Exactly what do you mean by "not working"? | 01/01/70 00:00 | |
SIO init possibly wrong | 01/01/70 00:00 | |
UART and PC hyper terminal![]() | 01/01/70 00:00 |