MPLAB Starter Kit for PIC18F User’s Guide
DS51852A-page 10
©
2009 Microchip Technology Inc.
When the MicroSD bootloader starts, it initializes the capacitive touch routines and the
OLED display. It then monitors for a MicroSD memory card insertion. When an insert
event is detected by the bootloader, the MDD file system is initialized and the file structure
is displayed on the OLED. Note that only folders and HEX files will be displayed.
The user can press the
Up
and
Down
buttons to select a specific file or folder. Pressing
the
Accept
button when a folder is selected causes the bootloader to display the con-
tent of that specific folder on the OLED. To move one level up in the directory hierarchy,
either press the
Cancel
(
Left
) button, or press the
Accept
button when the “..” folder
is selected.
When a HEX file is selected and the
Accept
(
Right
) button is pressed, the MicroSD
bootloader will prompt the user for a confirmation to load the file from the MicroSD
memory card and program it to the microcontroller’s Flash memory. After this operation
is finished, the user may choose to execute that application or to remain in the
bootloader.
If the
Cancel
button is pressed in the root directory, the MicroSD bootloader terminates.
The last application programmed into the microcontroller is then executed.
Figure 2-2 shows a typical sequence of OLED messages from the bootloader
initialization through the loading of an application (read from top left to bottom right).
FIGURE 2-2:
TYPICAL SEQUENCE FOR BOOTLOADER MESSAGES
2.1.1
Memory Organization
The first 40 Kbytes of Flash program memory are used by the MicroSD bootloader.
Figure 2-3 shows the memory map of the PIC18F46J50. The application code must
ensure that the boot area is not overwritten.
2.1.2
Remapped Vectors
Since the hardware Reset and interrupt vectors lie within the boot area, they are
remapped through software to the beginning of the user memory space. Remapping is
simply a branch for interrupts; users may observe an additional latency of two
instruction cycles to handle interrupts.
Microchip
PIC18F Starter Kit
Press S1 to load the
SD Bootloader
9
Card not detected!
Please insert a valid
MicroSD card to
continue
>>HIDDEMO
CDC_DEMO.HEX
MSD_DEMO.HEX
>>.
..
MOUSE ~1.HEX
JOYSTI~1.HEX
The following demo
will be loaded:
Press the R button
to accept, or the
L button to cancel
CUSTOM~1.HEX
CUSTOM.HEX
Application image
has been loaded.
Press the R button to
start the application
or L button to cancel
file: CUSTOM.HEX
Use ‘up’ and ‘down’
buttons to navigate.
button to select a
Press menu button to
continue
Press the ‘accept’
file.
File is loading.
Please wait.
Mouse Demo v1.0
PIC18F Starter Kit
Press Menu to proceed
Summary of Contents for MPLAB
Page 1: ...2009 Microchip Technology Inc DS51852A MPLAB Starter Kit for PIC18F User s Guide...
Page 4: ...MPLAB Starter Kit for PIC18F User s Guide DS51852A page iv 2009 Microchip Technology Inc NOTES...
Page 10: ...MPLAB Starter Kit for PIC18F User s Guide DS51852A page 6 2009 Microchip Technology Inc NOTES...
Page 32: ...MPLAB Starter Kit for PIC18F User s Guide DS51852A page 28 2009 Microchip Technology Inc NOTES...
Page 42: ...MPLAB Starter Kit for PIC18F User s Guide DS51852A page 38 2009 Microchip Technology Inc NOTES...
Page 45: ...Index 2009 Microchip Technology Inc DS51852A page 41 NOTES...