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.

Bootloader question

Status
Not open for further replies.

Oznog

Active Member
Well, I tried searching the forum and found too much junk and no particular answer. So I'll just ask.

I want to do a bootloader with the MAX232 with the PIC18. So I need to add the LVP option to the fuse bits, right?

I looked through the spec sheet and saw the LVP bit commits RB5 to "Controlling Program Mode Entry". But the MAX232 circuits I see connect to RC6/RC7, and don't seem to involve RB5 at all.

Am I wrong about the LVP bit? Does the bootloader somehow program without it? If not, how does the RB5 pin get handled?
 
You don't need the LVP option for the bootloader. The LVP option is for ICSP only and not for internally generated writes to program memory.
 
motion said:
You don't need the LVP option for the bootloader. The LVP option is for ICSP only and not for internally generated writes to program memory.

Not just for ICSP, for normal programming as well - but as you say, it's not relevent to a bootloader.
 
Nigel Goodwin said:
Not just for ICSP, for normal programming as well - but as you say, it's not relevent to a bootloader.

????
 
motion said:
Nigel Goodwin said:
Not just for ICSP, for normal programming as well - but as you say, it's not relevent to a bootloader.

????

ICSP (In Circuit Serial Programming) refers to programming a PIC 'in circuit', you can do this with either LVP (low voltage programming) or with normal 'high voltage' programming.

Also, a 'normal' programmer (where you plug the PIC into the programmer) can use either LVP or 'high voltage' programming in just the same way - it's not exclusive to ICSP, which your original answer gave the impression of.
 
Also, a 'normal' programmer (where you plug the PIC into the programmer) can use either LVP or 'high voltage' programming in just the same way - it's not exclusive to ICSP, which your original answer gave the impression of.

"Normal programming" that you refer to uses the ICSP algorithm even if it is not programmed in the circuit. That is why I don't differentiate "normal programming" from ICSP. All of them are ICSP. Besides, if you read the PIC16F87X datasheet, it reads:

LVP: Low Voltage In-Circuit Serial Programming Enable bit

I have a PICSTart and I can program in-circuit by simply bringing out the ICSP signals MCLR, RB6, RB7 from the programmer's socket to the target's PCB.

Maybe I am unaware of a PIC device that can do the old parallel programming algorithm using the LVP option in the configuration fuses. Can you give me that device?
 
motion said:
"Normal programming" that you refer to uses the ICSP algorithm even if it is not programmed in the circuit. That is why I don't differentiate "normal programming" from ICSP. All of them are ICSP.

You've really got that the wrong way round, both methods are 'serial programming', only one is 'in circuit' - so I consider it's important to differentiate between them. Particularly when you're giving advise in a forum, you knew what you meant, and so did I - but many users of this forum probably wouldn't, so it's far more helpful to give the correct information to avoid confusion.
 
You've really got that the wrong way round, both methods are 'serial programming', only one is 'in circuit' - so I consider it's important to differentiate between them. Particularly when you're giving advise in a forum, you knew what you meant, and so did I - but many users of this forum probably wouldn't, so it's far more helpful to give the correct information to avoid confusion.

Before I made a post, I had checked the datasheet. And on that basis, I make a definitive answer. As to whose statement is more confusing is debatable. At least, I have a datasheet to back me up.
 
You've really got that the wrong way round, both methods are 'serial programming', only one is 'in circuit' - so I consider it's important to differentiate between them. Particularly when you're giving advise in a forum, you knew what you meant, and so did I - but many users of this forum probably wouldn't, so it's far more helpful to give the correct information to avoid confusion.

If you read my earlier post carefully, I said that LVP is for ICSP not "in-circuit". Those letters refer to a specific algorithm not the physical way the PIC is positioned when it is programmed. IMHO, you got it the wrong way.
 
BTW, I figured it out on the first reply...

From what I figured out about the LVP, you don't use high voltage on the MCLR_n pin but you have to use RB5 to control programming, and it can't be recommitted during code execution. As long as the LVP fuse bit is set, the pin's committed to this job. Losing an otherwise useful pin is probably why this doesn't get used much.
 
motion said:
If you read my earlier post carefully, I said that LVP is for ICSP not "in-circuit". Those letters refer to a specific algorithm not the physical way the PIC is positioned when it is programmed. IMHO, you got it the wrong way.

A quick look in the 16F628 datasheet finds this line "This feature, along with Microchip’s In-Circuit Serial Programming (ICSP) protocol". This is the only reference to what ICSP stands for in the entire datasheet, and clearly states the 'IC' is in-circuit.

In any case, Oznog understood it anyway, so it doesn't really matter - and, like Oznog, I find the LVP generally a waste of time (and pins). Obviously it has got good useful applications, but I think these are fairly uncommon?.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top