Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Fail to communicate between mcu to mcu using USART

Status
Not open for further replies.

nishal

Advanced Member level 4
Joined
May 4, 2007
Messages
108
Helped
10
Reputation
20
Reaction score
5
Trophy points
1,298
Activity points
1,936
uart fails to communicate with pc

Hi Friends,
I am developing a PC Software Application that controls 5 weighing scales at a time. Also developed an interface board using PIC 16F877A which accepts commands from the PC software and responds accordingly. This interface board will query the weight information from weighscale (MCU = AT89XXXXX) on command request from PC software. Interface board is communicating to pc via hardware USART and software USART to weighscale both at 9600,8,n,1. Everything works perfect if weighscale and interface board works on different power supply with common ground. But fails to communicate with weighscale when connected to same power supply. However, interface board works well. I tried to route through max232 shorting txout (pin 14) and rxin(pin 13) with no success. The power supply transformer is 2 Amps and connected with independent 5v regulator ic for both boards.

Please suggest a solution.

Thanks in advance.

Nishal
 

mcu with usart

This might have to do with a nasty ground loop from PC to the HW via the ground of RS232 cable.
Make sure the power supply is plugged to the same wall socket as the PC, alternatively (not recommended), use a un-grounded plug/socket for one of them.

Arthur
 

effect on communication using uart for earting

Thanks Arthur, I have tried as suggested still the same problem, On analysing the weighscale board, the board seems to be isolated from the common ground. If I connect directly to the weighscale mcu ground the weighscale displays 'overload'.

Thanks

Nishal
 

usart chain

It’s hard to be sure about anything when knowing so little about your setup, but it sounds to me that your problem has to do with floating ground / signal levels / ground loops.
I don’t really understand how you connected the interface board to the scale without a common ground (return path). Unless you use some sort of isolated transceiver (ex. RS422, optocoupler etc.), you would need a common ground for the whole chain of communication!
Here are some other things I would look at:
- power the scale and interface board from a battery pack, to effectively eliminate a possible ground/earth loop issue;
- check that signal levels match and use level shifters where they don’t.

Arthur
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top