68HC11 PortC LEDs

Back to circuits & robots.

Last updated:

LED Wiring Diagram.

PORT C on the BOTBoard (called CN1 on the BOTBoard diagram) is an 8-bit digital bi-directional port.  The direction of each bit can be set to either input or output used the Data Direction Register for Port C (DDRC) located at adderss location $1007, where 0=input and 1=output for each bit.  The data (either input or output) is accesses at address $1003.  LEDs can be driven directly from PORT C by setting the data direction on all bits to be outputs (write the number $FF to address $1007).

The sample code below will light a single LED on Port C and will sweep the lit LED back and forth, two cycles per second.

The Code: cylon_c.asm