PIC16f84 malfunctions

This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
gd am. i am creating a hardware cicruits where i am using 2 pic16f84 to communicate with each other. i am controlling at least 6 motors for the wheels and other components. the PIC16f84 works as expected when i tested it with each component individually. however, when all of the components are integrated, the PIC16f84 won't function as expected. it cannot even rotate a stepper motor while the dc motor is running. im using a 12v battery for my power supply. and a voltage regulator which is the 7805 for the 5v needed for the ICs that i am using.

i tried putting a decoupling capacitor in the VDD and VSS. it works ok but after some time, the PIC16f84 will start to go crazy again.

can anyone give me some advice on what to do so that i can integrate my components without problem? thanks!
Can you please be more specific regarding some of the design details?

For example, what protocol/medium are they communicating on? (bit banging, parallel lines, RS-232, ?).

I can tell you that we've worked with RS-232, & 422, etc. and occasionally we've had issues when they don't share a common RS-232 signal ground.
i am using a two bits of the serial port and conect them to the PIC16f84. this PIC is also connected to another PIC that is used to activate the stepper and DC motors. my problem is with its power supply because the PIC will go crazy after a few minutes that it is turned on. it is not able to detect the data sent by the serial and the output are all wrong.
If you are getting noise/spikes on the Tx & Rx lines maybe you should be using RS-422, RS-485 or some other noise resistant medium to help guard against the noise.

The data handling doesn't change, maybe only R (receive) and D (drive) bits needed, but the ICs are really cheap.

I'm assuming you put a scope on the lines, right? What did that show?

Not sure I can help but just throwing out ideas based on what you wrote. :snoopy:

I'm guessing you'll find some kind of weird noise issue.

Good luck!
you most use PIC16f876A because it has one Hardware USART
module in it . i think cause noise in your supply circuit and software serial commands . software serial comuication can't
detect either error bit or frame error and after few minute will go
itself . i attached two usart proton+ code . first for sending the data of a keypad and second code for indicate data on 2*16 lcd
that included recieved data , error bit , frame error bit as well as
a bit of an internal counter that check the situation of the transmiter . read them carefully .these are simple code to show that how can U configur the USART . this is reciever .


  • reciever.pdf
    30.9 KB · Views: 55
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.