We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Hi Per,
--> level-converter chip
I am using 8051 and 2051 can you suggest a level converter ?
--> Are the two controllers on the same circuit board?
No They are not but i was thinking of using same supply for both or may be i can bring them on a same board.
Thanks for your suggestions i will try those out also please suggest a level converter.
Exactly what voltages will the two chips be supplied with?
If both are going to use the same supply voltage, then you would normally not need any level converters. Level converters are used if one chip is - for example - using 1.8V logic, and one is using 3.3V.
...i was thinking of using same supply...
So the two boards will be close together? If not, then you should probably think about some form of buffer chip - such as the RS-232 buffers - between the boards. Besides protecting the controllers, they also increase the noise margin for the communication.
You don't want relatively high-impedive signals - with fast flanks - sent over a long cable. Especially if the cable isn't twisted.
Hi, They both use 3.3V and they are not very far away actually not more than a few feet. so basically i do not need a Level converter ?.
not more than a few feet You WILL get into trouble without 232 transceivers.
Direct serial is OK within the same box, but a disaster when you go outside the box.
You say you are 'testing' what on earth does that 'prove' besides "it seems to work, when located on your workbench"?. Now take your EMI generator (I use an old router named 'sparky') and put it next to your direct serial outside the box and see it fail moiserably.
Erik
No, you do'nt have to use a level shifter. If I do not misunderstand, the Rx from the receiving controller is connected to the Tx of the sending controller AND is also connected to a RS232 buffer. In that case you must use a 2->1 multiplexer to select one of the "sources".
Regards. Luc.
No level converter needed.
However, you might have to need to think about conditioning the signals, since a couple of feet of cable may pick up a lot of noise depending on environment and cable type.
rephrasing Pers post:
level converter needed. OR you might have to need to think about conditioning the signals, since a couple of feet of cable may pick up a lot of noise depending on environment and cable type.
PS with all that, why not just use a MAX232(equivalent) and be sure?
Hi erik,
I am sure that you are very correct when you say that it won't work out side the testing environment . i am just trying to see if i can avoid redesigning the board that is already present. the thing is i have two board 1 uses 232 but the other dose not so i wanted to see if it is feasible to pass data between them without changing the boards around. and i'm going to try and put it under as harsh conditions as possible.
Thanks ajay
Hi Luc,
I am using 4066 a switch IC to give out put to the 232 now the problem is i'm using both the ports of 232. i use one to communicate to a device and the other to communicate with the PC. but now i am trying to use another device instead of PC this device dose not have a serial port which is why i want to use the logic signal, and the 232 still is in picture.
Thanks Ajay
Hi Erik,
Just Trying to avoid redesigning , is it possible to avoid redesigning and still have data transmitted using 232 ?
Just Trying to avoid redesigning , is it possible to avoid redesigning and still have data transmitted using 232 ? Of course it is. HOWEVER you are running TWO risks a) a '51 port to the outside is ve.. nah, extremely noise senitive b) a '51 port to the outside is the most likely of any chip pin to blow when exposed to EMI
THUS, you can not design the above, however, you can, of course "make" it.
In our company there are "inspirational posters" hanging all over the place and one has the phrase "sign your work with quality", if you do the port pin to the outside world you will "sign your work with hope"
So Basically i should redesign.
Thanks. Ajay
If the two boards are connected using a fixed connector, and connected together in a factory then you might decide to run raw TTL signals between the chips.
If the two chips are using a cable (longer than of a couple of cm) and not in a shielded box, then you should definitely consider hardware protection for the pins. Using RS-232 signals is one of the easiest ways to at least partially protect your hardware and at the same time reduce the noise sensitivity.
If this is a hobby project, the above may not matter. If it is commercial product, you are more or less forced to productify the circuit and choose solutions where all sensitive hw have protection from daamge, all communication has enough noise protection and error detection/correction, and all hf signals are properly blocked by EMI filters so that the equipment can be submitted for emission testing.
Hi, The Project that i'm working on is just for experiment right now but hoping that it would be of some commercial use later on. i'll make sure i use some kind of protection as every one is saying that and most probably skip the TTL idea in favor of 232. Thanks Ajay
May I push this issue one direction.
One always should make a best effort for making the proper design with quality.
You will have enought bugs to sort without going itsi bitsi. If you make with quality, you know there is no problem.
We develop circuits and things that are sold - that is what I do - and we do not know how far these products are going to go. Do not take your chances. Maybe it is an electric pan that you are making, maybe is a garage door remote controller or a printer sharing box. All should be made with quality. You never know how important the failure may get.
Make it proper. Make it with pride.
Your sequence of postings show that you have not decided yet where you are going. I believe you are proud enought to make it proper. So put the max 232 in your board.
RE-design? No problem, after all, it will take you 30 minutes to make the max 232 circuit work.
You have only few boards to make the modification? No problem. Costs of max 232 are low.
You will have a comercial product? No problem, mas 232 will make comms reliable.
When you are seasoned enought, with a product that is mature, you will be able to cut the costs and still make it with quality.
Ed.