Programming the PIC|
| The PIC
on the FireBee motherboard is freely programmable and can be accessed by using an external computer and a PIC programmer device such as PICkit2 or other PIC programmer. |
| Safety precautions: |
- Before opening the FireBee case or touching the motherboard make sure that you are not electrostatical loaded. Ground yourself by touching the metal shield of a grounded electrical device, water pipe or the blank pipe of a wall radiator.
- Always power off the FireBee before connecting external devices. Check the correct wiring before starting any action!
- Linux- or Windows PC or Mac.
- PICkit2 or clone. A lot of other devices like e.g. the USB PIC Programmer can be found in the web. Please see connection details on Connector pinouts page
First make sure that your Bee is power off , better disconnect the power supply (the internal battery can stay connected). Then connect your PIC programming device to the PIC pinout header on motherboard
and verify that the wiring between programming device and FireBee pinheader
After that connect the USB cable from device to the remote computer.
On Linux (on Mac it may work similar), open the terminal (commandline shell). First check if the PICkit2 device is connected correct to USB host with the command
You should get a response similar to this:
Executable Version: 1.20.00
Device File Version: 1.55.00
OS Firmware Version: 2.32.00
Now check that the programmer is correctly connected to your Firebee and recognises the PIC:
The following is the correct response:
Auto-Detect: Found part PIC18F4520
And now it's time to flash the PIC:
| pk2cmd -PPIC18F4520 -M -F/home/Firebee/firebee_pic-20120308.hex |
Change the path to the firmware to the correct one on your system. For some reason pk2cmd needs a complete path, so "-Ffirebee_pic-20120308.hex" won't work even if you're in the same directory as the firmware.
When pk2cmd is finished you should verify that the programming went ok (again change the path to your needs):
| pk2cmd -PPIC18F4520 -Y -F/home/Firebee/firebee_pic-20120308.hex |
This will compare the specified file with the contents of the PIC's flash memory. You should now get this response:
PICkit 2 Verify Report
Device Type: PIC18F4520
If not (very unlikely), try programming the chip again (with an old stable version if another try fails).
Finally disconnect the PICkit2 device from FireBee and start the machine.
- All options of pk2cmd are displayed with command
- If you read out the current PIC content to a file (with option -GF), the length of the readout file and the original .hex file may differ. This is because pk2cmd ignores the control character "CR" in .hex files when flashing (FireBee PIC .hex files contain these) and so they are not present in a readout file from the PIC.
Programming the PIC under Windows
Connect PICkit2 to FireBee and to your Win* PC and start the PICkit2 software. You should get the message
| PICkit2 found and connected|
PIC device found
If not check the connections between PC/PICkit2/FireBee
The PIC should be listed as " Device: PIC18F4520 ", and only then you should click on Button "Auto Import Hex + Write Device" in the lower right corner. Select the pic*.hex file in the opening fileselector, after that click on OK and the programming procedure starts immediately.
If everything went correct the "message box" turns green and you´ll be prompted to click on the same button again to finish the operation.
That´s all, close the program and disconnect PICkit2 from the Bee, then you can start your FireBee again.
HTTP 521 Webserver is down - Hardware failure at firebee.org |
Maybe you have already noticed it: Some news, pages and downloads are no longer available. ...
GFA Basic Editor (GBE) v3.7 Released |
For those not aware, the original author of GFA Basic passed away in 2011. December ...
New AHCC version released |
After almost 3 years, Henk Robbers released version 6.0 of AHCC on November 27, 2020. ...