??? 01/25/05 18:59 Read: times |
#85774 - Null Modem Responding to: ???'s previous message |
Hi again Nguyen,
I would advise you that you are going to need a null modem cable to connect your board to a PC. In other words, the T1 OUT pin on your MAX232 will need to connect to the Rx Data pin on your PC serial port. The Tx Data pin on your PC serial port must connect to the R1 IN pin on your MAX232. It is not an uncommon mistake for people to connect R to R and T to T, as though they were connecting red to red and green to green. While we're on the subject, the Tx pin on your µ-controller should connect to the T1 IN pin on your MAX232, and the Rx pin on your µ-controller should connect to the R1 OUT pin of your MAX232. Stated differently, the T(ransmitters) on your MAX232 converts the 0V to 5V signal from your µ-controller to the ±12V levels of RS232. The R(eceivers) on your MAX232 convert ±12V back to 0V - 5V logic. Finally, you will only need three lines between your µ-controller board and your PC. The two I just described which transmit data from the board to the PC and from the PC back to the board, and a third one for GND. This is a point of confusion for many because there are 9 pins (or 25 pins) on a standard serial port. The serial port definition includes a bunch of pins dedicated to "handshaking" signals. These are signals that let the PC and peripheral device (a µ-controller board in your case) coordinate communications so they don't trample on each other's signals. But you are using a UART. A Univeral Asynchronous Receiver Transmitter. It's asynchronous. It doesn't matter if they both transmit at the same time. Both ends have dedicated transmitting and receiving buffers. All you need to do is configure the built-in UART (baud rate, data bits, stop bit, parity bit), and you're good to go. If any or all of this was too elementary, then please forgive me. It's just that these are very common points of confusion and mistake for people doing this for the first time. Now for two final bits of advise. Use the navigation menu on the left side of this screen to find the tutorials and read them. Read all of them, especially the part about using the UART and serial communication. Then, do a search of this forum for the word "Bible." You will find a boatload of posts wherein Erik Malund has provided a set of three links to the "Bible" from Philips. Download and read all three parts. Those downloads and these tutorials are more than worth the time and effort to read before you do any design work. Good luck, Joe |
Topic | Author | Date |
Connect PC to AT89C52 | 01/01/70 00:00 | |
RS232 Signals | 01/01/70 00:00 | |
to Joe | 01/01/70 00:00 | |
Null Modem | 01/01/70 00:00 | |
To Joe again | 01/01/70 00:00 | |
how have you wired the MAX232 up? | 01/01/70 00:00 | |
Fundamentals of RS-232 Serial Comms | 01/01/70 00:00 | |
App note | 01/01/70 00:00 | |
Try this | 01/01/70 00:00 | |
link![]() | 01/01/70 00:00 |