PDA

View Full Version : Very rookie question



dmairspotter
- 6th October 2005, 21:49
Question about bootloaders. If I'm programming using the EPIC programmer and ICSP connection, do I have to have a bootloader loaded? Do I have to use the

DEFINE Loader_used 1

statement?

I'm having a hard time finding basic info on the bootloader concept.

I'm using PBP/MCSP/Epic on 16F876 and 877A parts (trying to, anyway)

Thanks

Sphere
- 6th October 2005, 22:10
Its yes to both your questions. Ive just started to play with boot loaders myself.

Sphere...

mister_e
- 7th October 2005, 02:03
Let's make things clear...

Once you load the Bootloader firmware in the PIC using ICSP with EPIC.. you'll no longer need the EPIC... just the Bootloader circuit in the MCS Help File. You'll program your PIC with that circuit Via your RS-232 (DB9) Pc connector.

Yes you'll need to use DEFINE BOOTLOADER_USED 1 line at the top of your code if you use Bootloader... not if you use ICSP with EPIC

Mike_Lynch
- 7th October 2005, 03:55
There are three ways to get a compiled program (hex file) into a Pic chip using a EPIC Progammer

1.)Plug the chip into the programmer board, this assumes that the chip is compatable with the board, i.e. Pin count and pin layout see MElabs website for information.

2.)Using an adapter which is intended to plug into the 10 pin header on the EPIC board, these adapters are sold by Melabs for use with chips which are either not physically able to plug into the socket on the EPIC board or the chip has a pin layout that is different than the PIC16F84(A)

3.) The 10 pin “ICSP” In Circuit Serial Programming header, the header carries the same signals that the 18 pin on board socket uses, 5V+, Vpp (goes to MCLR), PGD (Programming data goes to RB7, Pin 13 on PIC16F84(A) ), PGC (Programming Clock goes to RB6, Pin 12 on PIC16F84(A)) and GND.
See http://www.melabs.com/support/icsp.htm

This type of Programming DOES NOT require the use of bootloader or the use of DEFINE Loader_used 1

Bootloading is a different animal, in short it is composed of two pieces of software one which goes on a PC and allows you to program a PIC using only a SERIAL connection between the PC and the PIC. The second piece of software gets programmed into the PIC and thereafter allows the PIC to be programmed thru the PIC’s USART. Not ALL PICs have the required built in hardware to be compatable with a Bootloader. Only programs which are being loaded, burned, programmed into a PIC by way of a bootloader would require DEFINE Loader_used 1

dmairspotter
- 7th October 2005, 14:40
Thanks Mike. I use the EPIC and have designed my circuit boards with the 10 pin header for programming.

If I maintain this setup, I understand that the bootlader is not required.

Thanks for the tutorial.

Duncan