Hello,
I am trying to get an ATMEGA8 to talk to my desktop computer using a USB<->RS232 cable, and a RS232<->TTL circuit.
The USB-RS232 cable works fine (I shorted pins 2 and 3 and talked to it using a serial com program - cutecom). I built an RS232<->TTL circuit using a MAX202CPE chip with 5 0.1microfarad capacitors, using the circuit in
http://www.maplin.co.uk/images/300/c2305.jpgI have connected the TD (pin3) from the RS232 connector to pin 13 on the MAX202, and I should expect the TTL signal to come out of pin 12, and it should go to RXD on my microcontroller.
Similarly, I connected the RD (pin2) on the RS232 to pin 14 on the MAX202, and I should expect my microcontroller to feed its signal from the TXD into pin 11 on the MAX202.
I tried with the microcontroller, nothing works. So I shorted the pins 12 and 11 on the MAX202, ie loopback on itself, and tried to see if it echoed back characters to me. Nothing.
I tried various speeds, and various combinations of stop/start bits and parity, the MAX202 circuit didn't work.
I have already bought a ready made RS232<->TTL circuit, and should get it in the post, but I would like to know why this one is not working, and how to fix it so I can learn.
Sorry this post is a bit long, but if anyone has an ideas, please tell me, it would be very much appreciated,
cheers,
nawal.