Home
2 / 64 - FiveCo
Contents
1. Register Address Register Name Function Read Write Control 0x25 AD3VALUE ERES DOUEQENEESIQN e Sul result Register Size Register structure Unit 2 Bytes Unsigned Int 10 bits left aligned none Description The 6 less significant bits are not used Last value converted by A D port 3 The result is between O and 1023 0 means GND and 1023 means Vdd Notes The A D converter has a 0 bits resolution which means that only the 10 most significant bits of the A D VALUE register make sense others should be ignored The acquisition is done every 250us and is asynchronous with the read access of the A D VALUE register When you access this register you get the last A D conversion result that can be up to 250ys old The voltage reference for that acquisition is the processor input voltage which should be a regulated 5V The accuracy of the conversion depends on that voltage s stability The lowest error best case is a half of the LSB of the Obits result FMod TCP User Manual v 2 12 AD4 VALUE FMod TCP DB only 59 64 Register Address Register Name Function Read Write Control 0x26 AD4VALUE Pets CORNET Lob as dior result Register Size Register structure Unit 2 Bytes Unsigned Int 10 bits left aligned none Description The 6 less significant bits are not used Last value converted by A D port 4 The result is between O and 1023 0 me
2. Bit O O 17 FMod TCP DB only Bit O 18 FMod TCP DB only Bit 2 VO 19 FMod TCP DB only Bit 3 Reserved Bit 4 Reserved Bit 5 Reserved Bit 6 Reserved Bit 7 Reserved Note This register cannot be saved to EEPROM and must be configured at each power up Default value b T TTT TTI I all input Example b 00000101 gt I O number 17 and 19 are set as inputs and I O number 18 as output FMod TCP User Manual v 2 12 63 64 I O VALUE 2 Register Address Register Name Function Read Write Control Ox2A VOVALUE2 I O ports value Read Write Register Size Register structure Unit Byte Unsigned Int 8 bits none Description Contains the state of each I O ports configured as input and controls the lue of each of them configured as output in lODIRECTION2 register This register cannot be saved to EEPROM and must be configured at each Va Bit O O 17 FMod TCP DB only Bit O 18 FMod TCP DB only Bit 2 O 19 FMod TCP DB only Bit 3 Reserved Bit 4 Reserved Bit 5 Reserved Bit 6 Reserved Bit 7 Reserved Note power up Example If IODIRECTION2 is set to b 000001 1 gt I O number 17 and 1 are set as inputs and bits O and 2 in IOVALUE2 register will not be used For I O number 18 you can set its output state in this register FMod TCP User Manual v 2 12 Contact address FiveCo Inno
3. Byte Number of bits Example 0x00 Write Answer 0x0024 16 bits 0x0024 0x02 TransactionlD same as 16 bits Ox1B34 demand 0x04 0x0000 16 bits 0x0000 0x06 Checksum 16 bits 0x I2C feature The Inter IC bus commonly known as the l C bus is a control bus that provides the communications link between integrated circuits in a system Developed by Philips in the early 1980 s this simple two wire bus has become the de facto worldwide standard for system control finding its way into everything from temperature sensors and voltage level translators to EEPROMs general purpose I O A D and D A converters CODECs and microprocessors of all kinds You can find the 2C s specifications on the NXP former Philips Semiconductor web site at the following link http www nxp com FMod TCP User Manual v 2 12 18 64 The I2C protocol can access a device by three different manners Write Start AddW Byte Byte2 Stop st Addw__ AT Bytes to w TA Tsp Read Start AddR Byte Byte2 Stop st Adar A Bytes to R_ na sp Read After Write Start AddW ByteW ByteW2 ReStart AddR ByteR I ByteR2 Stop AddW A Bytestow RIA AddR I2C Read Write with ack command To be able to do all of these 3 sequences use this command Byte Number of bits Example 0x00 I2CRWwithAck 0x0007 16 bits 0x0007 Ox02 TransactionID 16 bits OxI B34 0x04 Leng
4. AddHighByte true if AddHighByte false Sum OxFF Sum gt gt 16 amp OxFFFF Sum amp OxFFFF ChecksumCalculated ChecksumCalculated ChecksumCalculated gt gt 16 amp OxFFFF ChecksumCalculated amp OxFFFF return ChecksumCalculated This function needs a Byte array ByteTab containing the command sequence and this array s length Size as input it returns the checksum as an int FMod TCP User Manual v 2 12 24 64 6 JavaApplet A specific Java Applet is provided with the module to control any of its ports without having to write any specific code Overview To connect to the http server on the card simply open your web browser and type the IP address of the module Example with default address http l69 254 5 5 The applet is downloaded from the module to your computer and runs as a local process on your computer You need to use an internet web browser that is compatible with Java I 1 or download the Java plug in from Sun web site http wwwv java com Please note that on an MSWindows based computer a few seconds delay can occur when you download the applet due to an MSWindows NetBios issue The navigation through the four panels of the applet is done through the menu bar Test AD and I Os Test UART BEEUTZOONN FMod TCP User Manual v 2 12 25 64 Main Config The Main panel shows the general information related to the module The
5. File Edit View Favorites Tools Help ay Q sax tA ix B A p Search Ea g tue Links amp Adwords Z Address e http 169 254 5 5 amp 8 e amp FMod TCP DB Applet ver 1 8 04 1 2 07 Test AD and I Os I Test UART Test I2C Test UART Connectto UART TCP port Transmit ta UART ot connected AddLF Add CR Add NULL Send Receive from UART Applet FMODTCP started You can check Add LF Add CR and or Add Null boxes to add a Line Feed a Carriage Return and or a Null Byte at the end of the ASCII chain sent to the device FMod TCP User Manual v 2 12 28 64 Test 12C This page can be used to access I2C bus The panel is divided in two parts The part on the right allows scanning the I2C bus to find available slave devices The part on the left allows sending a read or a write command to a device on the I2C bus Z FMod TCP DB FiveCo s TCP IP Controller Microsoft Internet Explorer 4 loj x File Edit View Favorites Tools Help Li Qe Q x E A Search 64 A Q97 a Links AdWords ei Address E http 169 254 5 5 j Go FMod TCP DB Applet ver 1 8 04 12 07 Test AD and I Os I Test UART Test 2c Pests 12C Number of bytes to read EXTR cu L Sanbus L Scanbus Hex data to write ex A2 3F 12C devices found 12C address bits hexa n Data received Send WAT RYAVTAY gt You should first check if y
6. The value of this parameter must be computed with the following formula based on the wanted speed I2CSPD 107 I2CSpeed Note wanted Speeds greater than OOkHz have some limitations see page 20 This register cannot be saved to EEPROM and must be configured at each power up Default value 99 100kHz Examples Most common speeds IO0kHz I2CSPD 99 400kHz I2CSPD 24 IMHz I2CSPD 9 FMod TCP User Manual v 2 12 52 64 TCP CONNECTIONS OPENED Register Address Register Name Function Read Write Control Number of TCP OxlA TCPCONNECTIONSOPENED connections that Read only are opened Register Size Register structure Unit Byte Unsigned Int 8 bits none Description Number of users connected to the card using TCP Value can be 0 to 4 FMod TCP User Manual v 2 12 IO DIRECTION 0 53 64 Register Address Register Name Function Read Write Control 0x20 IODIRECTIONO I O ports directions Read Write Register Size Register structure Unit Byte Unsigned Int 8 bits none Description Controls the direction of each of I O 1 to 8 0 output input Bit O O l Bit O 2 Bit 2 O 3 Bit 3 O 4 Bit 4 O 5 Bit 5 O 6 Bit 6 O 7 Bit 7 O 8 Note This register cannot be saved to EEPROM and must be configured at each power up Default
7. Connection About lo xl M Connection Port Main 8010 z Open Close Change uart M Mai t baud rate AAN H em gap A D converters Input Output and flow REN m A D converters hv lat control bps nge NEL E ORE lt n T Enable flow control 2850M 2131 158IV 117V 0 87 N ot values Change TCP timeout disconnection o s pem 1 0 port timeout address of the module Change subnet mask of the module Module MAC address Change module name IP Address Change IP 9 fa B fF Change Subnet Mask ms pe p ddress Ip esent Change Read actual settings Save user settings Restore factory settings Restore user settings 1 8 9 16 17 18 87654321 Setl O as input v v v iV iv v v v Fai rr a ran rs t rat E State 12C port Read Write Scan Bes Number of byte to read Hex Data to write ex 42 3F 12C Address bits Data received 0 j o Connected Bytes received from I2C 33 64 A D values O s Scan DC bus Number of bytes to read from Dc Hex data to write to I2C Address The configuration interface allows the user to change some of the board s settings UART baud rate he user can change the UART baud rate and enable or disable the hardware flow control CTS RTS TCP timeout The user can change the number of seconds allowed before TC
8. b T TTT T TTT all input Example b 00000111 gt I O number 2 and 3 are set as input and others as outputs FMod TCP User Manual v 2 12 54 64 I O VALUE 0 Register Address Register Name Function Read Write Control 0x21 l OVALUEO I O ports value Read Write Register Size Register structure Unit Byte Unsigned Int 8 bits none Description Contains the state of each I O ports configured as input and controls the ue of each of them configured as output in IODIRECTIONO register This register cannot be saved to EEPROM and must be configured at each val Bit O O 1 Bit O 2 Bit 2 O 3 Bit 3 O 4 Bit 4 O 5 Bit 5 O 6 Bit 6 O 7 Bit 7 O 8 Note power up Example If IODIRECTIONO is set to b 000001 1 gt I O number 2 and 3 are set as input and bits O and 2 in IOVALUEO register will not be used You can set the output state for the other ports in this register FMod TCP User Manual v 2 12 55 64 ADO VALUE Register Address Register Name Function Read Write Control 0x22 ADOVALUE Pet CORNET T Lei as dign result Register Size Register structure Unit 2 Bytes Unsigned Int 10 bits left aligned none Description The 6 less significant bits are not used Last value converted by A D port 0 The result is between O and 1023 0 means GND and 1023 means
9. 12 7 64 Software operating principle The operating principle for PC softwares that must exchange data with an FMod TCP DB card depends on which interface is used In case of UART use the operation is really simple Any byte sent to port TCP 8000 is simply redirected to the UART bus and any byte received from UART bus is redirected to the TCP connection In the other cases I O A D and I2C the software has to use a dedicated protocol layer on top of the TCP Layer see chapter 5 This protocol is Question amp Answer oriented The PC should send a Question wait for the Answer and so on To configure the card s parameters and to access I O and A D features the protocol uses an Internal Registers Access routine see chapter 5 and 8 The Java Applet example and the Borland C code sample available on the FiveCo s web site can help programmers get started with their development Hardware description Two hardware versions exist Both are OEM boards to be integrated inside the customer s product Daughter Board DB version SOS jumper I O A D UART I2C pins Ethernet connector Dimensions in mm FMod TCP User Manual v 2 12 Cable version obsolete I O and A D SOS jumper UART connector I2C connector Power connector SV DC Power connector polarity Ethernet connector GND 5VDC Cm 8 64 si Dimensions in mm FMod TCP User Manual v 2 12 9 64
10. Address Function Name Function Read Write Control 0x02 RESETCPU Restart processor Write only Register Size Register structure Unit 0 Byte none none Description Reboots the card The communication will be lost FMod TCP User Manual v 2 12 40 64 SAVE USER PARAMETERS Function Address Function Name Function Read Write Control 0x03 SAVEUSERPARAMETERS Saves all in EEPROM Write only Register Size Register structure Unit 0 Byte none none Description Saves the following parameters to user EEPROM space OxI2 IPADDRESS Oxl3 SUBNETMASK 0xl4 TCPTIMEOUT Oxl5 MODULENAME Oxl6 UARTCONFIG FMod TCP User Manual v 2 12 41 64 RESTORE USER PARAMETERS Function Address Function Name Function Read Write Control 0x04 RESTOREUSERPARAMETERS Restores saved Write only Register Size Register structure Unit 0 Byte none none Description Restores the following parameters from user EEPROM space OxI2 IPADDRESS Oxl3 SUBNETMASK Oxl4 TCPTIMEOUT Oxl5 MODULENAME Oxl6 UARTCONFIG FMod TCP User Manual v 2 12 42 64 RESTORE FACTORY PARAMETERS Function Function Name Function Read Write Control Address 0x05 RESTOREFACTORYPARAMETERS Factory default Write only Register Size Register structure Unit 0 Byte none none Description Restores the following paramete
11. CD Rom AWN Oo un Plug your new card on your PC network Start the Win32 application Click on File gt Easy change IP address The software will scan the network and display a list of all FiveCo s devices found Select the MAC address corresponding to your new card If you have more than one network adapter on your PC the software will ask you to select the one which is connected to the same network as the FMod TCP DB The software will suggest a new IP address with the last byte left open Choose a new IP Not already used on your network and click the Change IP address button That s it The card has a new address and a new subnet mask the same as your PC They are automatically saved into EEPROM FMod TCP User Manual v 2 12 13 64 You can now connect the card with the Win32 software or open its web page by typing its new IP address into a web browser Notes The IP address won t be changed if a TCP connection exists with the card The protocol used to change the IP address is described later in this manual FMod TCP User Manual v 2 12 14 64 5 Controlling the FMod TCP DB by TCP or UDP General Information All the board s parameters configuration registers and features can be accessed through a TCP or UDP port In addition an HTTP TCP port is available for web pages downloading and another TCP port for UART bus access Those ports are TCP Port 80 for HTTP communication TCP
12. List of connected devices MAC Address IP Address Type Version Name 00 50 C2 30 80 00 19215816100 1 0 5 10 FMod TCP This application uses the IP address of your computer and its subnet mask to find the scan broadcast address When you click on scan a broadcast message will be sent to all boards in your subnet and answers will be listed WARNING it only works with cards in your subnet How does it work When you click Scan the software simply sends a Read registers command to a broadcast address on UDP port number 7010 see chapter about main port at page 15 The broadcast address depends on the network subnet mask present on your PC FMod TCP User Manual v 2 12 31 64 UART interface TCP IP Server ressource application lal xl Connection About Connectiorr iP 19216816100 Pott UART 8000 7 Open Close RS232 port Ascii data chain to we TC Addendbyte dec 0 send m T NULL dec 0 0x00 ASCII Hex CR dec 13 Ox0D or Decimal E6 69 76 65 63 6F LF dec 10 0x04 ena lec data lec 5 102105118 101 99111 CheckSum 2 bytes Data received Ascii I Add CR after each TCP packet Bytes received from UART Connected The UART interface is easy to use Just write the ASCII HEX or decimal string in the dedicated text box and click corresponding Send button The received bytes are displayed into the Data received boxes sa
13. Small text corrections Same Same Same Add checksum function example Add explanation about I2C 29 27 01 06 AG Correct function ID for easy Same Same Same change IP answer frame 2 10 03 04 07 AG Input voltage tolerance Since 6 2 Since 1 8 Since 3 5 correction Add some pull up down values Made some correction to packet length Change Starter kit description Std version made obsolete Various minor corrections 2 1 24 06 09 AG For firmware beta release Since 6 14 Since 1 9 Since 3 6 2 12 15 07 10 AG Add I2C error answer message Since 7 2 Since 1 9 Since 3 6 Small text corrections Add comments about EEPROM registers saving Add explanation on IOVALUEx FMod TCP User Manual v 2 12 Package and operating conditions 5 64 Starter Kit contents The FMod TCP DB Starter kit should contain one FMod TCP DB one development board one 5V Power supply one RJ45 cross cable one CD Rom with dedicated software This manual Operating conditions Supply voltage 5VDC 5 Supply current 00mA max without IO current 50mA typical Operating temperature 0 70 C I O maximum current 20mA max 200mA for all I Os together The RJ 45 connector is protected against ESD by a grounded varistor The other components are not protected FMod TCP User Manual v 2 12 6 64 2 Ove
14. to use a SAVEUSERPARAMETERS command If you do not want to use subnets use the following subnet mask when IP address byte O is gt 0 and 127 S127 ands Ola gt 191 and lt 223 Default value 255 255 0 0 Example 255 0 0 0 255 255 0 0 For the IP 10 2 6 45 and subnet mask 255 255 0 0 IP address class A gt netlD 10 subNetlD 2 and hostID 6 45 Class A addresses Class B addresses 255 255 255 0 Class C addresses FMod TCP User Manual v 2 12 48 64 TCP TIMEOUT Register Address Register Name Function Read Write Control Oxl4 TCPTIMEOUT Timeout for TCP Read Write connection Register Size Register structure Unit Byte Unsigned Int 8 bits Description The TCP timeout is a value in seconds after which the user will be disconnected if the board has not been accessed in the meantime If the value is O the TCP timeout is deactivated In this case however if the client crashes during connection the communication will never be closed on the module s side Because a maximum of 4 communications are allowed at the same time on the module one of them will be blocked If the client crashes four times all of the 4 communications will be blocked and the module will have to be reset The timeout for each TCP IP connection is reloaded when there is traffic through the port Default value 30 Limitations Max value 255 FMod TCP User Ma
15. 000111 gt I O number 9 10 and II are set as inputs and others as outputs FMod TCP User Manual v 2 12 61 64 I O VALUE I Register Address Register Name Function Read Write Control 0x28 l OVALUE I I O ports value Read Write Register Size Register structure Unit Byte Unsigned Int 8 bits none Description Contains the state of each I O ports configured as input and controls the lue of each of them configured as output in IODIRECTION register This register cannot be saved to EEPROM and must be configured at each va Bit O O 9 FMod TCP DB only Bit O 10 FMod TCP DB only Bit 2 O 11 FMod TCP DB only Bit 3 O 12 FMod TCP DB only Bit 4 O 13 Bit 5 O 14 Bit 6 O 15 Bit 7 O 16 FMod TCP DB only Note power up Example If IODIRECTION is set to b 00000111 gt I O number 9 IO and I are set as input and bits O and 2 in IOVALUE register will not be used The other I Os output states can be set in the register FMod TCP User Manual v 2 12 62 64 IO DIRECTION 2 Register Address Register Name Function Read Write Control Ox29 IODIRECTION2 I O ports directions Read Write Register Size Register structure Unit Byte Unsigned Int 8 bits none Description Controls the direction of each of I O 17 to 19 0 output input
16. 3 Inputs amp Outputs Beware Before connecting any device to the following connectors unplug power from the board FMod TCP DB WARNING 5V tolerant Ethernet Shield AID 3 2 O9 18 5V 3 I2C SDA 4 7 pull up 19 GND 4 2C SCL 4 amp 7 pull up 20 VO 13 5 VO IO 21 VO 14 6 UART RX 10K pull up 22 VO 15 7 UART TX 23 SOS 10K pull up 8 UART RTS 24 VO 16 9 VO Il 25 I O VO 12 1 Open collector 26 VO 2 A D 4 27 VO 3 5V 28 I O 4 GND 29 O 5 A D O 30 I O 6 A D I 3l VO7 AID 2 32 O 8 33 UART CTS 10K pull down 34 O 17 Warning 35 VO 18 The VO 12 pin 10 is an open collector input standard output Don t forget to add a pull up if your application needs one Other I Os are Schmitt Trigger type VO I9 FMod TCP User Manual v 2 12 10 64 FMod TCP obsolete 1 8 1 0 1 8 9 1121 O 13 15 12 5V 13 GND 14 A D input UART WARNING 5V tolerant MG RX input TX output GND RTS output CTS input 12C 4 7k 2 pull ups on SCL and SDA GND SDA VCC VCC SEL GND The connectors for 12C and UART are from Tyco electronics model Micro MaTch Manufacturer reference 7 2 15079 6 Cable side connectors reference number is 7 215083 6 I O are Schmitt Trigger type FMod TCP User Manual v 2 12 11 64 SOS jumper A jumper is dedicated to restore default IP address or factory settin
17. 5 Operating GoNIlorisce manda edad rote M md nt ERU aided 5 PES m 6 APPICatON NENNT o o 6 S ftware opsratne DMI DIS maio pe ostia cis ibat en teh nd Ioab asc 7 Plea CCl SSC PIO o tH 7 Splits amp OUTPUTS ao oer esed tete daa ARAETA ARAARA 9 Ede CU JOB seine a eeepc a aquia acd quadam d eM 9 FMod FEP OBSOLETE e 10 SOS US Mc m Z SCC AS CAUCE coe rot eter cdl ev ore vei acte rao te anand aee 12 Changing P adgiESSimieneiieiconiseinairooiudniiioiiii ii pa as i dps 2 5 Controlling the FMod TCP DB by TCP OF UDP itis tot e db nte itat 14 General ATO MeL ENS aici re 14 UART TOPA I icc tac ci iene nan neues A 14 Board parameters and I O A D and I2C features TCP 8010 or UDP 7010 15 Easy IP address connie ODP 370 DO as asa g actiseea Damasi sno des medactd dd tpe 2 Mio CHSUINY CalGllAtlOn P RN ia OONA O 22 ENITAN DID E veto 24 VSP E Winna anniina sai agus a andata e dq cod anu a a 24 lc CONN tcc Cae 25 QR PII scat aa cle ape 26 Test CTPA Um 27 E V E 28 T WIR ZApplI AION m e 29 OVEM E Winsssanienscs nannan iaiaaeaia aa a a aaa aaa esi 29 JAR T interage onanipenonan anaiari a T i d qa acd anda na Dated ded cd cten cue 3l AGL wie files ISI TAB Ones dcn atc edocs lave ei ta esac eects dendi 32 Main 6 aca lala uite arene enn 23 9 Registers TAM ASIII boss cadence da Gas dena ad Dn ad tasca sa dal
18. P port is disconnected This feature avoids the problems due to the crash of a TCP client PC IP address Subnet mask MAC address Name Module name The user can change the IP address of the module Mac address of the module cannot be changed The user can change the subnet mask of the module The A D values are simply obtained with a click on the get value button FMod TCP User Manual v 2 12 34 64 The I Os interface allows users to choose the direction Input or Output of the 19 I Os I1 for FMod TCP and their values if they are in output mode When an I O direction checkbox is checked the input mode is enabled The I2C interface is an easy way to test the I2C connection between the module and the user s electronic The bytes to write in hexadecimal like 41 42 45 separated by spaces must be written in the dedicated line and the I2C address in the dedicated Address space in hexadecimal or in decimal Specify how many bytes have to be read and then click Send FMod TCP User Manual v 2 12 35 64 8 Registers management Memory Organization The user must know that a new register value sent through the communication port is loaded to the running parameters in RAM and used for the current process All these parameters are lost upon power down It is required to save them to User Parameters or Factory Parameters with the corresponding function EEPROM EEPROM ROM USER Parameters FACTORY
19. Parameters SOS IP Saved Saved address RAM RUNNING Parameters Action Number and description SaveUserParameters 0x03 function 2 During standard power up or calling RestoreUserParameters 0x04 function RestoreFactoryParameters 0x05 function 4 C SaveFactoryParameters 0x06 function For integrators engineers only By setting SOS Jumper after power up G S C By setting SOS Jumper during power up FMod TCP User Manual v 2 12 36 64 Full Register Description List of registers Address Bytes Access type Name General Information 0x00 00 4 R TYPE 0x01 01 4 R VERSION 0x02 02 0 Fct RESETCPU 0x03 03 0 Fct SAVEUSERPARAMETERS 0x04 04 0 Fct RESTOREUSERPARAMETERS 0x05 05 0 Fct RESTOREFACTORYPARAMETERS 0x06 06 0 Fct SAVEFACTORYPARAMETERS Communication OxIO 16 4 RW COMOPTIONS Ox 1 17 6 R ETHERNETMAC Ox12 18 4 RW IPADDRESS 0x13 19 4 RW SUBNETMASK 0x14 20 RW TCPTIMEOUT 0x15 21 l6 RW MODULENAME Oxl6 22 RW UARTCONFIG 0x18 24 RW I2CSPD OxlA 26 R TCPCONNECTIONSOPENED External ports some registers apply only to FMod TCP DB 0x20 32 RW IODIRECTIONO 0x21 33 RW IOVALUEO 0x22 34 2 R ADOVALUE 0x23 35 2 R ADIVALUE 0x24 36 2 R AD2VALUE 0x25 37 2 R AD3VALUE 0x26 38 2 R AD4VALUE 0x27 39 RW IODIRECTION 1 0x28 40 RW IOVALUE 0x29 41 RW IODIRECTION2 Ox2A 42 RW IOVALUE2 Those registers are not sav
20. Port 8000 for UART transceiver TCP Port 8010 to access I O registers see chapter 8 and I2C bus UDP Port 7010 to access I O registers see chapter 8 and I2C bus With regards to TCP connections the board allows up to 4 simultaneous connections These ports are described below UART TCP 8000 The UART bus of the microcontroller is accessible through the TCP port number 8000 The module acts simply as a transceiver for this port Any byte sent from the network ex TCP IP from a PC to the module will be sent to the other side s UART bus and vice versa Thus there is no particular protocol dedicated to this feature See later chapters to know how to change parameters such as baud rate and hardware flow control Note This port supports only one user at a time UART fixed settings No parity Start Bit 8 Data Bits Stop Bit Important note about baud rate greater than 9600bds Common TCP IP stacks on PC Unix station use a delay of 200ms for the acknowledgement of the TCP received data packets This is done to reduce traffic on the network because TCP allows the acknowledgement of several packets at one time Unfortunately the FMod TCP DB module needs this acknowledgement to remove the data from its internal UART receive buffer if no acknowledge is received from the PC the module will resend those data FMod TCP User Manual v 2 12 15 64 So with speeds greater than 9600bds the buffer may be
21. See page 12 for quick gt start Small Embedded Ethernet Converter FMod T CP DB User Manual Version 2 12 2164 Version 2 12 Last revision July I 5th 2010 Printed in Switzerland Copyright 2003 2010 FiveCo Sarl All rights reserved The contents of this manual may be modified by FiveCo without any warning Trademarks Windows is a registered trademark of Microsoft Corporation Ethernet is a registered trademark of Xerox Corporation Java is a registered trademark of Sun Microsystem Philips amp is a registered trademark of Koninklijke Philips Electronics N V I2C is a registered trademark of Philips Semiconductors Corporation BorlandQ is a registered trademark of Borland Software Corporation Warning This device is not intended to be used in medical life support or space products Any failure of this device that may cause serious consequences should be prevented by implementation of backup systems The user agrees that protection against consequences resulting from device system failure is the user s responsibility Changes or modifications to this device not explicitly approved by FiveCo will void the user s authority to operate this device Support Web page http wwwv fiveco ch section motion support motion E htm e mail support fiveco ch FMod TCP User Manual v 2 12 3 64 Table of Contents l Packag and operating CORGIHOLS cen Sad cunt ete ue end eternal 5 Start r Kit conte Lo MH t SN EE
22. TransactionID 6 bits 0x2001 0x04 Number of addresses to scan 16 bits 0x0001 0x08 X Addresses X bytes OxlA Checksum 16 bits Ox Note If there is no address in the I2C Scan command the FMod TCP DB will scan all addresses between and 127 I2C scan answer The FMod TCP DB answers with the following sequence Byte Number of bits Example OxOO I2CScanAnswer 0x0006 16 bits 0x0006 OxO2 TransactionID same as 16 bits 0x2001 demand 0x04 Number of valid addresses 16 bits 0x0001 0x06 Valid addresses list n bytes OxlA Checksum 16 bits Ox I2C speed change advanced features The I2C bus speed can be changed at any time by changing the content of the I2CSPD parameter The I2C speed cannot be saved in EEPROM Beware Do not change I2C speed if it is not mandatory Speed greater than OOkHz are not supported by all I2C slaves 2 Do not change I2C speed during I2C communication 3 The I2C controller does not match all I2C specifications at speed higher than O0kHz This feature will therefore not work with all I2C slaves The value of the I2CSPD parameter must be computed with the following formula 10 I2CSpeed I2CSPD wanted FMod TCP User Manual v 2 12 21 64 Easy IP address config UDP 7010 A really useful feature of the UDP port 7010 is the Easy IP config one The user who wants to design his own software can use this feature to do a quick
23. Vdd Notes The A D converter has a 10 bits resolution which means that only the 10 most significant bits of the A D VALUE register make sense others should be ignored The acquisition is done every 250us 50us on FMod TCP and is asynchronous with the read access of the A D VALUE register When you access this register you get the last A D conversion result that can be up to 50ys 250us old The voltage reference for that acquisition is the processor input voltage which should be a regulated 5V The accuracy of the conversion depends on that voltage s stability The lowest error best case is a half of the LSB of the Obits results FMod TCP User Manual v 2 12 56 64 ADI VALUE FMod TCP DB only Register Address Register Name Function Read Write Control 0 23 ADIVALUE CSE AI CONVEO e y result Register Size Register structure Unit 2 Bytes Unsigned Int 10 bits left aligned none Description The 6 less significant bits are not used Last value converted by A D port 1 The result is between O and 1023 0 means GND and 1023 means Vdd Notes The A D converter has a 0 bits resolution which means that only the 10 most significant bits of the A D VALUE register make sense others should be ignored The acquisition is done every 250us and is asynchronous with the read access of the A D VALUE register When you access this register you get the last A D conversion
24. a aca aide 35 Memory Qrsa izat ON tec 35 Full RSS Str LISS cca acu iin a T EOE 36 FMod TCP User Manual v 2 12 4 64 Revision history Revision Date Author Note Firmware Java applet Win32 app version version version 1 3 2 02 02 04 AG First approved version Since 3 0 1 4 3 04 04 AG Added UART fixed settings definition and UART and I2C connectors commercial reference 2 0 28 06 04 AG Updated whole manual for Since 5 1 Since 1 1 TCPO20I 2 1 07 07 04 AG Added PCB board dimensions Since 5 1 Since Added comments to UART port and connectors pin out Correction made to layout of UART and I2C connectors Correction made in PORT DIRECTION register description and added default boot state 22 01 09 04 AG Added UDP port 7010 Since 5 6 Since 1 5 Updated applet and win32 app description Updated default IP More explanations on UART use without flow ctrl 2 3 3 10 04 AG Correction to I2C pinning SCL Since 5 6 Since 1 5 and SDA were inverted 24 9 10 04 AG Add more explanation for IP Since 5 8 Since 1 5 address reset jumper behavior 2 5 8 01 05 AG Add I2C scan and I2C speed Since 5 10 Since 1 6 Since 2 11 change Add FMod TCP DB Change IP config method quick start Add 4800bds for UART 2 6 22 04 05 XG Add Memory organization Same Same Same Add second UART to RS adapter 2 7 20 07 05 AG Add I2C Read Write with ack Since 5 13 Same Since 2 13 command 2 8 26 09 05 AG
25. ans GND and 1023 means Vdd Notes The A D converter has a 0 bits resolution which means that only the 10 most significant bits of the A D VALUE register make sense others should be ignored The acquisition is done every 250us and is asynchronous with the read access of the A D VALUE register When you access this register you get the last A D conversion result that can be up to 250ys old The voltage reference for that acquisition is the processor input voltage which should be a regulated 5V The accuracy of the conversion depends on that voltage s stability The lowest error best case is a half of the LSB of the Obits result FMod TCP User Manual v 2 12 60 64 IO DIRECTION Register Address Register Name Function Read Write Control 0x27 IODIRECTION I O ports directions Read Write c gt ct Register Size Register structure Byte Unsigned Int 8 bits none Description Controls the direction of each of I O 9 to 16 0 output input O 49 FMod TCP DB only O 10 FMod TCP DB only it O 11 FMod TCP DB only O 12 FMod TCP DB only O 13 O 14 O 15 O 16 FMod TCP DB only ee fuel fox NJ ON Ga A Wo DD U2 WB Note This register cannot be saved to EEPROM and must be configured at each power up Default value b ILI TEILE all inputs Example b 00
26. cription A standard hardware unique identifier worldwide for each device on an Ethernet network Note If the user writes into this register the MAC address will not be modified This register is available only for informational purposes FMod TCP User Manual v 2 12 46 64 IP ADDRESS Register Address Register Name Function Read Write Control Ox12 IPADDRESS IP network ID Read Write Register Size Register structure Unit 4 Bytes 4 x Unsigned Bytes none Description Network identifier used for TCP IP and UDP IP The values 255 OxFF and O 0x00 are reserved for broadcast and network addresses and should not be used in this register Notes The module will change for a new IP address only when all of its communications ports are closed Do not forget to use a SAVEUSERPARAMETERS command Default value 169 254 5 5 Example For the IP 192 168 16 14 OxCO OxA8 0x10 OxOE write OxCOA8100E to IPADDRESS FMod TCP User Manual v 2 12 47 64 SUBNET MASK Register Address Register Name Function Read Write Control Ox13 SUBNETMASK IP subnet mask Read Write Register Size Register structure Unit 4 Bytes 4 x Unsigned Bytes none Description Network IP subnet mask used for TCP IP and UDP IP Notes The module will change for a new subnet mask only when all of its communications ports are closed Do not forget
27. ed to EEPROM and must be configured after each power up FMod TCP User Manual v 2 12 37 64 TYPE Register Address Register Name Function Read Write Control 0x00 TYPE Product ID Read only Register Size Register structure 4 Bytes Unsigned Int 6bits HH HL TYPE Unsigned Int 6bits LH LL MODEL Description Product identifier composed with a Type and Model number It defines which kind of peripheral it is Normally different modules TYPE are not software compatible Examples TYPE 0x00010000 means Type I FMod TCP Model 0 TYPE 0x00010002 means Typez I FMod TCP Model 2 DB FMod TCP User Manual v 2 12 38 64 VERSION Register Address Register Name Function Read Write Control 0x01 VERSION Software ID Read only Register Size Register structure 4 Bytes Unsigned Int 6bits HH HL Version Unsigned Int 6bits LH LL Revision Description Firmware identifier composed with a Version and Revision number Same Version with different Revision is backward compatible Example Firmware 0x0001000A Version Revision 10 is compatible with all earlier revisions of the same version ver 1 0 to 1 9 However it has new functionalities which are deactivated by default or code optimizations FMod TCP User Manual v 2 12 39 64 RESET CPU Function
28. filled faster than data can be sent by TCP and part of those will be lost if no UART hardware flow control is used between the card and the UART device CTS and RTS lines If you cannot use hardware flow control on UART bus and you have to get more than 250 bytes at one time the solution is to reduce the TCP acknowledgement delay on your computer For Windows 2000 XP users you can add change the following value in the registry BEWARE improperly done changes in the Windows registry can results in a system crash Such changes are the user s full responsibility Entry HKey_Local_Machine SYSTEM CurrentControlSet Services Tcpip Parameters Interfaces Interface name Key TcpDelAckTicks Value DWORD with value 0x00 The interface name is the registry name 32 digits number of your Ethernet card which you use to access the module The following web page describes this feature in details http www microsoft com technet prodtechnol windows2000serv reskit regentry 5880 mspx Board parameters and I O A D and 12C features TCP 8010 or UDP 7010 The main TCP port number 8010 or UDP port number 7010 can be used to change some important parameters of the module Baud rate and flow control TCP timeout value P address Module name The user should use the Win32 application enclosed in the package or the default java applet loaded in the module to change those parameters If the user wants to change the parameters b
29. first part allows the user to change the main settings of the card Don t forget to use the Save user parameters button to make changes permanent he second part allows the user to save restore user and factory parameters and to read the actual configuration of the device if it has been modified by another application E FMod TCP DB FiveCo s TCP IP Controller Microsoft Internet Explorer ps ni xj File Edit View Favorites Tools Help ay 1 Q es Q x a A p Search i T va Links dE AdWords Address http 169 254 5 5 Go FMod TCP DB Applet ver 1 8 04 12 07 Test AD and I Os J Test UART I Test I2C Main config Firmware rev 5 10 MAC address 00 50 c2 30 80 00 IP Address 169 254 5 5 Subnet mask 255 255 0 0 TCP timeout s 30 Device name FMod TCP DB UART Speed 9600 bds hd Change 12C Speed 100 kHz Read actual settings Save user settings Restore user settings Restore factory settings 60000 nnovativ engin Applet FMODTCP started FMod TCP User Manual v 2 12 Test A D and I Os 26 64 This page can be used to access A D and I O ports The A D value is regularly updated automatically 20 kHz You can change the board Vcc value used to convert data to a voltage to be more accurate You can also change each I O port direction and state Z FMod TCP DB FiveCo s TCP IP Controller Microsoft Internet Explorer File Edit View Favo
30. gs Two cases can happen f you plug it while the card is running the IP address will be restored as soon as all TCP connections are closed Warning you have to send Save Settinps command to the card to save it into EEPROM fthe jumper is plugged during startup the default IP address and factory settings of all parameters will be restored AND saved into EEPROM You do not need to send Save Parameters command in this case On the FMod TCP DB the SOS line is provided on the 2 54 pins connector pin 23 to provide this feature to the main board This pin is driven high by a 10k pull up resistor Force it low to reset IP address FMod TCP User Manual v 2 12 12 64 4 Quick start This section is intended to help users to quickly plug the module into their system and establish a connection between the computer and the card Detailed information about hardware and software is described further in this document You can find the board s factory communication settings on the following FMod TCP DB Power Input 5V DC label MAC 00 50 C2 30 81 00 Default IP 169 254 5 5 The Ethernet MAC Address is fixed and cannot be changed The IP Address can be changed The complete procedure is described below If the IP address has been changed you can retrieve the default value by plugging the SOS jumper See section 3 Changing IP address To easily change the factory IP address use the Win32 software provided on the
31. lue of some of them It is also mandatory that the command has to be transmitted within one TCP packet Otherwise the FMod TCP DB will ignore it Read register s command Byte Number of bits Example 0x00 Read 0x002 1 16 bits 0x0021 0x02 TransactionID 16 bits Ox1B34 0x04 Number of registers to 16 bits 0x0001 read X 0x06 X Registers Addresses X 8 bits 0x02 Ox06 X Checksum 6 bits Ox FMod TCP User Manual v 2 12 17 64 Read register s answer The module answers with the following sequence Byte Number of bits Example 0x00 Read Answer 0x0023 16 bits 0x0023 0x02 TransactionlD same as 6 bits Ox B34 demand Ox04 Number of bytes in answer_ l6 bits 0x0019 0x06 Register address 8 bits 0x02 Register value 8 128 bits 16B 0x12345 The two previous entries are replicated for every register that has been asked for reading Checksum 6 bits 0x Write register s command Byte Number of bits Example 0x00 Write 0x0022 16 bits 0x0022 0x02 TransactionID 6 bits Ox B34 0x04 Number of bytes in 16 bits 0x0003 command 0x06 Register Addresses 8 bits 0x02 0x07 Register value 8 64 bits 0x1234 The two previous entries are replicated for every register that has been asked for reading Checksum 6 bits Ox Write register s answer The module answers with the following sequence
32. me data but different representation FMod TCP User Manual v 2 12 32 64 Load web files interface List of files to load Connection About r Connection P ai Pott Load Web Files 8004 v p Close Load Web Files List of files html jpeg gif class jar This page allows developers to update web files on the FMod TCP fies File s list Remove file How does it work operations User has simply to choose files with the Add files button and then click on the Load button If you want to remove or update a file or all files use the Remove file or the Clear list buttons When the web files are ready for production the developer Save web to generate a single file than can Status be loaded on iod TCP firmware upgrader software or a custom software Number of bytes in list Create file for factory upload Load Load files into module This option allows users to load their personal web files html java jpeg gif txt into the flash memory A maximum of 44kB is available for that application An example of pages and Default Java Applet code is available on the Start Kit CDRom or on the FiveCo s web page For factory web upload the user can save a single file yourname web See FMod TCP DB WebPageUploading manual on the FiveCo web site FMod TCP User Manual v 2 12 Main port interface B FMod TCP ressource application
33. nual v 2 12 MODULE NAME 49 64 Register Address Register Name Function Read Write Control 0x15 MODULENAME rA Read Write name Register Size Register structure Unit 16 Bytes 16 only x Unsigned Bytes CHAR none Description Name and or description of the module Example For the name Hello Module extend to l6 byte the name Hello Module 5x space 16 Byte So write 0x48656C6C 6F204D6F 64756C65 20202020 FMod TCP User Manual v 2 12 50 64 UART CONFIG Register Address Register Name Function Read Write Control UART baud rate and 0x16 UARTCONFIG flow control Read Write configuration Register Size Register structure Unit Byte Unsigned Int 8 bits none Description UART baud rate and flow control configuration Bits 0 2 Baud rate configuration 0 4800 bds 9600 bps default 2 19200 bps 34 38400 bps E 57600 bps 5 15200 bps 6 15200 bps 7 15200 bps Bits 3 6 Reserved Bit 7 Hardware flow control bit 0 disabled enabled Default value 9600 bps FMod TCP User Manual v 2 12 51 64 I2C SPeeD Register Address Register Name Function Read Write Control 0x18 I2CSPD 2C speed setting Read Write Register Size Register structure Unit Byte Unsigned Int 8 bits none Description 2C speed setting between 39kHz and MHz
34. ou want a read or a write Then you have to write hex data to write to the device in the Hex data to write field if you checked the Read box the FMod TCP DB will use the read after write I2C feature After writing the I2C address 7bits hexa and the number of bytes to read if applicable click on the Send button The answer is displayed in hex in the Data received field FMod TCP User Manual v 2 12 29 64 7 Win32 Application A specific application is provided with the module to control any of its ports without having to write a specific code Overview B TCP IP Server ressource application 5 xl Connection About Connection IP address of IP EXERCI Port Pott choice the module TCP port number Connection status Open or close TCP port Depends on port To open a TCP port on the module the user has to set the correct IP address of the module to choose the correct TCP port in the list and to click on the Open button To close the port simply click on the Close button The status bar displays the status of the connection Connected Disconnected Error of connection if connection was not established within 30s Note If you forgot the IP address of the module you can use the Scan network feature of the Connection menu FMod TCP User Manual v 2 12 30 64 IP Scan address 255 255 255 255 State UDP Scan finished
35. result that can be up to 250ps old The voltage reference for that acquisition is the processor input voltage which should be a regulated 5V The accuracy of the conversion depends on that voltage s stability The lowest error best case is a half of the LSB of the Obits result FMod TCP User Manual v 2 12 57 64 AD2 VALUE FMod TCP DB only Register Address Register Name Function Read Write Control 0x24 AD2VALUE Pape A ROVERSQN e day result Register Size Register structure Unit 2 Bytes Unsigned Int 10 bits left aligned none Description The 6 less significant bits are not used Last value converted by A D port 2 The result is between O and 1023 0 means GND and 1023 means Vdd Notes The A D converter has a 0 bits resolution which means that only the 10 most significant bits of the A D VALUE register make sense others should be ignored The acquisition is done every 250us and is asynchronous with the read access of the A D VALUE register When you access this register you get the last A D conversion result that can be up to 250ps old The voltage reference for that acquisition is the processor input voltage which should be a regulated 5V The accuracy of the conversion depends on that voltage s stability The lowest error best case is a half of the LSB of the Obits result FMod TCP User Manual v 2 12 58 64 AD3 VALUE FMod TCP DB only
36. rites Tools Help Qe x a A 2 Search AIR Links amp amp Adwords Address e http 169 254 5 5 Go FMod TCP DB ADO conversion result 2 854 V AD1 conversion result 2 121 V AD2 conversion result 1 578 V woo input flow s voi npt a flow woz npt a flow vo3 input gt flow s I Continuous read Write Applet ver 1 8 04 12 07 Test AD and I Os Test UART fl Test I2C Test AD and l Os Board YCC v 5 0 AD3 conversion result 1 473 V AD4 conversion result 0 874V vos not flow z vog finput flow z 4010 input v flow x 011 input v low s i012 input gt flow zl 4013 input gt flow A 014 npt a low rz 015 npt v flow s 018 input gt flow sz O17 Input 7 L z i018 npt v low s Yolololol nnovatiwv engin ring Applet FMODTCP started The Continuous read box allows reading continually the port for monitoring purposes In other cases use the Read button to read port direction and value and Write button to write port direction and port value FMod TCP User Manual v 2 12 27 64 Test UART This page can be used to access UART bus If you click on the Connect to UART TCP Port you can send ASCII data to UART bus and receive data from it only ASCII is visible in this application 4 FMod TCP DB FiveCo s TCP IP Controller Microsoft Internet Explorer s 5 x
37. rs from factory EEPROM space Oxl2 IPADDRESS Oxl3 SUBNETMASK 0xl4 TCPTIMEOUT Oxl5 MODULENAME Oxl6 UARTCONFIG Note SAVEUSERPARAMETERS should be performed after this function in order to save restored parameters as user parameters FMod TCP User Manual v 2 12 43 64 SAVE FACTORY PARAMETERS Function Address Function Name Function Read Write Control 0x06 SAVEFACTORYPARAMETERS 908 factory Write only default Register Size Register structure Unit 0 Byte none none Description Saves the following parameters to factory EEPROM space Oxl2 IPADDRESS Oxl3 SUBNETMASK 0xl4 TCPTIMEOUT Oxl5 MODULENAME Oxl6 UARTCONFIG Note This feature should only be used by a system integrator that would change the initial factory default settings FMod TCP User Manual v 2 12 441 64 COM OPTIONS Register Address Register Name Function Read Write Control 0x10 COMOPTIONS aa Read Write options Register Size Register structure Unit 4 Bytes 32 individual bits none Description This register is reserved for future use FMod TCP User Manual v 2 12 ETHERNET MAC 45 64 Register Address Register Name Function Read Write Control Oxl I ETHERNETMAC UAE network Read only Register Size Register structure Unit 6 Bytes 6 x Unsigned Bytes none Des
38. rview Applications The FMod TCP DB is a TCP IP server board that allows manufacturers and system integrators to connect different devices such as home appliances industrial sensors and industrial control systems directly to the Ethernet network IOBaseT and to remotely monitor amp control those using standard protocols C DEVICE INTERFACE ___ MODULE communication CONTROL C SECURITY MONITOR Standart Etherrnet Switch M SERIAL UART amp RS 232 Computer Configuration amp Control ic SERIAL I2C It can be accessed through a TCP socket connection from a computer or through a simple Web Page in a standard browser which can be directly loaded into the device max 44kb The module is delivered with a default web page including a Java Applet enabling the controlling of the card The connection between this device and the user s product can be done through the following interfaces UART up to 115200 bps with or without hardware flow control TCP port 8000 Upto 191 O TCP port 8010 or UDP port 7010 Upto 5 A D converter TCP port 8010 or UDP port 7010 2C bus 2 wires bus TCP port 8010 or UDP port 7010 Note Some examples of applications illustrating the use of the card with UART I2C I O and A D devices can be found on the FiveCo s website http www fiveco ch section_motion tcp_db real_tcp_E htm FMod TCP User Manual v 2
39. start install method Indeed since this protocol uses a broadcast UDP packet even if the device is not in the same subnet it should receive its new IP address and subnet mask except if there is a router between the user software and the board Procedure Send a UDP broadcast message using a local or direct broadcast IP address to your network inside which the FMod TCP DB is connected with the following command Byte Number of bits Example 0x00 Change IP fct 0x002A 16 bits 0x002A Ox02 TransactionID 16 bits Ox0000 0x04 Length of params 0xOCOE 16 bits OxO00E 0x06 FMod TCP DB Mac Address 6 bytes 0x0050C2308 0 OxOC FMod TCP DB new IP Address 4 bytes OxCOA8 064 OxlO FMod TCP DB new 4 bytes OxFFFFOOOO SubnetMask Oxl4 Checksum 6 bits Ox If the FMod TCP DB recognizes its MAC address it will answer this command with a simple acknowledges and change its IP address and subnet mask IF NO TCP CONNECTION IS MADE TO THE BOARD Byte Number of bits Example 0x00 Change IP fct ack 0x002B 6 bits 0x002B OxO2 ransactionlD 6 bits Ox0000 Ox04 Length of params 0x0000 16 bits 0x0000 Oxl4 Checksum 6 bits Ox FMod TCP User Manual v 2 12 22 64 Checksum calculation Definition This checksum is the same as the IP checksum It is the sum of I s complement of all 16 bits words of whole message FiveCo packet except check
40. sum bytes All values are unsigned Sequence Clear accumulator Loop x Only if last word is not made of two bytes the data byte is the upper byte big endian 2 Compute l s complement of each 6bits word result is 6bits 3 Convert last result from 16 bits to 32 bits result is 32bits 0x0000 last result 4 Add last result to the 32 bits accumulator Try the Loop 5 Convert accumulator in two 6bits words 6 Add those two 6bits words result is 6bits word 7 If an overflow occurs with the last addition Carry add to the last result 8 Last result is the final result Example in hexadecimal 0x0021 OXFFDE gt 0x0000FFDE Read 0x1234 OxEDCB 0x0001EDA9 TransID 0x0003 OxFFFC 0x0002bEDA5 3 reg to read 0x0A10 OXF5EF gt 0x0003E394 reg 0A 10 02 0x02 00 OXFDFF 0x0004E193 Note that in this case a last OO is implicitly used 02 gt 02 00 0x0004 OxE193 OxE197 carry 0 OxE197 carry OxE197 Checksum OxE197 FMod TCP User Manual v 2 12 23 64 Here is an example of a checksum calculation function in C int RetCheckSum Byte ByteTab int Size This function returns the calculated checksum unsigned int Sum 0 bool AddHighByte true unsigned int ChecksumCalculated for int i 0 1 lt Size itt if AddHighByte Sum ByteTab i 8 OxFF00 AddHighByte false else Sum ByteTab i Ox00FF
41. thOfParameters X 3 16 bits 0x0005 0x06 bits Address bit 7 0 8 bits 0x28 Ox07 X number of bytes to write 8 bits 0x02 0x08 xBytes X bytes OxAFID ds Y number of bytes to read 8 bits 0x05 The four previous entries can be replicated to access the same or other 2C slaves within this command sequence Checksum 6 bits 0x The FMod TCP DB translates automatically those commands to I2C sequences f X 0 the Read method is used fY O the Write method is used fX amp YZz0O the Read after Write method is used Warning Please check that 2 X 3Y lt 240 In other case the command will be ignored by the board Note the max length of parameters is 72 bytes on this board Pay close attention to build sequences that do not exceed this and not to ask too many bytes in answer It is also mandatory that the command has to be transmitted within one TCP packet Otherwise the FMod TCP DB will return an error message FMod TCP User Manual v 2 12 I2C Read Write with ack answer The answer sequence is the following one if no error occurred 19 64 Byte Number of bits Example 0x00 I2CRWwithAckAnswer 6 bits 0x0008 0x0008 0x02 TransactionID same as 6 bits 0x1254 demand 0x04 Number of bytes in answer 16 bits 0x0005 0x06 Answer bytes Y bytes 0x1A25 M Ack state of the I2C com byte 0x87 If the same or other I2C slave have been accessed in
42. the command the answer bytes and ack state is added here Checksum 6 bits Ox The Ack state byte is composed of th e following bits 0 Address ack in write sequence 0 No answer to this address ack received Bytes written ack each byte was acked O Bytes not acknowledged ack received 2 Address ack in read sequence 0 No answer to this address ack received 3 6 Reserved 7 Must be always The user can use these bits to check for the presence of his I2C devices and monitor hardware issues I2C Read Write with ack error answer If an error occurred the answer sequence is the following one Byte Number of bits Example 0x00 I2CRWwithAckError 16 bits 0x0009 0x0009 0x02 TransactionID same as 16 bits Ox1254 demand 0x04 Number of bytes in answer 16 bits 0x0001 Ox06 Error code byte 0x0 0x07 Checksum 16 bits 0x The error code can be Ox0l The I2C bus is not ready 0x02 A timeout occurred when waiting answer from the I2C slave 0x03 2X 3Y gt 240 in I2CRWwithAck received FMod TCP User Manual v 2 12 20 64 I2C Bus scanning The following command allows user to ask an I2C bus scanning to list which addresses answer with an acknowledge I2C scan sequence Byte Number of bits Example 0x00 I2CScan 0x0005 6 bits Ox0005 0x02
43. vative Engineering Ch de la Rueyre 116 CH 1020 Renens VD Switzerland Tel 41 21 632 60 10 Fax 41 21 632 60 II www fiveco ch info fiveco ch Q9 0 C0 0 9 e innovative engineering 64 64 FMod TCP User Manual v 2 12
44. y himself the protocol is defined below This port is also used to access I O value and direction registers A D conversion result registers see page 35 for a complete description of those registers and I2C bus The I2C feature is described after registers access feature The last feature accessible through this port is the Easy IP config that is used in the Quick start chapter of this document FMod TCP User Manual v 2 12 16 64 Registers access feature TCP IP works in big endian most significant byte first followed by least significant byte The access to the data is done through an easy 6 byte header protocol over TCP Structure of each packet Function ID 2 bytes Transaction ID 2 bytes Length of the parameters 2 bytes Parameters X byte Checksum 2 bytes described later in this chapter UAWN The user sender defines the values of the Transaction IDs himself The module that receives a command sends back an answer for every command The answer contains the same Transaction ID as the corresponding command sent The user is also able to check execution of each command Warning The maximum length of parameters is 172 on this board Pay attention to not exceed this value in question AND answer frame This implies that the maximum registers that can be read at one time are almost 30 depending on registers size If the number of registers is too big the FMod TCP DB will answer only with the va
Download Pdf Manuals
Related Search
Related Contents
Verbatim CompactFlash 8GB Cal. VF86 - Issey Miyake Quick User Manual for 1 tipo propela bridado (mp) FORZA取扱説明書 warning - HIGH RENT Ê800-16090PA9Š batista_vba_me_assis Copyright © All rights reserved.
Failed to retrieve file