beautypg.com

Programming considerations – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual

Page 92

background image

82

Serial I/O Models

Symbol Description

Minimum

Typical

Maximum

t

start

End of start condition

io_in()

io_out()

5.4 μs

5.4 μs

— —

t

cla

End of start to start of address

io_in()
io_out()

24.0 μs
24.0 μs

— —

t

cld

SCL low to data for io_out()

24.6 μs —

t

dch

Data to SCL high for io_out()

7.2 μs — —

t

chcl

Clock high to clock low for io_out()

12.6 μs —

t

chd

SCL high to data sampling for io_in()

13.2 μs —

t

dcl

Data sample to SCL low for io_in()

7.2 μs — —

t

clch

Clock low to clock high for io_in()

24.0 μs —

t

stop

Clock high to data

io_in()

io_out()

12.6 μs

12.6 μs

— —

t

ret

SDA high to return from function

io_in()
io_out()

— —

4.2 μs
4.2 μs

Programming Considerations

The i2c I/O object can be declared with pin IO_8 as the serial clock (SCL) line,

and pin IO_9 as the serial data (SDA) line, or it can be declared with pin IO_0 as
the serial clock line, and pin IO_1 as the serial data line. The Neuron Chip or

Smart Transceiver acts as a master only. Two external pull-ups are required,
and the interface is connected directly to the I/O pins. These I/O pins are

operated as open-drain devices in order to support the interface.
An i2c I/O object declared on pin IO_8 can be declared with the
use_stop_condition option keyword. This option allows for combined format data

transfers. For example, you can address and write to a peripheral device with

one or more io_out( ) calls with stop set to FALSE, followed by a call to io_out( )
with stop set to TRUE to finish the transfer with the STOP condition.
For all transfers, an I

2

C device address argument is required. This byte must be

the right-justified 7-bit I

2

C device address. Up to 255 bytes of data can be

transferred at a time. The address is written to the bus at the start of any

transfer, immediately following the I

2

C bus start condition. A count argument is

also required; this controls how many data bytes are to be written or read.