12.07.2015 Views

Serial to Ethernet Converter Features Applications Specifications ...

Serial to Ethernet Converter Features Applications Specifications ...

Serial to Ethernet Converter Features Applications Specifications ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

For more products visit our website http://www.sunrom.comDocument: Datasheet Date: 28-Mar-13 Model #: 1254 Product’s Page: www.sunrom.com/p-1231.html<strong>Serial</strong> <strong>to</strong> <strong>Ethernet</strong> <strong>Converter</strong>This is an embedded TCP/IP server whichhave a configurable IP address and a UARTconnected virtually over ethernet/LAN. Yourapplication can use it as alternate <strong>to</strong> a PCconnected COM port as it creates a virtualCOM port on PC which is infact connectedover LAN <strong>to</strong> this board.<strong>Features</strong>• Board is embedded TCP/IP Server• Creates Virtual COM port on PC• Tx/RX Indicating LEDs• Simple <strong>to</strong> use• Can connect with any MCU(3-5V)TX/RX pins directly<strong>Applications</strong>• Remote Logging• Data Acquisition and Controlling• Virtual COM port over ethernet<strong>Specifications</strong>Parameter Value DetailsOperation Voltage +5V Regulated +5V requiredOperating Current250mAUART Level 3-5V Can work directly with 3V or 5V MCU pinsUART baud rateFrom 9600 Configurable, All standard baud rates supported(8 bit data, no parity, 1 s<strong>to</strong>p bit) To 115.2 kbpsTypical SetupYour MCU51,AVR,PIC,ARM<strong>Serial</strong> <strong>to</strong> <strong>Ethernet</strong>Module: 1254LANPCVirtual Com PortConnected <strong>to</strong><strong>Serial</strong> <strong>to</strong> <strong>Ethernet</strong>Board: 1254


PinoutsPin Pin Name DetailsRX-I Receive Input Input serial data of 3-5V logic level, Usually connected <strong>to</strong> TXD pin ofmicrocontrollers/PC/RS232.TX-O Transmit Output Output serial data of 5V logic level, Usually connected <strong>to</strong> RXD pin ofmicrocontrollers/PC/RS232.+5V Power Supply Regulated 5V supply input. Board has LM1117-3.3V regula<strong>to</strong>r <strong>to</strong>power all parts.GND Ground Ground level of power supply. Must be common ground withmicrocontroller / USB / MAX232 board.LED StatusThere are three LED on board, which has below meaningsGreen LED indicates power okYellow LED indicates that data is being received from ethernet and sent <strong>to</strong> its UART pin. This LEDis located on the TX-OUT pin itself indicating actual data being sent <strong>to</strong> its TX-OUT pin.Red LED blinks every second when CONFIG mode is on using on board jumper.When not in CONFIG mode, Red LED blinks when byte is transmitted <strong>to</strong> ethernet. This only blinkwhen a client is actually connected over TCP else RED led does not blink.Typical ApplicationLets us consider a typical application in which we have a microcontroller board whose UART pinsTX, RX data we want <strong>to</strong> access on PC using the serial <strong>to</strong> ethernet board from sunrom model 1254AVR, PIC, 8051 etcMCU with TX,RXpins of UARTTXRX+5VGNDSunrom <strong>Serial</strong> <strong>to</strong><strong>Ethernet</strong> Board 1254LAN Cable <strong>to</strong> PC ethernet por<strong>to</strong>rLAN Network through routerRemote PC wants <strong>to</strong> access UART of MCU, it needs1) Virtual <strong>Serial</strong> port software(Provided on CDROM) which connects <strong>to</strong> remote module IPand creates a com port on PC <strong>to</strong> which the remote data is sent and received.2) Any <strong>Serial</strong> Terminal software <strong>to</strong> view or send remote serial data on the COM portcreated by above software. (Can be cus<strong>to</strong>m software also)3) Or you can use any TCP Terminal softare like PUTTY which can make remote TCPconnection as client if you are bypassing <strong>Serial</strong> terminal software option.2Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com


Configure IP and Baud RateTo change module’s IP address or baud rate of operation. This step is optional unless you want <strong>to</strong>change the Board’s IP, else you can skip and test using default board IP.Power off modulePut jumper <strong>to</strong> config ON mode, In picture below its OFF mode for normal operation.Connect <strong>to</strong> PC using serial port (Needs MAX232) or USB <strong>to</strong> <strong>Serial</strong> TTL converter.Start software from provided CDROM as below, Read/Write setting as required. This is a one timeprocess. Once you write <strong>to</strong> module it always remembers in its internal memory even after power off.Default module configuration is as below, you can change it.3Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com


Getting StartedPing the modulePing is the basic step <strong>to</strong> see if your PC can reach the board. If it does then all software or driverscan access it from PC.1) First set PC's IP <strong>to</strong> static that means 192.168.1.21 its incremented one unit more than thedefault module IP of 192.168.1.20, We set PC’s IP in same range as module so PC can pingthe module easily.2) Use the ethernet cable provided with product and connect <strong>to</strong> PC LAN port3) Power on board4) Go <strong>to</strong> Start Menu > CMD will start command prompt5) In black command prompt write ping 192.168.1.20 –t6) If you get ping command not found error then start CMD from run as right click run asadministra<strong>to</strong>r7) The –t parameter tells the ping command <strong>to</strong> keep pinging till cancel(CTRL+C), else it pings 3times only and s<strong>to</strong>ps8) When you are able <strong>to</strong> see response received text it means module is responding <strong>to</strong> ping andthe IP set in module is working.9) If you get time out message in ping it means that your PC is not in same range as module IPor board is not powered on or board is in config on module. You need <strong>to</strong> put jumper in configoff mode for ethernet <strong>to</strong> work.Note: Setting of PC IP <strong>to</strong> static is only required <strong>to</strong> ping easily, if you have a router and have set yourethetnet module IP config in same range as router assigned IP address then static IP <strong>to</strong> PC is notrequiredInstalling Virtual serial port on PC1) Software <strong>to</strong> install a virtual port on PC connected over IP is provided on CDROM.2) Install software from folder and then do setup of com port.3) Screenshot on how <strong>to</strong> set the software its named software_config.jpg on cdrom.4) This software will do two thingsa. Connect <strong>to</strong> remote module as client over TCP and listen <strong>to</strong> incoming packetsb. If packets arrive over TCP/IP they are directed <strong>to</strong> PC’s virtual com port created duringsetupc. If some one tries <strong>to</strong> send data <strong>to</strong> this PC’s virtual com port then the same data isdirected <strong>to</strong>wards remote TCP/IP of boardd. Basically this software creates a link betweeni. Remote module of ethernetii. Creates virtual COM port on PC <strong>to</strong> which data transfer can take placeNote: It optional <strong>to</strong> use this software <strong>to</strong> create Virtual com port on PC through which other softwarecan access the remote board as a COM port. Instead you can make direct connection through TCPin your software as following page shows.4Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com


Testing with PUTTYPUTTY is a terminal which can connect as client <strong>to</strong> remote server. We can use this software <strong>to</strong> testthe board. Instead of using Virtual COM port, we connect as client directly <strong>to</strong> board IP address. Youcan use this concept <strong>to</strong> make your own cus<strong>to</strong>m software that communicates directly <strong>to</strong> board.Start PUTTY and it will ask <strong>to</strong> give IP of board and port number, Use following info <strong>to</strong> connect <strong>to</strong>board’s default IP address.Click open and following window open, you can write <strong>to</strong> transmit or see data which is received.Before you proceed with it, make sure you can ping your board from PC as shown in earlier pageelse the PUTTY cannot connect.Download Link for PUTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html5Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com


PC side Terminal softwareTo test and connect <strong>to</strong> PC you can use either a simple MAX232 circuit <strong>to</strong> convert display’s TTL levelof 5V <strong>to</strong> RS232 level of +12/-12V or you can use a USB <strong>to</strong> TTL UART board. Either way you canget a serial port on PC <strong>to</strong> connect <strong>to</strong> and send commands.We recommend this software which can be used test display by sending serial data from PC side.Download it from http://www.sunrom.com/files/Terminal.exeResponse is shownhere as ASCIIResponse in HEXWrite string directly here <strong>to</strong> send6Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com


Interfacing with microcontrollerIt’s very easy <strong>to</strong> interface with microcontroller having UART at 3V or 5V level. Configure yourmicrocontroller <strong>to</strong> communicate at baud rate set in module (default 9600).Before approaching <strong>to</strong> this, we recommend you try on PC first with terminal software.VCCTTL UART INTERFACINGVCCC810uF 16VR110K39383736353433321234567831+9U2AT89S52P0.0/AD0P0.1/AD1P0.2/AD2P0.3/AD3P0.4/AD4P0.5/AD5P0.6/AD6P0.7/AD7P1.0/T2P1.1/T2EXP1.2P1.3P1.4/SSP1.5/MOSIP1.6/MISOP1.7/SCKEA/VPPRSTGND20VCC 40XTAL119C1100nP2.0/A8P2.1/A9P2.2/A10P2.3/A11P2.4/A12P2.5/A13P2.6/A14P2.7/A15P3.0/RXD 10P3.1/TXD 1112P3.2/INT013P3.3/INT114P3.4/T015P3.5/T116P3.6/WR17P3.7/RDXTAL2182122232425262728PSEN 29ALE/PROG 30Y1U4Sunrom <strong>Serial</strong> <strong>to</strong> <strong>Ethernet</strong> <strong>Converter</strong> Model#1254RX-INTX-OUT+5VGND4321VCCC933p11.0592C1033p7Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com


Interfacing with RS232If you wish <strong>to</strong> interface the module with RS232 level like a PC serial port or any other device youneed a level conver<strong>to</strong>r such as MAX232 as shown below.U5Sunrom <strong>Serial</strong> <strong>to</strong> <strong>Ethernet</strong> <strong>Converter</strong> Model#1254RX-INTX-OUT+5VGND4321VCCRS232 INTERFACINGC1310uF 16VC1410uF 16VInterfacing <strong>to</strong> USB Port and Powering from USB Port++VCC1191210132U6MAX232T1INR2OUTR1OUTT2INC+VCCVCC 16GNDT1OUTR2INR1INT2OUTC2+C1-C2-V+ V-15C16100n148137456++C1210uF 16VC1510uF 16VP2DB9-CONN-F162738495You can also use ourMax232 Board Model 1104http://www.sunrom.com/p-245.htmlU9Sunrom <strong>Serial</strong> <strong>to</strong> <strong>Ethernet</strong> <strong>Converter</strong> Model#1254U8USB <strong>to</strong> <strong>Serial</strong> Board SUNROM#1151/1192RX-INTX-OUT+5VGND4321RX-INTX-OUTGND+5V1234You can use ourUSB <strong>to</strong> <strong>Serial</strong> BoardModel 1151 or 11921151 model plugs in directly <strong>to</strong> USBport of PCUSB INTERFACINGOur USB <strong>to</strong> <strong>Serial</strong> TLL will appear as virtual serial port on PC <strong>to</strong>which you can communicate through any software which cantransmit receive by this serial port like hyperterminal orcus<strong>to</strong>m made software.http://www.sunrom.com/p-244.htmlSimilar model <strong>to</strong> above but needs aUSB A-B Type cablehttp://www.sunrom.com/p-1145.html8Sunrom TechnologiesYour Source for Embedded SystemsVisit us at www.sunrom.com


Our Package Contains<strong>Serial</strong> <strong>to</strong> <strong>Ethernet</strong> Board (Assembled and Tested)Lan Cable 3 Meter longCDROM containing manual+config software+virtual COM port software9Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!