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-Cable and other misc. questions

Status
Not open for further replies.
S

Souper man

Guest
I have bought the stuff for my first microcontroller experiment (16F877A). For a programmer, I am using a LVP, or low voltage programming cable.
**broken link removed**
Do I plug the LVP cable directly into any open 9pin Dsub port?

Also, on Nigels 16F877A board, He uses 12pf caps. I dont have 12pf, but I do have 10 pf. Will these work?

What is the programming language for this?
--------->http://www.ic-prog.com/

Download it, and look at the 16F877A chip (upper left corner). How do i program this?
 
I'm not sure what others there are, but there are drawbacks to LVP. One of the important ones is if LVP is disabled via configuration fuse, there is no way to reprogram the PIC without using a high voltage programmer. HV programming uses one less pin, and is faster too. Why choose low voltage programming?

If you want fast and easy programming, check out "bootloaders" ... the 16F88 and almost all the 18F support using boot loaders, like tinybld, which program the pic using a programmer built into the chip itself. all you do is send it data over the UART's RX and TX pins (which can be re-used post programming). oh did I mention it's fast? like uploading a 28kb program to an 18F452 in seconds, try that with ICSP!
 
I wanted somthing super easy and simple, since I have no Idea what I am doing. I wish bill could explain the programmer, because I am confused. I just wanted to know where to plug the LVP cable into. I know this is obsolete, but I will eventually scale up and become more advanced.
 
yes, it appears the cable is designed to connect directly to your serial port. the design relies on nothing but a few current limiting resistors and the inbuilt diodes of the pic to protect it from being destroyed by the +/- 10-12v present on a PC's serial port
 
I have Built the LVP, which looks kinda cool (will get pictures later). I looked at the picture of his LVP (if you scroll down to the picture with his LVP cable) it has 5v and GND going to the PIC. I did not know what to do, so I added a 5volt regulator and connected it to the correct pins.
 
he addresses the +5 and GND connections in the second paragraph:

But you can use it for programming only, too. For reading and writing, you have to apply power (+5V at Vdd) and tie MCLR to high level (Vdd) (Microchip suggests to use a resistor for MCLR because of latch-up risk). An oscillator circuit doesn't have to be connected. Of course, also connect the three lines PGD, PGC and PGM.

the author even added red coloring, perhaps as some sort of emphasis? you can steal a few mA from the serial port, but I would recommend hacking apart a USB cable and using it for power. You can get a couple hundred mA from a usb port before it shuts you down, and it is protected unlike the serial port.
 
The LVP programmer is extremly basic and cheap. Like justDIY said just don't turn off the LVP fuse in the config settings. It's meant only to get your feet wet and ween you off of TTL. It's also a nice way to get a bootloader put on the 16F877A and eventually build an HVP ICD2 clone...

Also don't forget there is a free simulator in MPLAB and more on the net, plus although I recommend learning assembly the PIC BASIC Pro compiler can get your bots running even with the 40 line limitation in the demo.

Again good advice justDIY about the bootloader, I've used tinybld on the Firefly and it's teriffic but you've got to follow the instructions so you don't disable it by mistake.
 
Last edited:
Looking at the datasheet, I connect MCLR to VDD through a 10k resistor?

But when I am writing/reading it I connect power?

What language is the program thing, and what language is it? greek? spanish? or german? (ha ha joke, kinda sux, I think it might be C or somthing)
 
Souper man said:
Looking at the datasheet, I connect MCLR to VDD through a 10k resistor?

But when I am writing/reading it I connect power?

Sections 14.18 and 14.19 of the 87XA datasheet detail ICSP and LVP requirements, connections, etc.

the datasheet seems most concerned about pin RB3 - PGM, from what I read, MCLR is treated normally. section 14.4 provides the recommend connection details for MCLR. typically a simple resistor to Vdd will suffice, sometimes a diode is included to protect Vdd from the high voltage Vpp when high voltage programming is used.
 
Thanks alot!

Now onto programming language and how to program.
What language to use?
What program thing to use?

What is a bootloader, and what is the compiler thing?

I have no Idea what any of that stuff is, so If you could explain a bit better, because I am super new to PICs.

Thank you for helping me!

(I have self taught electronics to myself, so thats why I am having trouble understanding some stuff, because nobody around here (cept for high school) knows what a friggin resistor is)
 
Last edited by a moderator:
You will have to learn assembly, or find a C compiler. It is up to you.

EDIT: Yes, just use http://www.ic-prog.com/. I think all that program does is writes the hex file to the PIC, so you will need another program to compile the HEX file; You should be able to use MPLAB.

Correct me if i am wrong, but i think the purpose of this programmer is to program a chip such as the 16F877 so you can use it in a HVP, like the ICD2.
 
Last edited:
Dont I get MPLAB from microchip?

So I write the code in MPLAB then what?
 
Souper man said:
Dont I get MPLAB from microchip?

So I write the code in MPLAB then what?

You write it in assembler using MPLAB, then assemble it to produce the HEX file. Next you load the HEX file in your programmer software, and sent it to the PIC.

If you have an ICD2 this is driven directly from MPLAB, so you can write the PIC without having to load the HEX file, just assemble and run.
 
you'll have to find programming software that supports your LVP cable as well. ic-prog seems a popular one, I used it a bit long ago with a JDM based programmer. I use a proprietary usb flash programmer now, which will be replaced one of these days with a proper icd2.
 
I have downloaded MPLAB, and all I got to do now is find out how to use programming language. any suggestions?
 
Could I just use the tutorial code and send that to the MPLAB?
 
Souper man said:
Could I just use the tutorial code and send that to the MPLAB?

You might need to modify it slightly, or alter settings in MPLAB - the code as provided assembles via the MicroChip assembler MPASMWIN, which is installed along with MPLAB.
 
Status
Not open for further replies.

Latest threads

Back
Top