

The Cerebellum has fourteen digital I/O ports, D0-D7, PWM1, PWM2, and B0, B2, B4, and B5. Each of these pins also has additional functions associated with them.
D-port Digital I/O
The D port is a byte wide digital I/O port, capable of byte-write and read operations. The ports are also commonly used for hobby servo control, and therefore have an associated power bus with voltage jumper-selectable by the user. Read more about the specifics of using the servos with Cerebellum in the servos section.PWM ports
The PWM1 and PWM2 ports are multi-use ports, which are user accessible but are also used to control DC motors through the Cerebellum's H-bridge. They can be used as digital I/O, capture compare ports, or pulse width modulated outputs. Pulse width modulated signals are commonly used to control both hobby servos, and through H-bridges, DC motors. Additionally, they can be used to capture pulse width modulated signals from other devices, such as RC car controllers.![]() | Do not use the PWM ports as inputs or capture compare ports if you are driving motors with the Cerebellum H-bridge. As a safety precaution, disconnect power to the H-bridge when using the PWM ports as inputs by removing the motor power jumper without connecting an external supply for motor power. Driving the PWM1 or PWM2 ports while motors and motor power are connected will result in faulty H-bridge operation. |
B ports
The B ports are tied to the user LEDs and buttons, and are also pinned out to provide the user with several interruptible ports. These pins are not typically used as servo ports, and so the power bus associated with them is the Cerebellum's regulated 5V.The B0 and B2 pins are tied to the Cerebellum's user LEDs. B0 is the PIC general interrupt pin, and B2 is a standard digital I/O port. To use these pin as inputs, it is necessary to consider the loading of the LED circuit - therefore the external circuitry driving the B0 or B2 pins must source at least 10 mA. Driving B0 or B2 high will turn on the green or yellow LEDs.
The B4 and B5 pins are interrupt-on-change pins that are also tied to the Cerebellum's buttons. These pins can be used as inputs or outputs with only one restriction - if using these pins as outputs, do not depress the buttons, as it will set your output signal high.
Additional Digital I/O ports
If more than 14 digital I/O ports are required for your application, you may also use the analog inputs. Information about configuring the analog ports as digital I/O can be found in the analog inputs section.Digital I/O port electrical specifications
| Parameter | Min | Max | Units |
| Input Low Voltage | 0 | 0.8 | Volts |
| Input High Voltage | 4.0 | 5 | Volts |
| Output Low Voltage | 0 | 0.6 | Volts |
| Output High Voltage | 4.3 | 5 | Volts |
| Single I/O Pin Source Current | 0 | 25 | Milliamps |
| Single I/O Pin Sink Current | 0 | 25 | Milliamps |
| Total PortA, PortE, and PortB source current (combined) | - | 200 | Milliamps |
| Total PortC and PortD source current (combined) | - | 200 | Milliamps |
| Total PortA, PortE, and PortB sink current (combined) | - | 200 | Milliamps |
| Total PortC and PortD sink current (combined) | - | 200 | Milliamps |
|
|


