I have built a number of battery operated circuits using PIC16F88s.
They are housed in a plastic case with a socket to plug in a serial connection for controlling LED outputs by RS232 comms.
Sometimes when you touch the socket with your finger, the PIC responds in a manner suggesting that it has received some random data on the Rx pin of the USART. The problem occurs much more frequently in cold dry weather which I know is worse for static generally.
Presumably this suggests that electrostatic discharge is being interpreted by the PIC as a signal.
Any ideas on how to prevent this? (Ideally with modifications that I can do to existing circuits as I have made quite a few already.)
Here is what I have already tried, in an attempt to fix it:
- Now there is a 1K resistor in series between the USART Rx pin and the socket pin corresponding to serial data.
- I have also tried a 100K pull-up from the Rx pin on the PIC to Batt
+ve.- I have attached 100k pull-down resistors to the other unused pins of the PIC that were previously not connected. (They are all set as outputs anyway)
- The PIC's Vdd has a 100nF capacitor connected directly between it and Vss (within 20mm of pins)
- There is also a 10uF capacitor between Vdd and Vss (but located a little further away on the board - about 150mm from PIC)
The PICs I am using are SOIC package. I made a very similar batch of circuits a couple of years ago using DIP package (also PIC16F88) running the same program and didn't have any such problems.
Thanks in advance for any advice, Bo.