EXPANDIO-USB-FS-DIL-28 Flexipanel, EXPANDIO-USB-FS-DIL-28 Datasheet - Page 7

no-image

EXPANDIO-USB-FS-DIL-28

Manufacturer Part Number
EXPANDIO-USB-FS-DIL-28
Description
USB Interface IC Driver-free USB I/O- expander
Manufacturer
Flexipanel
Series
expandIO-USB™r
Datasheet

Specifications of EXPANDIO-USB-FS-DIL-28

Interface
USB
Number Of I /o
21
Interrupt Output
No
Frequency - Clock
375kHz
Voltage - Supply
2.7 V ~ 5.5 V
Operating Temperature
-40°C ~ 85°C
Mounting Type
Through Hole
Package / Case
28-DIP
Includes
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
i.e.
The lowest permitted value is 0x0F, giving a maximum
bus frequency of 93.75kHz for expandIO-USB and
125kHz for USB-XP.
Byte 3 bits 7-4 indicate the port (A=0001, B=0010…)
and byte 2 bits 2-0 indicate the bit (0-7) to be used as
the SCIO pin.
Multiple UNI/O buses can be implemented on separate
I/O buses. This is useful for avoiding address conflicts,
is subject to the restriction that the frequency of all
buses will be equal to that specified by the most recent
Set Serial command. The TMR1 and CCP1 resources
are used.
I2C: If byte 1 bit 0 is one, the MSSP port is configured
for I2C operation.
becomes the master clock and the SDA pin becomes
the bidirectional data line. Both should be pulled up by
4k7 resistors to Vdd.
Byte 1 bit 1 specifies whether the slew rate control is
disabled (1, for 100kHz and 1MHz operation) or enabled
(0, for 400kHz operation).
Byte 2 specifies the clock baud rate, as given by the
following formula:
Example using expandIO-USB:
Execute SPI
The identifier EXESPI (0xAF) cycles data through the
SPI port. In the command, byte 1 is the number of bytes
to be exchanged and bytes 2 onwards are the data to
send to the slave device. In the response, byte 1 is the
number of bytes that were exchanged and bytes 2
onwards are the data received from the slave device.
The EXESPI command and response are not limited to
4 bytes in length. They may use as many bytes in the
report as required. If the total length of the command is
greater than 4 bytes, they must be the first and only
command/response in the report.
Example:
(From rev 0009 only.) If byte 1 bit 7 is set, two bytes are
appended to the end of the command. These are
appended to the end of the response, allowing the PC to
easily match command / response pairs.
Execute UNI/O
(From revision 0008 only.)
The identifier EXEUNIO (0xB0) engages in UNI/O
communication with a slave device connected to the
SCIO pin indicated by byte 1. (Bits 7-4 indicate the port
(A=0001, B=0010…) and bits 2-0 indicate the bit (0-7) to
p7
93 01 3B 00
AF 03 45 67 00
AF 03 00 00 89 Response: Slave sent 00 00 89
93 01 3B 00 Response: OK
(Byte2) = 3 / 2 / (Bus Freq)
Command: I2C on, no slew, 100kHz
22-Nov-10
F
O
Command: Send 45 67 00 to slave
The SCL pin in the pin diagrams
/(4 * (Byte2 + 1))
expandIO-USB
be used as the SCIO pin. The other bits should be set
to zero.) ‘Hold mode’ is not required of slave devices.
Bytes 2 and 3 are the slave device address. For 8-bit
addresses, byte 2 should be zero and byte 3 should be
the entire slave address. For 12-bit addresses, byte 2
bits 0:3 should be the device high address (i.e. device
family), byte 2 bits 4..7 should all be set to ‘1’, and byte
3 should be the device code.
If byte 5 bit 7 is set, no UNI/O command is sent and only
a device poll is performed. If byte 5 bit 7 is clear, Byte 4
is the UNI/O command.
Byte 5 bits 5-0 are the number of bytes to write
immediately after the UNI/O command. The actual data
bytes are given in bytes 7 onwards. Byte 5 bit 6 is 1 if a
600μs standby pulse is not required prior to sending the
UNI/O command.
command immediately follows another to be transmitted
to the same device.
Byte 6 bits 5-0 are the number of bytes to read after the
data bytes have been written. If byte 6 bit 7 is non-zero,
the device will enter a 250-bus-clock-cycle device hold
state prior to all Master Acknowledge bits, e.g. approx
25ms for 10kHz clock.
In the response, byte 1 is a status value as shown in
table 6, and bytes 2 onwards are the data received from
the slave device. expandIO-USB will acknowledge all
but the last data byte received.
Interrupts
EXEUNIO commands. If byte 6 bit 6 is non-zero then all
interrupt-on-change flags (INTxIF / RBIF / RABIF) flags
are cleared immediately prior to re-enabling interrupts,
and the SCIO line operates as an input when
transmission of the command is complete.
In order to accommodate interrupt pulses the master will
always ensure the SCIO line has been high for at least
600μs before starting transmission, and the initial pulse
of the start header T
byte 1 bit 3 is non-zero, the start header initial pulse is
extended to 100ms.
Slaves generate interrupts by pulsing SCIO low.
detect these interrupt pulses:
1. Select an SCIO I/O pin that has interrupt capability.
2. Ensure SCIO has a weak pull-up resistor (e.g. 22k).
3. Ensure byte 6 bit 6 was set in the preceding
4. Clear the interrupt flag and enable the interrupt.
5. When an INTERRUPT (0x95) message is received,
6. Repeat from step 2.
EXEUNIO command
poll all devices that could have generated the
interrupt to identify which device generated the
interrupt.
HW148-18
Value
00
03
are
Table 6. UNI/O status values
disabled
This bit should only be set if this
HDR
No slave acknowledge received
will be a minimum of15μs. If
during
Meaning
Success
www.firmwarefactory.com
the
execution
To
of

Related parts for EXPANDIO-USB-FS-DIL-28