iam using atmega 328 . short distance <1m ,. and yes there might be accidental misconnection tx and rx ( i thought that was not harmful .
i will try the 1k resistor .
and i want to clarify that using the RS232 / or RS485 IC was not for a longer distance; instead i want to use it as a "first line on defence " so the porblem on one side doesnot cause the micro to burn instead i just change the RSXXX chip . does this make sense ?
and i will recheck for port direction change , because if one micro is on before the other , when the second starts maybe the port is defualt as input/output and initialization serial is changing the direction of pins while the first micro is sending data !! i hope what i meant is clear
Over short distances and using TTL levels it's probably easier to use opto-couplers rather than converting to RS232/422/485 and back again. The resistor solution might work but first check that the ground on both micros is at the same potential and they are connected directly together.
Brian.
Hi,
Think it would be worthwhile if you posted a diagram of how you have wired up both of your micros including the wires connecting the two ports together and the power supply/s for both micros.
Just adding a 2 optos is not necessarily going to solve you problem, but seeing a diagram might show where the original problem is.
2 micros talking to each other, onboard or via a short cable, via usart , spi or whatever is a very common action and no extra interface is needed, so why should you ?
I am assuming that you are transferring data at fairly low speeds. At low speeds there should be no problems unless your resistance in bus is high, which is unlikely if you are using simple copper wires and fairly short distance. The most problems that I have ran into when trying to communicate via TTL logic is lack of common ground AND common +3/5 voltage. You should be ok if your micros are powered via same power supply.
i donot get it , you are saying that resistance on the bus could cause problems ? others have suggested adding resistors on the path for protection .
and yes i am using 9600 baud rate . , not common Vcc , please check the diagram i have posted above and i will repeat it again : https://obrazki.elektroda.pl/7390471200_1375392333.jpg . and tell me i you think i have something messed up that is causing the chips UART module to burn .
Just a note , sometimes i had accidently switch the TX RX , as i understoud from folks that might be causing the problem ! ??
- you do mean that you crossed over the tx and rx cable between the micros while they were running ?sometimes i had accidently switch the TX RX
- do you mean when you touch the body of the micro it feels hot - too hot to hold your finger on it for more than 10 seconds ?the serial module is burning on both sides
Hi,
Using any standard cable of 1 mtr in length will not cause any problems at 9600 baud - I have done such a set up many times.
At that distance providing each micros VSSs are connected to the same common 0v point then the circiut should be complete without the need for a common connection via the serial cable.
Can you be clear about - you do mean that you crossed over the tx and rx cable between the micros while they were running ?
Also you originally posted - do you mean when you touch the body of the micro it feels hot - too hot to hold your finger on it for more than 10 seconds ?
Having either of the above happening just for a split second can blow the Usart port pins - not so you would physically see damage, but internally.
You have no idea if either of those chips are any good, the easiest is to just replace them, don't replace just one as the other one you think might be ok could be damaged and will cause another new one to blow when connected to it.
Fit those 1k resistors before you apply any power.
Again as said earlier, just use one power supply for both chips until you have things running correctly.
You have not said anything about the software you are using, have you configured the tx and rx ports correctly ? are you sure they are staying that way all the time? nothing is changing them by mistake ?
Its a straight forwards function and it does work well, so do try again , checking each step carefully.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?