Hi, I am trying to send data from one controller to another directly ie without converting it into serial. Now when i send the data using 232 it is being received alright and the out put is also displayed. i am using putchar and getchar. but when i try this by directly connecting the Tx of first controller to Rx of next the data is either not being read properly or not being transfered properly. I'm just not getting what is going wrong. it should work i think i have even made the ground common for both the controllers.
Thanks Ajay.
TTL is just an old name - Transistor-Transistor Logic. It doesn't say too much about the actual signal levels. Common voltages right now are 1.8V to 5V.
You need to have the same signal levels on both chips, i.e. if one chip is using 5V signalling levels, the same logic levels are needed on the other too, or the chip with the higher voltage may kill the chip with the lower voltage, while signals in the other direction may fail to be detected as high.
In some cases it may be enough to just use a serial resistor between the two chips in case they use different voltages, but that requires that the chip with the higher voltage are low-level compatible, i.e. have a very low threshold for detecting a signal as high.
Normally, the best way to interface logic with different logic levels is to use a level-converter chip inbetween. Even if this represents an extra chip, it is still better than to need two RS-232 converter chips - especially since the RS232 converter chips either needs a very high supply voltage or external capacitors to pump up the voltages to the required RS-232 levels.
Are the two controllers on the same circuit board? Note that if they are not, you should add EMI filters, serial resistors and some overvoltage protectors on the signals. The controller I/O pins are not always as sturdy as the RS-232 chips.
...i have even made the ground common for both the controllers.
Note that this is not an optional extra. It is a strict requirement that the two units have a common ground reference for the signals if you are going to communicate without use of transformers, opto-couplers or similar.
Never two outputs connected togehter, unless they are open-collector or similar, or are individually controlled using enable signals.
View all questions in Keil forum