background image

USB Smart I/O

 

Trademarks & Copyright

I

2

C is a Registered Trademark of Philips Semiconductors.

AT, IBM, and PC are trademarks of International Business Machines Corporation.
Pentium is a registered trademark of Intel Corporation.
Windows is a registered trademark of Microsoft Corporation.
HyperTerminal is copyright by Microsoft Corporation and Hilgraeve Inc.
Borland Delphi is copyright by Borland Software Corporation.

Summary of Contents for PC-Link

Page 1: ... are trademarks of International Business Machines Corporation Pentium is a registered trademark of Intel Corporation Windows is a registered trademark of Microsoft Corporation HyperTerminal is copyright by Microsoft Corporation and Hilgraeve Inc Borland Delphi is copyright by Borland Software Corporation ...

Page 2: ...11 3 2 8 Set Byte 11 3 2 9 Get Byte 12 3 2 10 Get ADC 12 3 2 11 Set Bit Rate 12 3 2 12 Get Bit Rate 13 3 2 13 I2C Start 13 3 2 14 I2C Write 13 3 2 15 I2C Read 14 3 2 16 I2C Stop 14 3 2 17 I2C Send Packet 14 3 2 18 I2C Get Packet 15 3 2 19 Set Baud Rate 15 3 2 20 Get Baud Rate 16 3 2 21 Send UART 16 3 2 22 Get UART 16 3 2 23 Send DAC 17 3 2 24 Stop Counter 17 3 2 25 Start Counter 18 3 2 26 Get Coun...

Page 3: ...t internal pull up resistors There are 5 general purpose pins that can be utilized as digital outputs or digital inputs with or without internal pull up resistors Equipped with an 8 bit DAC Digital to Analog Converter with rail to rail capabilities 0 5 1 VDC Equipped with I2 C interface with bit rate between 30 400 kHz default is 50 kHz Module acts as master I2 C send buffer is 35 bytes and receiv...

Page 4: ... for power supply input whilst J12 blue terminal functions as voltage output from regulator J1 Pin Name Function 1 GND Ground reference for power supply input 2 6 5 12VDC Connected to power supply input 6 5 12 volt J12 Pin Name Function 1 GND Ground reference for power supply output 2 5VDC Voltage output from regulator 5 1 Volt 4 ...

Page 5: ...32 J8 blue terminal is a connector for RS232 UART interface TTL J6 blue terminal is a connector for TTL UART interface while RS485 J15 blue terminal is a connector for RS485 UART interface J8 RS232 Pin Name Function 1 GND Ground reference 2 TX UART RS232 output line from the module 3 RX UART RS232 input line to the module J6 TTL Pin Name Function 1 GND Ground reference 2 TX UART TTL output line fr...

Page 6: ...ost modules Condition Examples Jumper Configuration Examples If module is at the end of line and the network doesn t have bias If module is at the end of line and there is bias on the network If module is not at the end of line and the network doesn t have bias If module is not at the end of line and there is bias on the network J5 blue terminal is a connector for I2 C interface while J11 blue ter...

Page 7: ...byte parameter if needed and ends with 1 byte LRC Start Byte Byte Count Command Parameter LRC Start Byte always have 0x58 58 hexadecimal or 88 decimal value Byte Count is the sum of Command and Parameter byte excluding Start Byte Byte Count and LRC LRC is an error checking byte by summing all bytes from Start Byte to the last Parameter Only LSB will be taken from the sum results and two s compleme...

Page 8: ...rrect module will respond with ACK 0xAA If the packet is false not recognized module will respond with NACK 0xEE Example PC 0x58 0x01 0xFF 0xA8 USB Smart I O 0x58 0x01 0xAA 0xFD 3 2 2 RESET Is used to perform soft reset on the module Byte Count Command Parameter Host Command 1 0x01 Module Response 1 0xAA 0xEE If packet is recognized and correct module will respond with ACK 0xAA Module will perform...

Page 9: ... false not recognized module will respond with NACK 0xEE Example PC 0x58 0x05 0x10 0x01 0x00 0xF0 0x0F 0x93 USB Smart I O 0x58 0x01 0xAA 0xFD will use Digital I O bit 4 7 as output lines with 0 values while bit 0 3 as input lines with active internal pull up resistors 3 2 4 GET FUNCTION Is used to read I O function settings on the module Byte Count Command Parameter Host Command 2 0x11 PORT Module...

Page 10: ...ized module will respond with NACK 0xEE Example PC 0x58 0x02 0x12 0x01 0x93 USB Smart I O 0x58 0x02 0x12 0x88 0x0C means that the computer requests the value to Digital I O and module replies that the PORT value on that port is 0x88 3 2 6 SET BIT Is used to command the module to change the value of 1 pin on a certain port Byte Count Command Parameter Host Command 4 0x13 PORT BIT BITVALUE Module Re...

Page 11: ...bit is low 3 2 8 SET BYTE Is used to command the module to change the value of a certain port Byte Count Command Parameter Host Command 3 0x15 PORT BYTEVALUE Module Response 1 0xAA 0xEE PORT parameter is the port code that will be accessed 0 represents Analog Input 1 represents Digital I O and 2 represents General Purpose I O BYTEVALUE parameter is the the value of the byte that will be sent to th...

Page 12: ... If the packet is false not recognized module will respond with NACK 0xEE Example PC 0x58 0x02 0x17 0x03 0x8C USB Smart I O 0x58 0x03 0x17 0x03 0xFF 0x8C means that the computer requests the value of ADC channel 3 and module replies that the ADC value of that channel is 1023 0x03FF 3 2 11 SET BIT RATE Is used to set the I2 C bit rate Byte Count Command Parameter Host Command 3 0x20 BITRATEH BITRAT...

Page 13: ...t rate value is 50 0x0032 kHz 3 2 13 I2C START Is used to command the module to send the start condition to I2 C line Byte Count Command Parameter Host Command 1 0x22 Module Response 1 0xAA 0xEE If packet is recognized and correct module will respond with ACK 0xAA If the packet is false not recognized module will respond with NACK 0xEE Example PC 0x58 0x01 0x22 0x85 USB Smart I O 0x58 0x01 0xAA 0x...

Page 14: ...C STOP Is used to command the module to send stop condition to I2 C line Byte Count Command Parameter Host Command 1 0x25 Module Response 1 0xAA 0xEE If packet is recognized and correct module will respond with ACK 0xAA If the packet is false not recognized module will respond with NACK 0xEE Example PC 0x58 0x01 0x25 0x82 USB Smart I O 0x58 0x01 0xAA 0xFD 3 2 17 I2C SEND PACKET Is used to command ...

Page 15: ...respond with data reading results maximum of 32 bytes If the packet is false not recognized module will respond with NACK 0xEE Example PC 0x58 0x03 0x27 0xD0 0x01 0xAD USB Smart I O 0x58 0x02 0x27 0x03 0x7C means that the computer commands the module to read 1 byte of I2 C device with 0xD1 address Module replies that the reading results via I2 C is 0x03 3 2 19 SET BAUD RATE Is used to set UART bau...

Page 16: ...eter will be transmitted consecutively If packet is recognized and correct module will respond with ACK 0xAA If the packet is false not recognized module will respond with NACK 0xEE Example PC 0x58 0x04 0x32 0x01 0x02 0x03 0x6C USB Smart I O 0x58 0x01 0xAA 0xFD will send 0x01 0x02 and 0x03 data via UART line 3 2 22 GET UART Is used to command the module to read a series of data via UART line Byte ...

Page 17: ...Response 1 0xAA 0xEE Parameter VALUE are the values 0 255 that will be converted into analog voltage 0 5 1 If packet is recognized and correct module will respond with ACK 0xAA If the packet is false not recognized module will respond with NACK 0xEE Example PC 0x58 0x02 0x40 0x80 0xE6 USB Smart I O 0x58 0x01 0xAA 0xFD will send a value of 128 0x80 to DAC that will be converted to about 2 58 V volt...

Page 18: ...read counting results of a certain counter Byte Count Command Parameter Host Command 2 0x52 COUNTER Module Response 3 0x52 MSB LSB 1 0xEE COUNTER parameter is the counter number that will be accessed has a value of 0 or 1 MSB parameter is the most significant byte of counter reading results LSB parameter is the least significant byte of counter reading results If packet is recognized and correct m...

Page 19: ...wer supply to the modules 5 If the power supply has been correctly connected then the POWER PC LINK USB SMART I O will light up 6 Connect the USB Mini B connector to USB port on the computer using the provided USB cable 7 Run SmartIO exe 8 Select the COM Port that will be used Click the Refresh button to show the recently connected COM port 9 Click Open 10 On the Testing section right give the che...

Page 20: ...dule reads 5 PROGRAM EXAMPLE SmartIO program source code is included in the CD DVD This source code can be used as a guideline to make other programs The following are the explanations of each SmartIO exe GUI function 20 Get Baud Rate Set Baud Rate Baud Rate reading results Determined Baud Rate Send DAC Value sent to DAC Get Version Ping Reset Version reading result Get Bit Rate Set Bit Rate Bit R...

Page 21: ...n Set Bit Get Bit ADC Channel Selection Port Selection ADC reading results Get ADC Sent Byte Set Byte Get Byte Reading result bytes Get Counter Port Selection Counter reading results Counter selection Start Counter Stop Counter ...

Page 22: ...uestions or suggestions regarding this product please contact our technical support support innovativeelectronics com 22 I2C Send Packet Send UART Amount of I2 C bytes that will be read Amount of UART bytes that will be read I2C Get Packet Get UART Sent data column Read data column ...

Page 23: ...Attachment A PC LINK USB SMART I O Schematics 23 ...

Reviews: