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.

LVP, PGM and MCLR functions

Status
Not open for further replies.

cucamunga

New Member
Hi, me again. I have this doubt if anyone can help me:
I'm using a 16F877A and i'm using the SCHAER+ Programmer (**broken link removed**.
The thing is i don't know how to config the LVP fuse because in the schematic the MCLR and the PGM pin are used.
Can someone explain this to me...
 
You can set the LVP fuse to OFF and gain an IO pin because your programmer can do high voltage (13.4V) programming via the MCLR pin. Take note, that if you use the LVP programming mode, you cannot change the LVP fuse; you can only do this using high voltage (13.4V) programming mode.
High voltage (13.4V) programming mode will always be able to program the chip. If you disable the LVP fuse via 13.4V on MCLR, then you cannot program the device using the PGM pin.
 
thanks, so let be clear... if i don't check the LVP i can use the RB7/PGD and the RB6/PGC pins(i be able to disconnect them and only use the MCLR/Vpp)?
 
No, you still need to have RB6, RB7 & MCLR (Not to mention Vdd & Vss ofcoarse) connected to program the PIC. You can leave the PGM pin disconnected. After the PIC is programmed you can use RB6 & RB7 for whatever you need them for. It is best to always leave MCLR as the MCLR pin and not change it to general IO.
 
Ok, but i still don't understand one thing....When i program the PIC, the program begins to run right after the IC-Prog says "Device successfully verified" ?
because if wrote one program in MikroC and when i connect the LED to the pin 33 of my 16F877A, nothing happens(the volt of the pin is 0.35V)
The program:
________________________________________________________________

void main() {

PORTB = 0;
TRISB = 0xFE;

while (1) {
PORTB = 0x01;
Delay_ms(1000);
PORTB = 0x00;
Delay_ms(1000);
}
}
________________________________________________________________
And the fuses are:
CP: OFF
WRT: OFF
CPD: OFF
LVP: OFF
BODEN: ON
PWRTE: ON
WDT: OFF
XT_OSC:CHECK



any ideas ?
 
PIC XT fuse configuration option setup the PIC to use an external 4MHz oscillator as the main clock, without which the PIC won't run.

Does your 16F877A has an external crystal of 4MHz or lower connected to pin 13 & pin 14?
 
YES, all connected and XT box checked.
I have a 4 MHz with two 22 pF capacitors.
The program start to run right before ic-Prog ends write the .HEX?
 
The program start to run right before ic-Prog ends write the .HEX?
Not neccessarily. I've not used ic-prog, but check to see that the MCLR pin is at 5V after programming. If it is, then the PIC should run. If it is near 0V then the PIC is in reset and nothing will happen.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top