1
\$\begingroup\$

is it possible to program PIC 16F877A using arduino uno?
if it is possible, please tell me how to this;

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

Yes, it is possible. Is it easy? No.

You have to employ the "low voltage programming" mode (LVP) of the chip, which is enabled by default out of the factory (don't turn it off or you would need a real programmer to turn it on again):

The LVP bit of the configuration word enables low-voltage ICSP programming. This mode allows the microcontroller to be programmed via ICSP using a \$V_{DD}\$ source in the operating voltage range. This only means that \$V_{PP}\$ does not have to be brought to \$V_{IHH}\$ but can instead be left at the normal operating voltage. In this mode, the RB3/PGM pin is dedicated to the programming function and ceases to be a general purpose I/O pin. During programming,\$V_{DD}\$ is applied to the MCLR pin. To enter Programming mode, \$V_{DD}\$ must be applied to the RB3/PGM provided the LVP bit is set. The LVP bit defaults to on (‘1’) from the factory.

So you can use the Uno to send the right serial signals (similar to SPI) to the PIC16 using LVP.

The hard part is getting that serial data right.

DS39589 tells you all about the programming protocol.

\$\endgroup\$
4
  • \$\begingroup\$ thanks for your help ,but does this mean that I don't have to connect external 12 volt to Vpp as described here forum.arduino.cc/index.php?topic=92929.0 \$\endgroup\$
    – Ali Adel
    Commented Nov 15, 2014 at 20:36
  • \$\begingroup\$ Not when using LVP, no. The 12V is only for high voltage programming and is what things like the pickit2 and pickit3 use. \$\endgroup\$
    – Majenko
    Commented Nov 15, 2014 at 20:42
  • \$\begingroup\$ in the link I mentioned the author said he tried but with no luck and here is his post "Working on LVP (Low Volatage Mode = no need for 12V) and release the code in less than one hour! PS : just received my 16F876A, so I'm gonna try! ;) EDIT : ARRRRRHHHHH having problemes with LVP :s Doesn't work, actually 16F876 don't work like 16F628, that's a bit more complicated than ithought. Anybody who want to help is welcome!" so if you can suggest a proper way for connections and programming that will be very helpful for a lot of people....thanks again and sorry for bothering \$\endgroup\$
    – Ali Adel
    Commented Nov 15, 2014 at 20:52
  • \$\begingroup\$ The propper way to download to a PIC is described in its the programming specification. Majenko gave the link, now you just have to read. \$\endgroup\$ Commented Nov 15, 2014 at 22:02
2
\$\begingroup\$

Someone seems to have done this:

(use google for more candidates)

\$\endgroup\$
2
  • \$\begingroup\$ I did so and I have already read the three topics you mentioned but I didn't get a lot of them so I was trying to find something more clear...any way thanks for your help \$\endgroup\$
    – Ali Adel
    Commented Nov 15, 2014 at 20:41
  • \$\begingroup\$ If you had read those links you knew it was possible, so why ask? \$\endgroup\$ Commented Nov 15, 2014 at 22:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.