Avr clock fuse settings, Two wire serial interface – Digilent Minicon User Manual
Page 5

Digilent, Inc.
Minicon Reference Manual
www.digilentinc.com
www.digilentinc.com
page 5 of 8
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
documentation for these applications for
more information on board programming.
Connector J1 is used both for in-system
programming and for user access to the
SPI controller. The jumper block JP10 is
used to select between the two functions.
The shorting block is placed in the RST
position for in-system programming, and in
the SS position for user access to the SPI
port.
AVR Clock Fuse Settings
AVR microcontrollers use control bits
called fuses to set basic operating
parameters for the device. The SPI
controller uses the clock source set by the
fuses for its clock. If the clock source fuses
are set to select a clock source that doesn’t
exist on the board, the SPI controller won’t
work and it will no longer be possible to
program the microcontroller via the in-
system programming protocol. The Minicon
can only use of the internal RC oscillator
as the clock source.
If the external oscillator, or one of the
crystal/resonator clock sources is selected,
it may be possible to recover the board by
applying a suitable clock signal to pin 1 of
connector JP5. Pin 1 is the end closer to
resistor R29. There is an applications note
on the Digilent web site illustrating this
technique for the Cerebot board.
In addition, the maximum SPI clock
frequency is the selected clock frequency
divided by four. If the 128KHz internal
oscillator is selected as the clock source,
the SPI clock would need to be set to a
frequence of 32KHz or less. The Digilent
programming cables do no support
frequencies that low, so if the 128KHz
internal oscillator is selected for the clock
source, the board will no longer be
programmable using the Digilent
programming cable.
Two Wire Serial Interface
The Atmel TWI interface is a medium
speed (400 Kbps), synchronous, serial,
communications bus. The TWI interface
supports master or slave operation with up
to 128 devices on the bus. Each device is
given a unique address, and the protocol
has the ability to address packets to a
specific device or to broadcast packets to
all devices on the bus. For detailed
information on configuring and using the
two wire interface, see the ATmega168
data sheet at
www.atmel.com
.
The Minicon has two ways to connect to a
TWI bus. The TWI signals, SCL and SDA,
are available on 6-pin connector J2, or on
the TWI daisy chain connector J4.
Connector J4 has two positions for
connecting to the TWI signals. By using
two-wire cables (available separately from
Digilent), a daisy chain of Minicons or other
TWI-capable boards can be created.
The TWI bus is an open-collector bus.
Devices on the bus actively drive the
signals low. When no device is driving the
lines low, pull-up resistors achieve the high
state on the TWI lines. A single device on
the TWI bus must provide the pull-up
resistors.
The Minicon board has pull-up resistors
that can be enabled or disabled via
shorting blocks on the P1 and P2 positions
on J4. The pull-ups are enabled by
installing shorting blocks on P1 and P2,
and are disabled by removing the shorting
blocks. Both pull-ups should be enabled or
disabled together. Only one device on the
bus should have the pull-ups enabled.