ABL electronic PIC12 Personal Computer User Manual


 
mikroBootloader
mikroBootloader can be used only with PICmicros that support flash write.
1. Load the PIC with the appropriate hex file using the conventional programming
techniques (e.g. for PIC16F877A use p16f877a.hex).
2. Start mikroBootloader from the drop-down menu Tools > Bootoader.
3. Click on Setup Port and select the COM port that will be used. Make sure that
BAUD is set to 9600 Kpbs.
4. Click on Open File and select the HEX file you would like to upload.
5. Since the bootcode in the PIC only gives the computer 4-5 sec to connect, you
should reset the PIC and then click on the Connect button within 4-5 seconds.
6. The last line in then history window should now read “Connected”.
7. To start the upload, just click on the Start Bootloader button.
8. Your program will written to the PIC flash. Bootloader will report an errors that
may occur.
9. Reset your PIC and start to execute.
The boot code gives the computer 5 seconds to get connected to it. If not, it starts
running the existing user code. If there is a new user code to be downloaded, the
boot code receives and writes the data into program memory.
The more common features a bootloader may have are listed below:
- Code at the Reset location.
- Code elsewhere in a small area of memory.
- Checks to see if the user wants new user code to be loaded.
- Starts execution of the user code if no new user code is to be loaded.
- Receives new user code via a communication channel if code is to be loaded.
- Programs the new user code into memory.
Integrating User Code and Boot Code
The boot code almost always uses the Reset location and some additional program
memory. It is a simple piece of code that does not need to use interrupts; therefore,
the user code can use the normal interrupt vector at 0x0004. The boot code must
avoid using the interrupt vector, so it should have a program branch in the address
range 0x0000 to 0x0003. The boot code must be programmed into memory using
conventional programming techniques, and the configuration bits must be pro-
grammed at this time. The boot code is unable to access the configuration bits,
since they are not mapped into the program memory space.
MikroElektronika:
Development
tools
-
Books
-
Compilers
17
page
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...