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

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
Get Port
The identifier GETPORT (0x9C) retrieves value of a port.
Byte 1 indicates the port (A=1, B=2…). Byte 3 specifies
which bits should be set as outputs (‘0’) and which bits
should be set as inputs (‘1’). The response is the same
as the command, except the port value is given in byte 2.
Example:
Set Port
The identifier SETPORT (0x9D) sets the value of a port
output latch. Byte 1 indicates the port (A=1, B=2…).
Byte 2 specifies the new value. Byte 3 specifies which
bits should be set as outputs (‘0’) and which bits should
be set as inputs (‘1’). The response is the same as the
command.
Example:
Get Port Bit
The identifier GETPORTBIT (0x9E) retrieves a single bit
from a port. Byte 1 indicates the port (A=1, B=2…) and
byte 2 indicates the bit (0-7). Byte 3 is 0 if the bit should
be configured as an output and 1 if it should be
configured as an input. In the response, byte 3 is 0 for
clear and 1 for set.
Example:
Set Port Bit
The identifier SETPORTBIT (0x9F) sets or clears a
single bit of a port output latch. Byte 1 indicates the port
(A=1, B=2…) and byte 2 indicates the bit (0-7). Byte 3
bit 0 is 0 for clear and 1 for set. Byte 3 bit 1 is 0 if the bit
should be configured as an output and 1 if it should be
configured as an input. The response is the same as
the command.
Get Analog
The identifier GETANALOG (0x96) retrieves the voltage
of an analog pin. Byte 1 bits 0-3 indicate which analog
pin (AN0 = 0, etc). Byte 1 bit 4 is 1 if AN3 should be
used as a positive voltage reference (Vref+), or Vdd /
AVdd otherwise. Byte 1 bit 5 is 1 if AN2 should be used
as a negative voltage reference (Vref-) or Vss / AVss
otherwise. In the response the analog value is in bytes
2 (MSB) and 3 (LSB). The value ranges from 0x000
(Vss / AVss / Vref-) to 0x3FF (Vdd / AVdd / Vref+).
p6
9C 02 00 FF
9D 02 54 00
9E 02 03 01
9F 02 03 01
9B F0 06 01 Response – Bit set
9C 02 54 FF Response – Value is 0x54
9D 02 54 00 Response – Value set
9E 02 03 01 Response – Value is 0x01
9F 02 03 01 Response – Bit set
Command – Get Port B, all inputs
Command – Set Port B to 0x54
Command – Get Port input bit B3
Command – Set Port bit B3 to output
22-Nov-10
all outputs
0x01
expandIO-USB
While making the analog measurement on an analog pin,
any analog pins with index lower than the pin being
measured will temporarily enter a high-impedance state.
Example:
SetSerial
(18F2450, 18F4450 support UNI/O only, not SPI / I2C.)
The
synchronous serial SPI/I2C port or, from rev 0008, a
UNI/O bus.
Only one of SPI port or one I2C port can be configured.
The MSSP resource is used.
In the equations below Fo = 24MHz for expandIO-USB
and 48MHz for USB-XP.
SPI: If byte 1, bits 1 and 0 are 00, the MSSP port is
configured for SPI operation. The SDO pin shown in the
pin diagrams becomes the master output (MOSI), SDI
pin becomes the master input (MISO), and SCLK
becomes the synchronous clock.
must be implemented separately using Set Port Bit
commands.
implemented separately using the Set Port Bit command.
The data bytes are defined as follows:
Byte 1 specifies the settings for the SSPSTAT register
as follows:
Byte 2 specifies the settings for the SSPCON1 register
as follows:
Examples:
UNI/O: (From rev 8) If byte 1, bits 1 and 0 are 10, the
port is configured for UNI/O operation.
Byte 2 indicates the desired bus frequency as specified
as follows:
96 16 00 00
93 80 30
93 80 20
93 C0 30
93 C0 20
In all cases the response is a repeat of the command.
96 16 02 36
Bit 7: Sample data at end (1) or middle (0) of the
clock cycle.
Bit 6: Transmit on active to idle (1) or idle to active
(0) clock transition (‘CKE’)
Other bits: Must be set to zero
Bit 5: Enable (1) or disable (0) SPI port.
Bit 4: Clock polarity: idle state is at high (1) or low
(0) level (‘CKP’)
Bits 1, 0: Clock speed is TMR2  2 (11), Fo  64 (10),
Fo  16 (01) or Fo  4 (00).
Other bits: Must be set to zero
HW148-18
identifier
(Bus Freq) = 3 / 2 / (Byte2)
Any
SETSERIAL
Command: Get AN6 using Vref+
Response: V = Vref+ * (0x236/0x3FF)
Init fast Mode A (CPOL=1, CPHA = 1)
Init fast Mode B (CPOL=0, CPHA = 1)
Init fast Mode C (CPOL=1, CPHA = 0)
Init fast Mode D (CPOL=0, CPHA = 0)
slave
select
(0x93)
www.firmwarefactory.com
Slave select lines
lines
initializes
must
the
be

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