Answers for your questions you can find on page 158 of datasheet for 16F877A (39582b.pdf) and on Lotar's page. One more thing you should know. When you want to use lvp you should first, in your MPLAB code enable lvp. Here is an example for 18F452
If you set lvp off and program pic for the first time with this setting off you will disable
lvp and later if you want to use lvp again you will be forced to program pic with some other programmer that is using regular programming (mclr 13v) to enable lvp again.
Sory about my bad english.
Thanks for your reply. And, your english isn't bad.
I am very new to the world of PIC's. So, i don't understand datasheet that well. I have already programmed my PIC using PICSTART & MPLAB. So, now if i want to erase it all and reprogram using LVP. What should i do.
First of all you should enable lvp on your device(see 146 page of datasheet). You have to set bit 7 in configuration word. How will you do that? In your MPLAB code you
,in some program that is passin building and which you can successfully compile, enable lvp in the following line
When you do the changes, build your program again. Now program PIC with this code with your programmer which isn't using lvp(you mention that you have that programmer). Now hou have enable lvp (set bit 7 in config word) and you can now use lvp as Lotar explain.
I just bought a new PIC16F876A and now wish to program it with LVP (Lothar stolz Low Voltage Programmer) and use the folowing circuit and program to test it afterwards.
My Program is:
start:
TRISA = %000000
TRISB = %00000000
TRISC = %00000000
High PORTC.5
End
Also, look at
**broken link removed**
for the Low voltage Programming cable and tell me what steps need to followed for programming the brand new PIC16F876A using LVP. ALso, i wish to use the internal RC oscillator.
It seems to me that you are using some other compiler instead MPLAB. I don't know is your program correct. 16F87XA don't have internal RC (datasheet, page 146). On your circuit you should connect another vss too. 100R resistor is too low. You should use 220R or higher (but not too high). Brand new pic have enabled lvp by factory settings. You should provide correct hex file for you pic(code that is working, with lvp enabled, proper oscilator configuration). When you do that procedure is:
1.Make connection between PC and PIC (Lothar's page)
2.Configure IC-Prog (Lothar's page)
3.Open your hex file with IC-Prog
4.Program your device with IC-Prog (click on "Program All" button)