decorative bevel

2.3 Programming Pitfalls and Fuse Settings

Programming Pitfalls

Pin C6 may only be configured as an input. Do not output a signal(high or low) on pin C6.
Configuring C6 as an output will prevent downloading commands from reaching the Firmware, preventing reprograming of the Cerebellum over serial. If you output a signal on C6, you will need the Emergency Jumper to program.

Do not use enabled servo lines as Digital I/O.
The servo interrupt will hijack your I/O line regularly, causing unusual results. Disable the servo line first.

Consider programming a start button routine(such as waitforbutton() in the cereb 10 library) on actuated systems such as mobile robots.
Your code will begin executing as soon as you exit programming mode. Programming one of the buttons to be a start button by waiting for a button press at the beginning of your program gives you control over when your robot begins moving.

Fuses

The main processor in the Cerebellum supports a variety of configuration bits that are commonly referred to as 'fuses'. These set various features, such as oscillator selection, code protection, watchdog timer enable, etc. Due to the embedded nature of the processor in the Cerebellum, it is not recommended that you modify some of these.

In most PIC compilers, a #fuse direction generally allows you to set your fuses. If you use the Cerebellum 1.0 Library, it is not necessary to set the fuses, they are set for you.

Required Fuse Settings
  • Low-voltage programming - Enabled
  • Oscillator speed - High Speed
Disabling low-voltage programming will prevent the Cerebellum Firmware from being able to program the main processor! Do not under any circumstances disable low-voltage programming!
User Settable Fuses

Watchdog Timer
Set to 1 to enable, set to 0 to disable(most common).
Powerup Timer Enable
Set to 1 to disable(most common), set to 0 to enable.
Brownout Reset Enable
Set to 1 to enable(most common), set to 0 to disable.
0x3FFA is the most commonly used fuse configuration for Cerebellum operation.

Firmware Versions 1.03c+ prevent accidental misprogramming of the fuses. If your firmware is not current, it is strongly suggested that you update it to the most recent version for this protection.

For more information, see page 120 of the official reference.