Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Reset

Status
Not open for further replies.

bernage

New Member
Hi, although I did not put the code program in pic16f876, it gives an LED light in the circuit i set up. I think i need to completely reset pic16. Is the reset with the Mclr tip and button a temporary reset? How can I completely empty Pic16?
Thanks in advance for any info
 

Attachments

  • image.jpg
    image.jpg
    3.8 MB · Views: 307
  • image.jpg
    image.jpg
    4.3 MB · Views: 290
Last edited:
To empty it you simply select the erase option in your programmer software.

But there's no need to, it does exactly that anyway as the first part of programming it.
 
Your screen grabs suggest that some of the program space is corrupted (bad). Erase simply writes FF to every byte, but may or may not verify it was written correctly. A blank check does a read, checking that every program location is FF. If possible, do a read of the chip after erase, and look at the 8f4 location, is there FF before and after? That is, are all locations containing FF except that one byte? Or, are locations after the "bad byte" 8F4 also containing program code?
Have you tried programming some other program into the PIC? It is entirely possible the PIC chip is bad. Does the erase and verify work ok with other 16F876 chips? If so, your chip is bad. If others fail as well, then the programmer may have a fault, or something is not set up properly in the programmer.
 
Your screen grabs suggest that some of the program space is corrupted (bad). Erase simply writes FF to every byte, but may or may not verify it was written correctly.

To clarify further, the programmer doesn't write 0x3FF (not 0xFF) to the PIC, the PIC itself does it - all the programmer does is send the erase command - the PIC then erases all memory in a certain sequence, in order to prevent any attempts to read a protected device. So program memory is erased first, and the fuses are erased last.

A blank check does a read, checking that every program location is FF. If possible, do a read of the chip after erase, and look at the 8f4 location, is there FF before and after? That is, are all locations containing FF except that one byte? Or, are locations after the "bad byte" 8F4 also containing program code?
Have you tried programming some other program into the PIC? It is entirely possible the PIC chip is bad. Does the erase and verify work ok with other 16F876 chips? If so, your chip is bad. If others fail as well, then the programmer may have a fault, or something is not set up properly in the programmer.

Pretty unlikely, as PIC's are incredibly reliable, even when seriously abused.

Is the OP trying to program it in-circuit?, or out of circuit?.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top