Developing custom firmware for the i/o explorer – Digilent 410-174P User Manual

Page 8

Advertising
background image

USB I/O Explorer Reference Manual

www.digilentinc.com

page 8 of 17

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

The AT90USB646 microcontroller has a single
TWI controller. This TWI controller is used to
provide the public DTWI (I2C) interface, and is
not used for the private I2C bus. The private
I2C bus is controlled using a ‘bit-banged’
software I2C implementation. Digilent provides
a reference design example as part of the I/O
Explorer support documentation to illustrate
this ‘bit-banged’ I2C implementation.

Developing Custom Firmware for
the I/O Explorer


Although the I/O Explorer is primarily intended
to function as a dedicated USB peripheral
device to provide I/O expansion capability for
PC application programs, it can also be used
as a microcontroller development platform to
run user developed custom firmware.

Connectors are provided for in-system-
programming and for debugging firmware
running on each microcontroller. Connectors
JP1 and J3 are the programming and
debugging connectors respectively for the
primary microcontroller, IC1, an Atmel
AT90USB646. Connectors JP2 and J6 are the
programming and debugging connectors
respectively for the secondary microcontroller,
IC2, an Atmel ATmega165P.

The programming connectors are intended for
use with a Digilent JTAG/SPI programming
cable, such as the Digilent JTAG-USB Full
Speed Module, although other programmers
can be used with a suitable connector adapter.
The debugging connectors are suitable for use
with an Atmel JTAG ICE mk II or an Atmel
AVR Dragon for in-system programming and
debugging.

In order to restore the I/O Explorer to its
original functionality after having programmed
it with custom firmware, it is necessary to re-
program the original firmware into whichever of
the two microcontrollers have been
programmed with custom firmware. Digilent
makes the factory firmware images available
as part of the support documents for the I/O
Explorer on the Digilent web site. There are

two firmware image files for each
microcontroller: one to restore the program
flash memory, and one to restore the
EEPROM. Both firmware images must be
programmed into the microcontroller.

The filenames for the firmware image files for
the primary microcontroller are of the form:
AvrFW_29_000003F2_XXXX.hex and
AvrFw_29_000003F2_XXXX.eep, where
“XXXX” represents the firmware version
number. The .hex file is the image for the
program flash, and the .eep file is the image for
the EEPROM. Similarly, the filenames for the
firmware image files for the secondary
microcontroller are of the form:
AvrFw_210174_0101_XXXX.hex and
AvrFw_210174_0101_XXXX.eep, where
“XXXX” represents the version number.

In order to completely restore the board to the
correct state for use as a Digilent Adept
Compatible USB device it is necessary to
restore the device serial number after
programming the firmware and EEPROM
images into the primary microcontroller. This is
accomplished using the AdeptUtil program that
is contained in the Adept Command Line
Utilities. These utility programs are installed
when the Adept Runtime System software is
installed. The correct device serial number is:
“210174nnnnnnnn”, where “nnnnnnnn” is the
last six digits of the bar code label attached to
the bottom of the board. After reprogramming
the firmware onto the primary microcontroller,
attach the board to a USB port on the PC, turn
it on, and then use the AdeptUtil program to
set the serial number. The device user name
will be the default name: “ioexp”.

Advertising