picprojects.net Forum

picprojects.net Forum
It is currently Thu Jun 21, 2018 3:48 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: A Newbie's Guide to PIC18F2682 LVP (with your help!)
PostPosted: Wed Jan 13, 2016 12:48 am 
Offline

Joined: Wed Jan 13, 2016 12:12 am
Posts: 2
Hello everyone!

Background
I have a PIC18F2682 and I am very new to microcontrollers. I am using Arch Linux. I know the general idea is to write some code in C, have it compiled by something like SDCC, generate some hex code, and finally, upload the code to the microcontroller through the programmer.

I chose to use the low-voltage programmer (LVP). http://picpgm.picprojects.net/hardware. ... PROGRAMMER

What I did
I did this because I had similar components lying around. I have a laptop with a parallel port and I had a hex inverter (HD74LS04P) which I substituted for the hex inverter specified in the LVP (74ALS05D). I also replaced the BC557 PNP transistor with a C9015 PNP transistor. I used 5% tolerance, 1/4 watt resistors. I have a male parallel port connector and I soldered 25 wires to the side that was not meant to plug into the laptop. I used wires 2, 3, 4, 5, and 10 to plug into the inverters.

What I am confused about

Only wires 18-25 in the image below are grounded. Only wires 2, 3, 4, 5, and 10 are used for signaling. What happens to the rest? Do I just leave them floating? If I short them together to pins 18-25 (at ground potential), will that cause problems?

Image

Some people elsewhere online have mentioned that I must do something special to specify LVP programming mode and I might risk corrupting firmware. Is this true? What do I have to do to just get it all to work?

I've also noticed, in the troubleshooting section located here http://picpgm.picprojects.net/troubleshooting.html, that capacitors are to be placed in the path from VDD to the actual positive side of the power supply. Is this really necessary?

The schematic says I must use a 1k pull-down resistor to go from the PGM pin of the PIC to ground, but the troubleshooting guide says I should use a 10k resistor instead. Does this matter?

Thank you!


Top
 Profile  
 
 
 Post subject: Re: A Newbie's Guide to PIC18F2682 LVP (with your help!)
PostPosted: Sun Jan 17, 2016 11:02 am 
Offline

Joined: Fri Oct 28, 2011 5:18 pm
Posts: 223
Hi,

keep the pins on the parallel port floating which are not connected in the programmer schematic.
Do not ground unused pins since it might damage your port e.g. if you connect outputs to ground which are set to high!

The capacitors from the trouble shooting guide are optional and only required if you face problems during programming (capacitors filter disturbances).

The value of the pull-down resistor for LPV is not so critical, i would suggest a resistor value between 1k to 10k.

Regards,
Christian


Top
 Profile  
 
 Post subject: Re: A Newbie's Guide to PIC18F2682 LVP (with your help!)
PostPosted: Sun Jan 17, 2016 10:10 pm 
Offline

Joined: Wed Jan 13, 2016 12:12 am
Posts: 2
First of all, Christian, thank you very much for taking the time to read and respond so thoughtfully!

Second, thanks as well for the tip. I have wired up my LVP breadboard accordingly so that only pins 18-25 are grounded.

Third, it's good to know, as well, that the decoupling capacitors are an option in case this doesn't work properly the first time.

Fourth, thanks for the pointer about the resistor value. I've chosen a 4.7k because I had that lying around.

Fifth, if I may elaborate on a previously asked question, I was told elsewhere online that this circuit is not enough to get started and that I may need to configure or prime the chip somehow to make it accept this low-voltage programming mode. Is this really the case? Or is it just that once I've built this circuit as presented that I'm ready to begin programming the microcontroller?

Finally, I have heard a lot of concern about potential damage to the parallel port. What are some common pitfalls regarding this that I may avoid? I will be safe and not rush anything. However, I vaguely remember reading that plugging such a circuit via parallel port into a computer must be done in a particular order. I can't remember if it's the case that the computer needs to be powered on first or the LVP with its separate 5 V supply needs to be on first and whether it matters the order in which I shut down everything (i.e., does it matter if I turn off the LVP first by disconnecting the power supply to it or whether I turn off the computer first?)?

Thanks again, very, very much!


Top
 Profile  
 
 Post subject: Re: A Newbie's Guide to PIC18F2682 LVP (with your help!)
PostPosted: Sun Feb 28, 2016 8:07 pm 
Offline

Joined: Fri Oct 28, 2011 5:18 pm
Posts: 223
Hi,

for low voltage programming, you just need to pull PGM pin of the PIC to ground via an pull down resistor. See example schematic "PIC circuit for usage with LVISP programmer" at http://picpgm.picprojects.net/hardware.html.

I have worked with different self-made PIC programmers for more than 15 years and I have never destroyed a port on the PC, although I managed wiring the programmes wrong several times. But nevertheless, you should be carefull and know what you are doing (and it is your risk ;) ).

Regards,
Christian


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group