User i/o devices, Cpu clock source – Digilent 410-173-KIT User Manual
Page 7

Cerebot 32MX4 Reference Manual
www.digilentinc.com
page 7 of 15
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
off-board applications. The DAC output signal
is also available at the center, DAC, position of
J16. Placing a shorting block at this position
connects the DAC output to the
VBUSON/C1IN+/AN5/CN7/RB5 pin (pin 20) on
the PIC32MX460 microcontroller. One of the
functions for this pin is as one of the inputs to
analog comparator #1 on the PIC32 part. This
allows the output of the DAC to be used as a
programmable reference voltage for the
comparator.
User I/O Devices
The Cerebot 32MX4 board provides two push
button switches for user input and four LEDs
for output. The buttons, BTN1 and BTN2 are
connected to I/O pins TRCLK/RA6 and
TRD3/RA7 respectively. To read the buttons,
bits 6 and 7 of PORTA must be set as inputs
by setting the corresponding bits in the TRISA
register and then reading the PORTA register.
When a button is pressed, the corresponding
bit will be high (‘1’).
The four LEDs are connected to bits 10-13 of
PORTB. LED 1 is connected to bit 10, LED 2 is
connected to bit 11, and so on. These four bits
are also shared with pins 1-4 of Pmod
connector JK. To use the LEDs, set the
desired bits as outputs by clearing the
corresponding bits in the TRISB register and
set the bits to the desired value in the PORTB
register. Setting a bit to 1 will illuminate the
LED and setting the bit to 0 will turn it off.
CPU Clock Source
The PIC32 microcontroller supports numerous
clock source options for the main processor
operating clock. The Cerebot 32MX4 board is
designed to support either a silicon resonator
from Discera for use with the EC oscillator
option, or an external crystal for use with the
XT oscillator option. Standard production
boards will have an 8Mhz Discera silicon
resonator loaded and the EC oscillator option
should be used.
Using the internal system clock phase-locked
loop (PLL), it is possible to select numerous
multiples or divisions of the 8Mhz oscillator to
produce CPU operating frequencies up to
80Mhz.