
- Joined
- Jul 4, 2009
- Messages
- 16,648
- Helped
- 5,158
- Reputation
- 10,349
- Reaction score
- 5,251
- Trophy points
- 1,393
- Location
- Aberdyfi, West Wales, UK
- Activity points
- 140,891
An RS-232 cable is just wires with a plug at each end, it doesn't convert the voltages at all. There are some devices with a built in TTL level converter built in to one of the plugs but most do not have this.
The PC expects RS-232 levels at it's input pins and produces RS-232 levels at it's output pins. RS-232 is a higher voltage system than the PIC uses, typically swinging from +12V to -12V to represent low and high bits.
The PIC produces levels of 0V to 5V at it's output and expects levels of 0V to +5V at it's input, logic low is 0V and logic high is 5V.
So the voltages are translated by the MAX232 so 0V in gives +12V out and 5V in gives -12V out and the same in reverse. Without translating the levels and reversing the polarity the PIC will not communicate with the PC.
Brian.
The PC expects RS-232 levels at it's input pins and produces RS-232 levels at it's output pins. RS-232 is a higher voltage system than the PIC uses, typically swinging from +12V to -12V to represent low and high bits.
The PIC produces levels of 0V to 5V at it's output and expects levels of 0V to +5V at it's input, logic low is 0V and logic high is 5V.
So the voltages are translated by the MAX232 so 0V in gives +12V out and 5V in gives -12V out and the same in reverse. Without translating the levels and reversing the polarity the PIC will not communicate with the PC.
Brian.