Home

EVB8051 User's Manual

image

Contents

1. am Fig 4 EVB8051 gt Fig 5 shows the five W3100A sample chips provided with the EVB8051 js DChip ret Hardwired Internet Connectivity Wizard lt Fig 5 Sample chips of W3100A gt EVB8051 User s Manual 3 Fig 6 shows the User s Manual of the EVB8051 User s Manual 8051 Evaluation Board C 2007 inc www PTT Fig 6 User s Manual Fig 7 shows the 5V Power Adaptor for supplying power to the EVB8051 Fig 7 Power Adaptor 5V gt 4 EVB8051 User s Manual Fig 8 shows the Software CD provided with the EVB8051 It contains Documents Schematics Source Code and Software Fig 8 Software gt Fig 9 shows the UTP Cable Twisted Cable for connecting the EVB8051 directly to the PC Fig 9 UTP Cable gt EVB8051 User s Manual 5 Fig 10 shows the Serial Cable Female to Female for connecting the EVB8051 to the PC It is used for monitoring and program downloading Please refer to Appendix B Specification of serial cable Fig 10 Serial gt Fig 11 gt shows the LCD provided with the EVB8051 It is useful for testing the functions of the web server and for debugging Fig 11 LCD ii gt 6 EVB8051 User s Manual 1 1 2 Software CD The EVB8051 is supplied with a Software CD that contains various development tools including Documents Schematics Source Code and
2. 3 Programmer s Guide 3 4 A API Function 3 1 1 Type of Functions 1 Internal Function Used inside the driver function 2 APIFunction Used in applications Function Name void IntO void interrupt 0 Arguments None Return value None Description Interrupt handling function of the W3100A Stores the status information that each function waits for in the global variable S STATUS for transfer S STATUS stores the interrupt status value for each channel Category Internal Function Function Name void ISR ESTABLISHED SOCKET s Arguments s Channel number Return value None Description Established connection interrupt handling function Called upon connection establishment and may be inserted in user code if needed by the programmer Category Function Name Internal Function void ISR CLOSED SOCKET s Arguments s Channel number Return value None Description Closed connection interrupt handling function Called upon connection closure and may be inserted in user code if needed by the programmer Category v a lt w s lt IccAsKsssvussua EVB8051 User s Manual Internal Function 17 Function Name void 158 RX SOCKET s Arguments s Channel number Return value None Description Received data interrupt handling function Called upon receiving data and may be inserted in u
3. WR PTR up to the size to be transmitted and performs the send command Category Function Name Internal Function int recv SOCKET 5 char buf int len Arguments s Channel number buf Pointer where the data to be received is copied len Size of the data to be received Return value Received data size Description TCP data receiving function The recv function is an application I F function It continues to wait for as much data as the application wants to receive Category Function Name API Function int sendto SOCKET s const u_char buf int len char addr u int port Arguments s Channel number buf Pointer indicating the data to send len Size of the data to send addr Destination IP address Return value Sent data size Description UDP data sending function Composed of the sendto and sendto in functions The send function is an application I F function It continues to call the send in function to complete the sending of the data up to the size of the data to be sent when the application is called Unlike TCP transmission it designates the destination address and the port Category API Function 22 EVB8051 User s Manual Function Name int sendto in SOCKET s const u_char buf u int len Arguments s Channel number buf Pointer indicating the data to send len Size of the data to send
4. Description Function handling the channel socket information Category Function Name API Function int read data SOCKET s char src u_char dst int len Arguments s Channel number src Receive buffer pointer of the W3100A dst System buffer pointer len Data size to be copied Return value Copied data size Description Copies the receive buffer data of the W3100A to the system buffer It is called from the recvfrom function Category Function Name Internal Function int write data SOCKET s u_char src u_char dst u int len Arguments s Channel number src System buffer pointer dst Transmit buffer pointer of the W3100A len Data size to be copied Return value Copied data size Description Copies the system buffer data to the transmit buffer of W3100A Itis called from the send in or sendto in function Category Function Name Internal Function void wait 10ms int cnt Arguments cnt count Return value None Description Designates the delay Waits for 10 milliseconds Category EVB8051 User s Manual 24 Internal Function Function Name void 1ms int cnt Arguments cnt count Return value None Description Designates the delay Waits for 1 millisecond Category Internal Function Function Name void wait 1us int
5. Return value Sent data size Description UDP data sending function An internal function that is the same as the send in function of the TCP Category Internal Function Function Name u int recvfrom SOCKET s u char buf u int len u char addr u int port Arguments s Channel number buf Pointer where the data to be received is copied len Size of the data to be received addr Peer IP address for receiving port Peer port number for sending Return value Received data size Description UDP data receiving function Function for receiving UDP and IP layer RAW mode data and handling the data header Category Function Name API Function char close SOCKET s Arguments s Channel number Return value 1 Description Channel closing function Function for closing the connection of the designated channel Category API Function REA SRRwwAL LAAAAAAL LAAAiLLLLLLI IAIKHARNMMNNN M RM ww s n ws n n s P nf EVB8051 User s Manual 23 Function Name int select SOCKET s u_char func Arguments s Channel number func SEL CONTROL 0x00 gt return socket status SEL SEND 0x01 SEL 0 02 return free transmit buffer size return data size in receive buffer Return value Socket status or free transmit buffer size or received data size
6. Yes Service Loopback Closed by peer Receive data from W3100A Transmit data via W3100A Yes No Already closed lt AAhnLLLLLLLLLLLAAAdAmAAAAALLLNHENNMNM M Y X EVB8051 User s Manual 27 3 2 3 UDP 3 2 3 1 Source Codes Software Board UDP 3 2 3 2 Flow Diagram Initialization 8051 LCD W3100A Software Reset Network Configuation Apply default netowrk configuration in EEPROM or Update network configuration Create UDP Socket Error occurred alculate received Service Loopback Receive data from W3100A Transmit data via W3100A 28 EVB8051 User s Manual 3 2 4 Web Server 3 2 4 1 Source Codes Software Board Web Server 3 2 4 2 Flow Diagram Initialization 8051 LCD W3100A Software Reset Network Configuation Apply default netowrk configuration in EEPROM or Update network configuration Y Create TCP Socket with port 80 Y Set the socket to server mode gt lt End C No Is socket connected __ receive bc cu size Close socket Yes Yes Receive data from W3100A Closed by peer Y No Analyze HTML request ud message Yes Already dc Y No Create HTML header ET 1 uest
7. tos Value to be set for the TOS field of the IP header Return value Description None Handles protocol setup function in IP RAW mode Category Function Name API Function char socket SOCKET s u char protocol int port char flag Arguments s Channel number protocol Protocol designated for the channel SOCK STREAM 0x01 TCP SOCK_DGRAM 0x02 gt UDP SOCK IPL RAW 0x03 IP Layer RAW SOCK RAW 0x04 gt MAC Layer RAW port Source port designated for the channel flag Options designated for the channel SOCKOPT BROADCAST 0x80 gt 1 refers to broadcast data transfer in UDP mode SOCKOPT_NDTIMEOUT 0x40 gt 1 refers to use of only the register that designates the timeout value SOCKOPT NDACK 0x20 gt 1 refers to the delayed ACK not to be used SOCKOPT SWS 0x10 gt 1 refers to the silly window syndrome to be used Return value Channel number if succeeded or 1 if failed Description Initialization of the channel Initializes the designated channel and waits for completion of W3100A handling Category Function Name API Function char connect SOCKET s char addr int port Arguments s Channel number addr Destination IP address port Destination port number Return value 1 if connection is established or 1 if connection fails Description Sets the connection to the designated peer Establishe
8. Fig 20 Input of the Connection Information Once a connection is set up between the EVB8051 and the computer a box with the Connected message appears as shown in Fig 215 A Connected lt Fig 21 Connection Setup Complete gt After the connection setup select Send from the File menu The dialog box for file transfer appears Select a file to start the loop back test Refer to Fig 22 gt 0 20 Mbps 778240 Bytes Fig 22 File Transfer You can perform the Loopback test successively using the A uto command or the I teration command Make sure to perform the S end command before the A uto command or the I teration command Refer to Fig 23 gt u as Bia a EVB8051 User s Manual 13 1 i2Chip Loopback Test Program File E TCP UDP Test IZChip Send 0 2000 Mbps 1007370 bytes 38 4224 secon ZChip Recv 0 2117 Mbps 1007370 bytes 36 3005 seconds 2 IZChip Send 0 2148 Mbps 1007370 bytes 35 7862 secon ZChip Recv 0 2111 Mbps 1007370 bytes 36 4019 seconds IZChip Send 0 2151 Mbps 1007370 bytes 35 7271 secon I2Chip Recv 0 2116 Mbps 1007370 bytes 36 3254 seconds IZChip Send 0 2147 Mbps 1007370 bytes 35 7972 secon 2Chip Recv 0 2112 Mbps 1007370 bytes 36 3961 seconds IZChip Send 0 2144 Mbps 1007370 bytes 35 8430 secon ZChip Recv 0 2109 Mbps 1007370 bytes 36 4422 seconds 6 IZChip Send 0 2143 Mbps 1007370 bytes 3
9. SOCKET s u_char buf u int len Arguments s Channel number buf Pointer indicating the data to be sent len Size of the data to be sent Return value Sent data size Description Function for sending TCP data Composed of the send and send in functions The send function is an application I F function It continues to call the send in function to complete the sending of the data up to the size of the data to be sent when the application is called The send in function receives the return value the size of the data sent calculates the size of the data to be sent and calls the send in function again if there is any data left to be sent Category API Function aa lt a a p pipa ui rm sa a sa sas EVB8051 User s Manual 21 Function Name int send in SOCKET char buf int len Arguments s Channel number buf Pointer indicating the data to be sent len Size of the data to be sent Return value Sent data size Description Internal function for sending TCP data Called by the send function for TCP transmission It first calculates the free transmit buffer size and compares it with the size of the data to be transmitted to determine the transmission size After calculating the data size it copies data from WR It waits if there is a previous send command in process When the send command is cleared it updates the
10. Software Fig 12 shows the directory structure of the Software CD Ww31004 Web Server Loopback 1 Source lt Fig 12 Directory Structure of the Software CD gt 1 1 2 1 Document Contains the data sheets of essential parts including the W3100A data sheet 1 1 2 2 Schematic Contains the circuit diagram of the EVB8051 The PAL subdirectory contains the PAL Source that is necessary for interfacing the 8051 MCU and the W3100A 1 1 2 3 Software Software is provided for the board and PC applications The software for the board contains the W3100A API Driver for the 8051 and some samples of application source code The software for PC applications contains Loopback source code and execution files for Windows EVB8051 User s Manual 7 1 2 System Configuration 1 2 1 PC Setup 1 2 1 1 Connecting Cables For testing the functions of the EVB8051 and for application development the system should be configured as shown in lt Fig 13 gt First the EVB8051 is connected to the PC using the UTP Cable for data transmission and the Serial Cable for monitoring and for program downloading mmu Serial Cable UTP Cable EVB8051 Fig 13 System Configuration between EVB8051 and gt 1 2 1 2 Network Configuration For convenience of development the EVB8051 contains the following default network information gt IPaddress 192 168 0 2 gt MAC
11. cnt Arguments cnt count Return value None Description Designates the delay Waits for 1 millisecond Category Internal Function _ _ _ sssscCcrssv lt w s lt sw EVB8051 User s Manual 25 3 2 Sample Source Codes 3 2 1 Loopback amp TCP Server 3 2 1 1 Source Codes Software Board amp TCP Server 3 2 1 2 Flow Diagram Initialization 8051 LCD W3100A Software Reset Network Configuation Apply default netowrk configuration in EEPROM or Update network configuration Y Create TCP Socket Y Set the socket to server mode Error occurred Is socket connected Close socket Yes Service Loopback Closed by peer Receive data from W3100A Transmit data via W3100A Yes No Already closed 26 EVB8051 User s Manual 3 2 2 TCP Client 3 2 2 1 Source Codes Software Board Client 3 2 2 2 Flow Diagram Initialization 8051 LCD W3100A Software Reset Network Configuation Apply default netowrk configuration in EEPROM or Update network configuration n Create TCP Socket Y Try to connect to the Server Close socket 1 successfully connected Error occurred alculate received Is socket connected Close socket
12. error level Fig 26 Making a new project 3 3 2 Program Downloading and Running Procedure based on Flip by ATMEL Connect the 8051EVB and the COM port of the PC with the serial cable Slide the switch on the JP2 to the left and turn the power 3 Run Flip the ISP program of ATMEL and select T89C51RD2 as the device Device gt Select gt T89C51RD2 4 Select Setting gt Communication gt RS232 and click the Connect button COM1 Baud 38400 SpecialSync Connect Disconnect Sync Cancel Fig 27 Setting RS232 gt 5 Execute File Load HEX to load the file to be downloaded 6 Press the Run button to reprogram the internal flash memory of the 8051 in accordance with the Operation Flow 7 Turn off the power slide the switch on JP2 to the right and turn on the power back to run the program that was downloaded in step 6 EVB8051 User s Manual 31 Atmel Flip 1 6 0 Range 4000 5207 Checksum 076408 lt Fig 28 FLIP by ATMEL gt 32 EVB8051 User s Manual 3 3 3 Memory Map ATMEL Version EVB FFFFh FFFFh W3100A Rx Buf E000h W3100A Tx Buf C000h A000h Voice Module DK 9800h 64K Byte Webcam DK Internal Flash 9400h LCD Application Program 9000h Seon W3100A Control Reg 8000h SRAM 32K Byte 0000h 0000h Fig 29 Memory of EVB8051 EVB8051 User s Manual 33 4 Hardware Desig
13. 000 0x93ff process Addr nRD nWR begin if Addr gt 100100 and Addr lt 100101 and 0 or nWR 0 then LCDCS lt 1 else LCDCS lt 0 end if end process CAM 0x9400 0x9800 process Addr begin if Addr gt 100101 and Addr lt 100110 then nCS lt 0 else nCS lt 1 end if end process VM 0x9800 0xA000 process Addr begin if Addr gt 100110 and Addr lt 101000 then nCS lt 05 else nCS VM lt 1 end if end process EVB8051 User s Manual 35 W3100A 0x8000 0x9000 0xC000 0x10000 process Addr nRD nWR begin if Addr gt 100000 and Addr lt 100100 or Addr gt 110000 and nRD 0 or nWR 0 then nCS DCHIP 0 else nCS DCHIP lt 1 end if end process end arch test 4 3 Parts List Please refer to part list in Software CD Schematic 36 EVB8051 User s Manual Appendix A Quick Testing Procedure A 1 Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 A 2 Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Loopback Test Check whether EVB8051 is connected to PC correctly with UTP cable Slide JP2 on EVB8051 to the right and turn on the power of EVB8051 Ping to EVB8051 192 168 0 2 on the PC whether EVB8051 is connected to the PC correctly Install Axinstall exe only for the first time and run Ax1 exe on the PC Select
14. 5 8655 secon IZChip Recv 0 2109 Mbps 1007370 bytes 36 4481 seconds H H m H tn H Fig 23 Loopback Test in Succession If the program does not run properly try downloading the loopback program from the Software CD Software B amp TCP Server loopback hex into the EVB8051 again 2 2 2 Web Server Test 2 2 2 1 Outline The EVB8051 provides the source code to control the equipment through the web and is available for developing applications that require web server functions 2 2 22 Testing Procedure The test method for the web server is the same as for the Loopback test Download the web server program ASoftware Board Web Server webserv hex from the Software CD to the EVB8051 for testing Run the ping command to the EVB8051 to check network operation By default the IP address of the EVB8051 is set to 192 168 0 2 If the Ping command works properly run the web browser on the PC and enter the IP address of the EVB8051 192 168 0 2 in the URL window to attempt to access the web server of the EVB8051 If the EVB8051 is running in web server mode the starting screen of the web page will look like Fig 20 gt ii gt 14 EVB8051 User s Manual WEB CONTROL 8051 EVB Microsoft Internet Explorer Tee Bae BARA sath 3 2 ze ES BARD TER E Er Awe M eus 8051 E
15. EVB8051 User s Manual ee Version 2 0 IZnet COPYRIGHT NOTICE Copyright 2002 WIZnet Inc All Rights Reserved Technical Support support wiznet co kr Sales amp Distribution sales wiznet co kr General Information info wiznet co kr Tel 82 2 547 9709 Fax 82 2 547 9711 For more information visit our website at http www wiznet co kr aa ii EVB8051 User s Manual Table of Contents t Getting Started e ee dide u velie e 1 Ll 8057 Package 1 1 1 1 Components a eem ee RH eee e re ER 1 1 122 Software COD u u u 1 2 System Configuration 8 L2 ueneno teen eene pvo tiae eeu 8 1 2 2 Evaluation Board Configuration eese tenete tenente 9 2 Users n vci rdv dm 11 2 1 Evaluation Board Layout eter eed ene 11 22 acq k am S pa mu 12 2 2 1 Loopback Test a ete EROR E Rer RUE HA ws 12 2 22 Web Servet Test aceites rete tede werte ee icm deat e 14 2 3 Troubleshootmg 15 231 Pine esae RES ER RE SOROR IR E D qa EO RERO 15 2 3 2 MISC ice es ee oreet a tede mad e e ee e e etis 16 3 Programmers GUIDE uuu uu u Vi tdt nx 17 3 1 APL PUMCION M 17 3 14 Type of Func
16. EVB80512 a SBig AH EVBSO5 XFig 5 Sample chips of W3 TO0A S n Pig OU Ser Manual Pp eee eese ca utente ayaa cipe 7 Power Adaptor Chis Sg 9 ac a c a a oes pag Serial Cable2 Pep RM IURE eres ONCE OTHO lt Fig 12 Directory Structure of the Software lt Fig 13 System Configuration between EVB8051 and gt XFig 14 DIP Switch SW2 for W3100A mode setting XFig 15 DIP Switch SW1 for PHY mode Setting gt lt Fig 16 Meaning of Each DIP Switch eene rennes 10 17 Example setting ETE RENE 10 ag Toc avout opt V BOOS tenen 11 lt Fig 19 Running of Program2 gt n 12 lt Fig 20 Input of the Connection Information gt Y 13 XFig 21 Connection Setup Complete 13 22s Eran Stet uie rr ne EE REPE e ME Eas 13 XFig 23 Loopback Test in Succ essIon gt u 14 lt Fig 24 Starting Screen for the Demo Web Page of the 8051 gt 15 lt 2 Ot VISION DT reete eere m t eater e ee sS 30 XFig 26 Making a new p
17. TCP Connect menu and enter EVB8051 s IP address and Port number 5000 Select File Send menu and select a file to transfer Web Server Test Connect the EVB8051 and the COM port of the PC with the serial cable Slide the switch on the JP2 to the left and turn on the power Run Flip and select T89C51RD2 as the device in Device Select menu Select Setting Communication RS232 menu and click the Connect button Select HEX to load webserv hex to be downloaded Press the Run button to reprogram the internal flash memory of the 8051 in accordance with the Operation Flow Turn off the power of EVB8051 and slide the switch on JP2 to the right and turn on the power back to run the program that was downloaded in step 6 Run web browser on the PC and enter URL http 192 168 0 2 EVB8051 User s Manual 37 Appendix B Specification of Serial Cables Serial 9 pin Serial 9 pin Female Female c 1 G RD 2 2 RD Tm TD DR 4 L4 DIR eae 4 sa 5 5 SG Signal Ground DR 6 76 x N FIN N TAN RS 7 cts 8 CTS R 9 R TD Transmit Data Serial Data Output TXD RD Receive Data Serial Data Input CTS Clear to Send This line indicates that the Modem is ready to exchange data DCD Data Carrier Detect When the modem detects a Carrier from the modem at the other end of the phone line th
18. address 00 08 DC 00 00 00 gt Gateway address 192 168 0 1 gt Subnet Mask 255 255 255 0 The above information contained in the EVB8051 can be modified at any time to suit the developer s purpose First for testing purposes set the PC network information as follows gt IPaddress 192 168 0 5 Gateway address 192 168 0 1 gt Subnet Mask 255 255 255 0 After the above setup confirm the operation of the EVB8051 on the PC using the Ping command gt ping 192 168 0 2 t If the connection has been set up properly the following message will be displayed on the screen Pinging 192 168 0 2 with 32 bytes of data Reply from 192 168 0 2 bytes 32 time lt 10ms TTL 128 Reply from 192 168 0 2 bytes 32 time lt 10ms TTL 128 Reply from 192 168 0 2 bytes 32 time lt 10ms TTL 128 If the connection has not been set up properly the following message will be displayed on the screen Pinging 192 168 0 2 with 32 bytes of data Request timed out In this case please refer to Troubleshooting Guide 2 3 1 8 EVB8051 User s Manual 1 2 1 3 Program Installation Since the EVB8051 uses an ATMEL 8051 MCU you can use the development tools In System Programmer provided by ATMEL To download the tools required for development visit the ATMEL site and download the latest version of the FLIP Software for installation 8051 Architecture Software http www atmel com atmel products prod74 htm FLIP Software Download dev tools3bc6cOc
19. d 10 Mbps SWi ON OFF Fig 17 Example setting of SW1 gt s a a sp a gt yzsr rs 10 EVB8051 User s Manual 2 User s Guide 2 1 Evaluation Board Layout Fig 18 gt illustrates the layout of the EVB8051 Board On the upper left is the processor area that includes the 8051 MCU with 64 Kbytes of flash memory and 32 Kbytes of SRAM The expansion connector is also located here On the upper right is the connector and space for connecting the TEXT LCD The power section is located on the bottom left which accepts 5V and supplies 5V and 3 3V to the board On the bottom right are the i2Chip W3100A and the PHY Also the PHY LED indicating PHY status and the mode switches for the i2Chip W3100A and the PHY are located here WIZNET 8051EVB REV2 0 pese S ee Ae ey Pd OP Cir m RE Lr T TR 1 Se Stee po Cup a a cr s Connector LCD 8051 74573 Serial C 22 1184MHz Socket t Crystal 232 r 7414 32KByte SRAM 25MHz OSC i2Chip W3100A 16V8 PAL 881 16V8 PAL PHY RJ45 Power 5V Switch RED Mode Mode Fig 18 Layout of EVB8051 lt LLALCAAALALLALATALAAAAALLLLO I ss EVB8051 User s Manual 11 2 2 Function Testing 2 2 1 Loopback Test The Loopback is the operationa
20. ebce3f zip now 1 9M updated Apr 24 2002 FLIP Flexible In system Programmer software v1 6 0 Runs Windows 9x Me NT 2000 XP Supports RS232 or CAN link 1 2 2 Evaluation Board Configuration 1 2 2 1 W3100A mode setting W3100A provides three modes non clocked clocked and external clocked mode DIP switch SW2 is used for setting all 3 bit values For details about each mode value refer to the explanation for the Mode 2 0 pin on the W3100A Datasheet 1 is the MSB Most Significant Bit and the bit value is 1 when itis ON 0 when itis OFF Example When the mode is set to 010 Non clocked mode SW2 ON gt 010 OFF 2 8 Fig 14 DIP Switch SW2 for W3100A mode setting 1 2 2 2 PHY mode setting DIP switch SW1 is used for setting the characteristics of the Ethernet PHY chip negotiation speed and duplex SWi ON OFF 1 2 3 4 4 Speed Duplex ANE Auto Negotiation lt Fig 15 DIP Switch SW1 for PHY mode setting gt EVB8051 User s Manual 9 D Switch 1 is used for selecting the ANE Auto Negotiation function Disable Enable 2 Switch 2 is used for selecting Half or Full Duplex Half Full Duplex 3 Switch 3 is used for selecting the Speed 10 100 Mbps The set values for each switch are shown in Fig 16 gt Duplex Half Duplex Full Duplex 2 Fig 16 Meaning of Each DIP Switch Example When the mode is set to ANE disable Full Duplex an
21. is Line becomes active DSR Data Set Ready This tells the UART that the modem is ready to establish a link DTR Data Terminal Ready This is the opposite to DSR This tells the Modem that the UART is ready to link RTS Request To Send This line informs the Modem that the UART is ready to exchange data RI Ring Indicator Goes active when modem detects a ringing signal from the PSTN 38 EVB8051 User s Manual
22. l mode for measuring the transmission performance of the i2Chip W3100A on the EVB8051 It is used for measuring data transfer speed when the EVB8051 board receives data from the PC and sends it back to the PC 2 2 1 1 Configuration Since the EVB8051 board is equipped with default Loopback execution code TCP Server in the internal flash memory its operation can be verified immediately after a network has been set up First install the Axinstall exe program located in the Software PC Loopback folder the CD on PC Once Axinstall exe is installed Axl exe program is created and is required by the PC for Loopback testing To run the Loopback program loaded on the EVB8051 slide the JP2 Slide Switch on the board to the right 2 21 2 Loopback Test Run the ping command from the PC to the EVB8051 to check network operation By default the IP of the EVB8051 is set to 192 168 0 2 ping 192 168 0 2 On the PC run the AX1 exe program for connection setup The screen will look like Fig 19 gt Z i2Chip Loopback Test Program File E TCP UDP Test lt Fig 19 Running of AX1 exe Program gt From the menu of the AXI program select Connect to display the dialog box as shown in Fig 20 gt Enter the IP address assigned to the EVB8051 192 168 0 2 and the Port 5000 number and try the connection iii 12 EVB8051 User s Manual IP n 1 171 137 38 m
23. me No CG 5 Yes Display text or LED Execute function Create HTML body Y Transmit HTML document EVB8051 User s Manual 3 3 Application Development Procedure 3 3 1 Program Developing Procedure based on the KEIL compiler 3 3 1 1 Configuration 1 RunuVision 51 2 In Options gt BL51 Code Banking Linker set the Xdata Address arbitrarily in the SRAM area and the Code Address to 0 Refer to the Memory Map BL51 Code Banking Linker Size Location Additional Bank Area Cancel Ram Size decimal 256 Segment Location Help Bit Address hex Xdata Address hex 4000 Default Code Address hex 0000 data Address Des Data Address hex Pdata Address hex Command Line Options String RS 255 PL 68 P w78 CO DODOH D 4000H Fig 25 uVision 51 gt 3 3 1 2 Making a New Project 1 Make a new project and add startup a51 and necessary sources Startup a51 file does not need to be modified 2 Modify or develop the program 3 Compile it 30 EVB8051 User s Manual Project EWwORKw8051w TEST PRJ Source Files TEST C oad See Remove Cancel Help Move Down Dpen Open All Translator 451 Assembler x Command Always Build V IncludeinLink Lib Object Ponti npa Eatal Error Warning acd Dust error level error level
24. ner s Guide 41 EVB8051 Schematic Please refer to schematics in Software CD Schematic 42 PAL library ieee use ieee std logic 1164 all entity test is port Addr instd logic vector 5 downto 0 nPSEN in std_logic nRD in std_logic nWR in std logic nEA in std logic nROMCS out std logic nRAMCS out std logic nCS DCHIP out std logic LCDCS out std logic nCS VM out std logic nCS CAM out std logic nROMRD out std logic nRAMRD std logic ATTRIBUTE pin numbers of test ENTITY IS Addr 5 6 amp Addr 4 5 amp Addr 3 4 amp Addr 2 3 amp Addr 1 2 amp Addr 0 1 amp nPSEN 9 amp nRD 7 amp nWR 8 amp nEA 11 amp nROMCS 12 amp nRAMCS 13 amp nCS DCHIP 15 amp LCDCS 14 amp nCS_VM 16 amp nCS CAM 19 amp nROMRD 17 amp nRAMRD 18 end test architecture arch_test of test is begin nROMRD lt nPSEN 34 EVB8051 User s Manual nRAMRD nRD nROMCS 0x0000 Ox7fff External ROM process Addr nPSEN begin if Addr gt 000000 and Addr lt 100000 and nPSEN 0 then nROMCS lt 05 else nROMCS lt 1 end if end process nRAMCS 0x0000 Addr nPSEN begin if Addr gt 000000 and Addr lt 100000 and nPSEN 1 then nRAMCS lt 0 else nRAMCS lt 1 end if end process LCDCS 0x9
25. on Name API Function void setMACAddr u char addr Arguments addr Pointer having the value for setting up the MAC address Return value None Description MAC address setup function Category Function Name API Function void settimeout u char val Arguments val Pointer having the value for setting up the timeout Upper 2 bytes have the initial timeout value while the last 1 byte has the number of retransmissions until timeout Return value None Description TCP timeout setup function Used for adjusting the TCP retransmission time A timeout interrupt takes place when retransmission is attempted for establishing the connection or for data transfer beyond the set value Category API Function Function Name void setlNTMask u char mask Arguments mask Value of the mask to be set 1 refers to interrupt enable Return value None Description Interrupt mask setup function Enables disables the concerned interrupt Category Function Name API Function void setbroadcast SOCKET s Arguments s Channel number Return value None Description Broadcast data transfer enable setup function Enables disables broadcasting data transfer in UDP or IP RAW mode Category API Function v uu ww nssvuM e EVB8051 User s Manual 19 Function Name void setTOS SOCKET s u char tos Arguments s Channel number
26. roject eee hene 3l SH igi Settng aate i neto eee e pee 31 SBE1g 28 BLIP AT MELD eise tr aN 32 lt Fig 29 Memory of BVB80513 52ad dd e e e e e e Wed vs 33 Table 1 List of Items EVB8051 User s Manual Figures Tables Contained in the 805 1 l Getting Started 1 1 EVB8051 Package 1 1 4 Components The 8051 is packaged as shown in Fig 15 and its contents are as shown in Fig 2 gt Chip W3100 Designer s Kit Hardwired Internet Connectivity Wizard Easy design package devign module combined wth B3100 MCU Cex amp Manual to help yor develop Internet cnatited Kthernet Devices lt Fig 1 EVB8051 Package gt lt Fig 2 Inside of EVB8051 Package gt EVB8051 User s Manual The EVB8051 contains the items described in the table below Photographs of the items are shown in Fig 3 gt through Fig 11 gt Table 1 List of Items Contained in the EVB8051 gt 1 EVB8051 1 2 i2Chip W3100A 5 3 User s Manual EVB8051 1 4 Power Adaptor 5V 1 5 Software CD 1 6 UTP Cable 1 7 Serial Cable 1 8 LCD 1 ars Sono OUO 1 HE OEE BUG eeu ire ma mna wen Fig 3 All Items Contained in the EVB8051 gt 2 EVB8051 User s Manual Fig 4 shows the EVB8051 Board MICE ENS
27. s a connection with a peer on the designated channel and waits until the connection is established TCP client mode Category API Function 20 EVB8051 User s Manual Function Name char listen SOCKET s u_char addr int port Arguments s Channel number addr Peer IP address at the time of connection establishment port Peer Port number at the time of connection establishment Return value 1 if connection is established or 1 if connection fails Description Waits for connection with a peer Blocking Mode The designated channel waits for connection by a peer TCP Server mode Category API Function Function Name char NBlisten SOCKET s Arguments s Channel number Return value 1 Description Waits for connection with a peer Non blocking Mode The designated channel waits for connection by a peer TCP Server mode Category Function Name API Function void initseqnum SOCKET s Arguments s Channel number Return value None Description Generates random values for the initial SEQ to be used for establishing a TCP connection This function may be added to the code for generating random numbers for assigning a random number to initial SEQ used in TCP In an actual internet environment the initial SEQ must be a random number A fixed number is used for EVB DK Category Function Name API Function int send
28. ser code if needed by the programmer Category Function Name Internal Function void initW3100A void Arguments None Return value None Description W3100A initialization function Function for S W resetting of the W3100A Sets the initial SEQ to be used for TCP communication Category Function Name API Function void sysinit void Arguments None Return value None Description W3100A initialization function Sets the source MAC source IP gateway and subnet mask to be used by the W3100A to the designated values May be called when setting the concerned register to modify network information and reflect it on the W3100A Category Function Name API Function void setsubmask u char addr Arguments addr Pointer having the value for setting up the subnet mask Return value None Description Subnet mask setup function Category Function Name API Function void setgateway u char addr Arguments addr Pointer having the value for setting up the gateway IP Return value None Description Gateway IP setup function Category API Function 18 EVB8051 User s Manual Function Name void setlP u char addr Arguments addr Pointer having the value for setting up the source IP address Return value None Description W3100A IP address setup function Category Functi
29. tions ER eee nun 17 3 2 1 5 s a 26 3 2 1 TCR Server eee oet inte ere ee Peer Pete bea 26 322 TEP aee RR E P woes 27 32 3 UDP sein err RR YR 28 324 WED lun ter as uuu E E e ie te i 3 3 Application Development Procedure 30 3 3 1 Program Developing Procedure based on compiler 30 3 3 2 Program Downloading and Running Procedure based on Flip by 31 3 3 3 Memory s rotto ep e dein e eaa de tte ice 4 Hardware Designer s Guide 34 EVB8051 User s Manual iii CA elit sa eS ead ea een cheba 34 43 Parts ASU cusses teer eti oH tot tat mates used iS OI Fdo uide aa esu peu Tune tut 36 Appendix A Quick Testing Procedure 37 Loopback 37 A2 WebServer 37 Appendix B Specification of Serial Cables 38 a waw ua s s vw nIs rsS EVB8051 User s Manual XFig 1 EVB8051 gt a XFig 2 Inside of EVB8051 gt hes hene hene reser sens lt Fig 3 All Items Contained in the
30. valuation Board for i2Chip Due Fig 24 Starting Screen for the Demo Web Page of the EVB8051 gt 2 2 2 3 Functions of the Demo Web Page 1 LCD Character Display Entering characters in the LCD Text Box on the demo page will display the characters on the LCD of the EVB8051 The LCD should be installed separately on the EVB8051 2 LED Remote Control It controls the LEDs on the board through the web In actual applications it can be used for controlling other devices than the LED in remote places through the web Selecting LED 1 and LED 2 in Fig 20 gt will turn the LEDs D1 D2 on the EVB8051 ON OFF 2 3 Troubleshooting Guide 2 3 1 Ping When you cannot reach EVB8051 by Ping command Step 1 Did you connect correctly between test PC and EVB8051 with UTP cable Step 2 Did you change your test PC s network environment IP address Gateway Subnet If no you should change it first as follows IP address 192 168 0 5 Gateway address 192 168 0 1 Subnet Mask 255 255 255 0 Step 3 Whether EVB8051 s Link LED is ON If off you d better check whether the UTP cable works correctly EVB8051 User s Manual 15 2 3 2 Misc 2 3 2 1 When the screen remains blank with the power on after a connection is made Step 1 Check the connection condition of the serial cable Step 2 Check if the COM Port numbers of the PC and terminal coincide Step3 Check the terminal configuration 16 EVB8051 User s Manual

Download Pdf Manuals

image

Related Search

Related Contents

  HP LaserJet M551dn  ABC-Series Charger User Manual Automatic Battery Charger – 36V  Orbis User Manual  Spec Sheet: DM-MD8X8 - bei vip systemtechnik  Frühjahrsprogramm 2013 - Deutsches Institut für Erwachsenenbildung  Le programme du colloque Stades  manuale  Makita LS0711Z User's Manual  DeLOCK IDE SATA Converter  

Copyright © All rights reserved.
Failed to retrieve file