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 or not?

Status
Not open for further replies.

ChArLyZzZ

New Member
Again:)
I want to implement an In Circuit Programmer on my development board that i'm constructing using PIC16F877A. The problem is that I need pin RB3/PGM as an I/O, so i guess that LVP is not a good choice,right?
In fact, all the pins of the PIC are used as I/O, so I will put some jumpers to multiplex them during programming. But I'm still worring about the technique that i should use!
Can anyone give me an idea how can i implement it & what software should i use cause i have no time to build my own? I have MAX232 on my board
Thanks really
p.s: I checked **broken link removed** :)
 
Hi, Please read the Sticky, you will find my Statement about LVP.
The best bootloader (that's what you are looking for) is the tiny PIC bootloader at .
 
Hi, Please read the Sticky, you will find my Statement about LVP
The problem is that I need pin RB3/PGM as an I/O, so i guess that LVP is not a good choice,right?
:)

In fact i cant use a bootloader which by the way is a good idea, since i'm developing this board to be "ready to use" by any PIC16F877A and not a specific controller that has a bootloader.
I purchased a programmer that has an interface PIC (PIC16F648A) between the serial port with MAX232 and the PIC that i want to download the code in it. Do u have any idea about it?
Thx 4 the help
 
LOL PIC16F877A can have a bootloader! You don't need a special MCU to have a bootloader, any PIC which is able to do Table writes can have it.

:lol: :lol: :lol:
 
Jay.slovak said:
Hi, Please read the Sticky, you will find my Statement about LVP.
The best bootloader (that's what you are looking for) is the tiny PIC bootloader at .

It's the smallest for sure, but i wouldnt say the best...
It hasnt't got error checking on the serial data received (checksum or the likes) and that can make it fail in a noisy enviroment...

It also has no safety to prevent a badly flashed program to run.
A good bootloader should clear a flag in eeprom before flashing, and when the flashing is completed successfully the eeprom flag should be set again...

Then the bootloader should not allow the code to run if that flag isn't set. This prevents the pic running bad code if the flashing failed...

But for most hobby purposes it'll do well enough.
 
Exo said:
Jay.slovak said:
Hi, Please read the Sticky, you will find my Statement about LVP.
The best bootloader (that's what you are looking for) is the tiny PIC bootloader at .

It's the smallest for sure, but i wouldnt say the best...
It hasnt't got error checking on the serial data received (checksum or the likes) and that can make it fail in a noisy enviroment...

It also has no safety to prevent a badly flashed program to run.
A good bootloader should clear a flag in eeprom before flashing, and when the flashing is completed successfully the eeprom flag should be set again...

Then the bootloader should not allow the code to run if that flag isn't set. This prevents the pic running bad code if the flashing failed...

But for most hobby purposes it'll do well enough.
Ofcourse it has limitations, but I never had a problem, and the bootloader is Tiny and Fast :D
 
LOL PIC16F877A can have a bootloader! You don't need a special MCU to have a bootloader, any PIC which is able to do Table writes can have it.
As i understand, u r saying that this interface PIC has a bootloader. But in what kind of programming mode it is transferring the code to the PIC16F877a. Is it the normal high voltage Entry mode?
Another thing, can u give me an idea om how can i transfer the program directly on board from the PC without using any bootloader??
Thanks[/quote]
 
Nope, it's using the serial port.

Some PICs have the ability to modify their own programs. That is, they can write to the program memory locations. So a bootloader is a small program that resides on the PIC that on startup checks for a certain code sequence from the serial port and then enters into program mode...accepting data over the serial port and programming the program memory with it.

To transfer the program to the PIC already on the board you would use either a bootloader or ICSP (In-Circuit Serial Programming). Some hardware programmers can do this.

Mike
 
How did the discussion switch from programmer to bootloaders?
Essentially, you have to implement ICSP circuit onto your development board. You can refer to the app note.

https://www.electro-tech-online.com/custompdfs/2005/08/91016b.pdf

The only IO pins that are absolutely required for ICSP are rb7 and rb6. It is recommended that these 2 pins not be used, but this does not imply that they definitely cant be multiplexed. The issue is that if these pins are connected to a circuit that can potentially corrupt/distort the programming signals, then the ICSP will fail. Of course, if you use jumpers to isolate them, there is no reason why they can't work. Of course, maybe a dpdt switch is even more convenient.

Personally, I'd rather prefer a stand-alone programmer, and a board with ICSP support. This way, you can use the programmer on whatever other boards you have. I even built a small ICSP 40-pin adapter for boards that do not have ICSP, with optional jumper isolation if required.
 
[Edited out original post content, I'm not even sure what the question is!...]

You want ICSP and you're not sure how to do it right?

Just read the Appnote linked in the previous post. It's all in there, with example schematics...

[2nd edit]

Wait a minute, do you have an ICSP programmer?

Either use a bootloader like Jay suggested or an ICSP programmer like Lothar Stolz's ICD2 clone, which is great. But with the ICD2 you need to connect to at least PGC/PGD pins (RB6-RB7 on the PIC16), so make sure your circuit won't mess the programming signals (it's all explained how in the Appnote).

I've been using my ICD2 clone since my PIC beginnings, and I tend to take it for granted, so I kinda forgot I was actually using ICSP myself! :D
 
LVP is useles when it comes to ICSP, I say that all the time. I can't afford to loose one pin (PGM) just so that I can program without 13V on MCLR.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top