Miner PIC Robot

Miner PIC Robot Information

This page is for the Miner PIC Robot which was developed in 2018 to replace the PIC Simon Robot. It uses the same layout for switches, LEDs and motors as the PIC Simon Robot, but uses a PIC18F4550 microcontroller and a bootloader. Links for the datasheet for the microcontroller and the Microchip website are given below. The software for this board can be written using the MPLAB X Integrated Development Environment (IDE). The source code given below was written in C and compiled with the free version of the XC8 compiler. Both of these software packages can be downloaded for free from the Microchip website.

Miner PIC Robot Bootloader Information

The Miner PIC Robot uses a bootloader programmed into lower 8KB of Flash. This bootloader uses the UART and PC serial port to download the users programs. The Microchip Application Note 1310 explains how to use this bootloader and a zip file containing the PC program can be downloaded. When writing a program for this board, you must indicate to the compiler that the lower 8K of memory is not available. I recommend placing this line: "const char reserved_space[8208] @0x5FF0;" into your code. (This line is included in the "Simon_Robot.c" file.) This reserves 8KB + 16 bytes of code space so that when the project is compiled, none of the executable code will go into this area. The extra 16 bytes leaves room for a jump instruction that the PC download program adds to the code and places some zeroes in the code to create a gap so that you can see where your code ends and the bootloader begins. The Miner PIC Robot also has a programming connector at the rear of the robot to allow a PICkit3 or PICkit4 programmer/debugger to be connected to the board. This would allow the user to interface directly with MPLAB X and have the option of in-circuit debugging.

Microchip Website - http://www.microchip.com

Microcontroller Information Page - https://www.microchip.com/wwwproducts/en/PIC18F4550

PIC18F4550 Data Sheet - http://ww1.microchip.com/downloads/en/DeviceDoc/39632e.pdf

MPLAB X and XC8 Software Download Site - http://www.microchip.com/pagehandler/en-us/family/mplabx/

Link to Serial Bootloader Zip file - http://www.microchip.com/wwwappnotes/appnotes.aspx?appnote=en546974

The files given below are from the Cyber Miner Camp. The source code files end with .c or .h. The compiled "Simon" and "Miner_PIC_Robot" programs end with .hex. The "Miner_PIC_Robot.hex" uses the EEPROM to store the path that the robot follows. When downloading this program to the robot, make sure that the EEPROM box is checked under the write options in the settings dialog box. The .zip files are MPLAB X projects.