Hello everyone,
This is my first time working with microcontrollers and I have encountered some unusual problems. I am using the PIC16F877A microcontroller and the PIC-PG2C programmer. Now after a few failed download attempts to the microcontroller, I realized that I had the wrong device in IC-Prog. I only tell you this because I thought it could have contributed to the problem. After I finally downloaded and verified the code on a DIFFERENT pic16f877a microcontroller, I put it into a circuit based off the one found on this page, http://www.instructables.com/id/EH60B0AZU1EP286TH9/, except with the LED on port A bit 0 and instead of a 4.7k resistor I had a potentiometer that was dialed to about 5k. My 5V voltage source was an LM7805C voltage regulator with a nine volt battery connected to the input, a 100uF capacitor connecting the input to the ground with the positive terminal on the input, the ground of the 7805C connected to the 9V battery ground, another 100uF capacitor connecting the output to ground with the positive terminal on the output, and the output connecting to the circuit. The circuit worked until I tried to reprogram the PIC. After that I was not able to reprogram it at all so I tried using the microcontroller that I had originally used but had put the wrong device in IC-Prog. When I used that I was able to successfully program and verify the code but when I put it into the circuit, the LED did not light up until I jiggled the LED in its breadboard socket. Now at first I thought it was a bad breadboard connection, but then I discovered that after I jiggled the LED for a while and it lit up, and then pulled it out of the socket, and then placed it back in it immediately lit up without the need for further jiggling. Now I am very confused as to why these events occurred, and I am sorry if this narrative was a little too detailed but I wanted to make sure the problem was apparent. Furthermore, I was able to program a pic16f84a chip 4 times without any problems but I did not place it into the circuit. Anyway, any help would be greatly appreciated.
This is my first time working with microcontrollers and I have encountered some unusual problems. I am using the PIC16F877A microcontroller and the PIC-PG2C programmer. Now after a few failed download attempts to the microcontroller, I realized that I had the wrong device in IC-Prog. I only tell you this because I thought it could have contributed to the problem. After I finally downloaded and verified the code on a DIFFERENT pic16f877a microcontroller, I put it into a circuit based off the one found on this page, http://www.instructables.com/id/EH60B0AZU1EP286TH9/, except with the LED on port A bit 0 and instead of a 4.7k resistor I had a potentiometer that was dialed to about 5k. My 5V voltage source was an LM7805C voltage regulator with a nine volt battery connected to the input, a 100uF capacitor connecting the input to the ground with the positive terminal on the input, the ground of the 7805C connected to the 9V battery ground, another 100uF capacitor connecting the output to ground with the positive terminal on the output, and the output connecting to the circuit. The circuit worked until I tried to reprogram the PIC. After that I was not able to reprogram it at all so I tried using the microcontroller that I had originally used but had put the wrong device in IC-Prog. When I used that I was able to successfully program and verify the code but when I put it into the circuit, the LED did not light up until I jiggled the LED in its breadboard socket. Now at first I thought it was a bad breadboard connection, but then I discovered that after I jiggled the LED for a while and it lit up, and then pulled it out of the socket, and then placed it back in it immediately lit up without the need for further jiggling. Now I am very confused as to why these events occurred, and I am sorry if this narrative was a little too detailed but I wanted to make sure the problem was apparent. Furthermore, I was able to program a pic16f84a chip 4 times without any problems but I did not place it into the circuit. Anyway, any help would be greatly appreciated.