User i/o devices – Digilent Cerebot Plus Board User Manual
Page 7
Digilent Cerebot Plus Reference Manual
Digilent, Inc.
www.digilentinc.com
page 7 of 13
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
User I/O Devices
The Cerebot Plus board has a two-position
jumper for user input and four LEDs for output.
The user input jumper, JP5, is connected to I/O
port G, bit 4. To read this jumper, bit 4 of port
G must be set as an input by clearing bit 4 in
the port G data direction register (DDRG) and
reading the pin register for port G (PING).
When the shorting block is in the ‘0’ position,
bit 4 in the pin register will be 0. When the
shorting block is in the ‘1’ position, bit 4 will be
1.
The four LEDs are connected to bits 4-7 of I/O
port E. LED 1 is connected to bit 4, LED 2 is
connected to bit 5, and so on. These four bits
are also shared with the four I/O signals on
Pmod connector JF. To use the LEDs, set the
desired bits as outputs by setting the
corresponding bits in the port E data direction
register (DDRE) and set the bits to the desired
level in the port E output register (PORTE).
Setting a bit to 1 will illuminate the LED and
setting the bit to 0 will turn it off.