Bootloader for PIC18F6622

Thread Starter

bluestreakG1

Joined Aug 22, 2017
23
Hello. I am trying to program PIC18F6622 using UART. My computer cannot detect the PIC18F6622. I think it requires the bootloader. Where can I get the bootloader for PIC18F6622?

Thank you.
 

jpanhalt

Joined Jan 18, 2008
11,087
The 18F6622 may differ from earlier 18F devices to which that application note applies. It has a protected block of memory for a bootloader (aka "Boot Block" mode).

Here's the datasheet: http://ww1.microchip.com/downloads/en/devicedoc/39646b.pdf Search on "boot block," not bootloader for details. I neither use the 18F nor bootloading, so I cannot give any personal experience with that newer chip.

Source=datasheet
PIC18F8527/8622/8627/8722 devices differ significantly from their PIC18 predecessors in their utilization of program memory. In addition to available on-chip Flash program memory, these controllers can also address up to 2 Mbytes of external program memory through the external memory interface. There are four distinct operating modes available to the controllers: • Microprocessor (MP) • Microprocessor with Boot Block (MPBB) • Extended Microcontroller (EMC) • Microcontroller (MC)
 

jpanhalt

Joined Jan 18, 2008
11,087
@ErnieM
Yes, I believe one does need to load the boot loader code. However, unlike earlier 18F devices, one does not need to add code to re-vector the interrupt space. The 18F6622 comes default with 1K words (2K bytes) of bootloader (boot block) memory by default (Table 25.1) :

1602150379775.png
 

atferrari

Joined Jan 6, 2004
4,764
Chiming in just to pose a question on this matter and vanish after. Promise.

What are good examples where the use of a bootloader is actually convenient? Never dealt with one.
 

jpanhalt

Joined Jan 18, 2008
11,087
Chiming in just to pose a question on this matter and vanish after. Promise.

What are good examples where the use of a bootloader is actually convenient? Never dealt with one.
My example would be when switching to a new MCU for which one doesn't have a programmer or IDE. For example, last Spring, I got a T-962 reflow oven. The stock firmware has some issues and does not use a good temperature reference for the thermocouples. Fortunately, there are modifications on the web that use a Maxim 1-wire temperature reference. The MCU is an NXP LPC21xx for which I had no programmer, but it has a bootloader from the vendor. I used FlashMagic to program it.
 

John P

Joined Oct 14, 2008
2,025
What a question! If you habitually work on projects where you have a PC communicating with a processor over a serial port, a bootloader is a huge convenience. Just connect one cable from computer to processor, and your system is up and running. When you need to change the program--an incremental change or a shift to a whole new project--a few taps on the keyboard and the job is done, and your new code is in place. For a long time my usual processor was the PIC16F690, and it was a pretty versatile little thing, but it was always annoying to have to plug in a programming setup every time I changed the code. Now I'm using the PIC16F18345 with a bootloader, and I'm really glad to be able to get some stuff off my workbench!
 

ErnieM

Joined Apr 24, 2011
8,377
What are good examples where the use of a bootloader is actually convenient? Never dealt with one.
I used a bootloader on a PIC32 project where it would load a program I called "Program Manager" which would list other available programs kept on it's SD card to a graphic touchscreen.

Programs written for this could chain back to ProgMan, otherwise you could do a reboot to reload the same.
 
Top