Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/20/02 07:48
Read: times


 
#34765 - RE: 8051 serial port basics
Pramod kumar wrote:
-------------------------------
I connect pin 10 and 11 of the AT89c51 to pin 9 and 10 of a max 232.Pin 3 and 2 of max232 to the com port of the PC.
-------------------------------
Hello Pramod,
Have you checked the circuit diagram of MAX 232?? You should not connect Pin 3 and 2 of MAX232 to PC. You should connect in the following manner...
Pin P3.0 (pin 10 of 40-pin DIP) and P3.1 should be connected to Pin 12 and 11 respectively of MAX 232. And, Pin 11 and 12 of MAX 232 (DIP) should be connected to Pin 2 and 3 of the DB-9 connector (provided you are using a NULL-modem cable for connecting your PC or else you should invert the connection).

Then, when you want to switch on the LED (for which again you use an inverter and a resistor, not absolutely required but a good practise) you do it in the following manner.

Point your Serial Interrupt Routine to a function, which will receive the input from the serial port and compare it with the characters 'O','N' & 'F'. If you find 'O' and 'N' have come in succession thenyou can switch on the LED and when you receive 'O' 'F' and 'F' in succession then you turn the LED off.

Hope you got what Im trying to explain. If you need further clarification (Not your homework/assignment done by me ofcourse) just let me know.

Regards,
Sriharsha

List of 8 messages in thread
TopicAuthorDate
8051 serial port basics            01/01/70 00:00      
RE: 8051 serial port basics            01/01/70 00:00      
RE: 8051 serial port basics            01/01/70 00:00      
RE: 8051 serial port basics            01/01/70 00:00      
RE: 8051 serial port basics            01/01/70 00:00      
RE: 8051 serial port basics            01/01/70 00:00      
RE: 8051 serial port basics Andy            01/01/70 00:00      
RE: 8051 serial port basics . Sriharsha            01/01/70 00:00      

Back to Subject List