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.

How to remove Noise/Voltage in TX pin of PIC16F877?

Status
Not open for further replies.

PersianMan

Newbie level 4
Joined
Mar 29, 2010
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,369
Dear friends,
I wanna connect an existing device to PC using RS485/RS232. I have programmed the microcontroller correctly and it works when I haven't switch on the power of device. I mean after programming by PIC kit 2, I have tested it by connecting the related cable from TX pin to PC and have received the test messages of microcontroller by hyperterminal. but when I turn on the device I can not receive. I tested the output voltage of the TX pin, It shows 4.3v voltage. I used 1k pull-down resistor in this pin. the voltage removed but still I can not receive any message.
Suddenly one day, after programming the microcontroller and without disconnecting the in-circuit programming cable, I saw that the device is sending message. after checking all pins of PICKIt 2 programmer, I saw the pin GND of programmer is affecting the device and removes the voltage in pin Tx. I mean if I connect the GND pin of microcontroller to an external GND, It sends correctly the message but sometimes with a bit changes in some characters randomly like a noise.
briefly, there is a noise in Pin Tx of PIC microcontroller. How can I remove this noise when the device is connected to mains. I should mention that this device has some parallel boards: power supply board, MCU board and IO boards beside each other. the power supply board is very close to MCU board which including out microcontroller (around 2cm).
Please notice that the programming doesn't have any problem and the connection circuit as well as following:
**broken link removed**
This is the circuit of connection between PC and PIC that I have added to device and not the circuit of device.

Should I use a bigger pull down resistor? Should I use capacitor in parallel with pull down resistor? which capacitor?
Why when I connect an external GND source to Vss of PIC, the noise reduces a lot and I can receive the messages but not perfectly? what is the role of external GND here?
Please guide me. I'm a EEE student working on a summer project.
I appreciate a lot in advance.
 
Last edited:

Your link does not work. You should have right-clicked on the link and selected Properties and then copied and pasted the whole link, here.

Just guessing, since I can't see your schematic: If the PC and the PIC do not have a ground connection that is common to both, then you can not use a one-wire connection between them, because there would be no reference to use to know the voltage. You would then need to use a differential pair.
 
Hi,

First RS485 and RS232 are two different protocols.

You should be using the simpler RS232, this means using a MAX232 chip between the Pic chip and the PC - are you using one ?

Equally have no idea what you mean by using a pull down resistor - why - what for ?

Think you have just connetected the PICs TX pin to the PC and thats a voltage mismatch which will possibly damage the pic or even the PCs serial port. - and also possibly the reason it seems to send the data when the pic is powered off because its getting its power from the tx/pc link ?

As Tgootee has said without a diagram it impossible to know what you have done.

A much easier way to test out a serial link is to use the Pickit2s USART Tool which emulates the PC link for you and does not need a MAX232 chip.
 
Old replay but... RS485 MUST be terminated not just 120 ohm on both side of net but on one side with 2 x 680ohm (or 750ohm). 485 chip out pins (A, B) to has this: A <- 680ohm -> +5V and B<-680ohm->gnd. No noise any more.
 

Sorry for not complete explanation.
Termination resistors are 120ohm on both side of net. 680 ohm resistors are to keep level >=200mV and not to have noise problem and are optional. When is used it become part of termination with 120ohm resistors and must be calculate. It gives very important failsafe issue in idle state of bus. Tested in all my applications, I am using it always. Good article https://www.ti.com/lit/an/slyt324/slyt324.pdf
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top