Download  Print this page

Silicon Laboratories Network Card User Manual

Silicon laboratories, inc. network card user manual
Hide thumbs

Advertisement

E t h e r n e t - D K
E
E
D
K
U
'
G
MBEDDED
THERN ET
EVELOPMENT
I T
SER
S
UIDE
1. Overview
The Embedded Ethernet Development Kit (Ethernet-DK) provides all the hardware and software required to
develop real-world embedded Ethernet applications using the industry proven CMX Micronet™ protocol stack and
high-performance Silicon Laboratories microcontrollers. The TCP/IP protocol stack is developed specifically for
embedded processors and is freely distributed in an easy-to-use library. A TCP/IP Configuration Wizard is provided
to generate a highly customized library optimized for user selected protocols. It also generates the framework code
required to use the library and a project file that can be managed in the Silicon Laboratories Integrated
Development Environment (IDE). Additional information about the TCP/IP library and Configuration Wizard,
including a detailed API description, can be found in application note "AN237: TCP/IP Library Programmer's
Guide".
The Embedded Ethernet Development Kit hardware includes a C8051F120 Target Board, AB4 Ethernet
Development Board, USB Debug Adapter, and all necessary cables to debug the MCU and connect it to an
Ethernet network. The C8051F120 Target Board features the 100 MIPS, 128 kB Flash, 8 kB RAM, 8051-based
C8051F120 MCU. The MCU network interface provided by the AB4 board consists of the CP2200 Ethernet
controller and an RJ-45 connector with integrated magnetics and LEDs. The TCP/IP Library includes a built-in
driver for the CP2200 and has a custom driver interface with auto-generated templates to allow drivers for any
Ethernet controller to be written.
The Silicon Labs IDE supports full-speed, non-intrusive MCU debugging and is bundled with an evaluation version
of the Keil C51 Toolchain allowing immediate application code evaluation in C. Projects with up to 4 kB of object
code and unlimited library code can be developed using the included toolset. Numerous application code examples
are included in the development kit and a walkthrough of an embedded web server demo is included in Section 6
on page 9.
Figure 1. C8051F120TB Target Board and AB4 Ethernet Development Board
Rev. 0.6 1/11
Copyright © 2011 by Silicon Laboratories
Ethernet-DK

Advertisement

Table of Contents
loading

  Related Manuals for Silicon Laboratories Network Card

  Summary of Contents for Silicon Laboratories Network Card

  • Page 1 It also generates the framework code required to use the library and a project file that can be managed in the Silicon Laboratories Integrated Development Environment (IDE). Additional information about the TCP/IP library and Configuration Wizard, including a detailed API description, can be found in application note “AN237: TCP/IP Library Programmer’s...
  • Page 2: Kit Contents

     CAT5e Ethernet Cable  Silicon Laboratories Evaluation Kit IDE and Product Information CD-ROM. CD content includes the following: Silicon Laboratories Integrated Development Environment (IDE)  Keil C51 Evaluation Toolchain (assembler, linker and C compiler with 4 kB object code generation and unlimited library ...
  • Page 3: Hardware Setup

    3. Hardware Setup The following instructions illustrate how to setup the hardware included with the kit. 1. Connect the AB4 Ethernet Development Board to the C8051F120 Target Board at J24 (Figure 2). Apply slight pressure to ensure the mating 96-pin connectors are firmly connected. 2.
  • Page 4: Network Setup

    A standard Ethernet cable is included in the kit and crossover cables are available for order from the Silicon Laboratories website, at www.silabs.com. Note: Firewalls or VPN policies may need to be disabled in order to communicate with the development kit.
  • Page 5: Network Setup Procedure

    4.1. Network Setup Procedure If using a standard cable: 1. Connect the AB4 Ethernet Development Board to an Ethernet wall outlet or to a router/switch using a standard Ethernet cable. 2. Connect a PC to the same Ethernet network using a standard Ethernet cable. If using a crossover cable: 1.
  • Page 6 Ethernet-DK 4.2. Selecting an IP Address for the Embedded System For a PC to recognize an embedded system on a network, its IP address and subnet mask need to be configured. Below are a few guidelines to follow when choosing an IP address for the embedded system. Figure 6 shows an example of a compatible PC and embedded system IP address combination.
  • Page 7: Software Setup

    5. Software Setup The included CD-ROM contains the Silicon Laboratories IDE, Keil C51 toolset, and documentation including datasheets, application notes, and an electronic version of this user’s guide. The instructions below describe how to install the Embedded Ethernet Development Kit software. Refer to the readme.txt file on the CD-ROM for the IDE release notes containing the latest information regarding supported devices, revision history, and known issues.
  • Page 8 Toolset”. Then press the Install button. 5. Follow the installation prompts to install the development tools. The following applications will be installed: The Silicon Laboratories IDE will be installed by default in the C:\SiLabs\MCU directory.  The Embedded Ethernet examples will be installed by default in the C:\SiLabs\MCU\Examples\C8051F12x\Ethernet ...
  • Page 9 The instructions below show how to generate a new project using the TCP/IP Configuration Wizard. 1. From the Windows Start menu, start the TCP/IP Configuration Wizard. The shortcut will be under the StartSilicon Laboratories menu. Alternatively, the Configuration Wizard can be started by double-clicking TCPIP_Config.exe located by default in the “C:\SiLabs\MCU\TCP-IP Config” directory.
  • Page 10 Ethernet-DK 5. In the System Settings section of the left window, select IP Addresses. 6. In the right window, set the Source IP Address to the IP address of the embedded system. 7. If the Gateway IP Address and Subnet mask of the network are known, then fill in the addresses on the right window (see Figure 8).
  • Page 11 9. Save the selected configuration using the FileSave As menu. 10. Generate a new project with supporting firmware by selecting Generate Project from the File menu (see Figure 9). 11. When prompted for a folder to save the project, browse to an empty directory or create a new directory. Note: Any files in the selected directory will be overwritten.
  • Page 12 We will now build the project created by the TCP/IP Configuration Wizard and download the firmware to the MCU using the Silicon Laboratories IDE. 1. From the Windows Start menu, start the Silicon Laboratories IDE. The shortcut will be under the StartSilicon Laboratories menu. Alternatively, the Silicon Labs IDE can be started by double-clicking IDE.exe located by default in the “C:\SiLabs\MCU”...
  • Page 13 5. Verify the Compiler and Linker tabs are pointing to the C51.exe (compiler) and BL51.exe (linker) files in C:\Keil\C51\BIN in the Executable field. 6. Press the Compiler tab's Customize button. Under the Variable Location drop down box, select Large: XDATA and press OK. Then press OK to close the Tool Chain Integration dialog. 7.
  • Page 14 Ethernet-DK 8. Click the Connect button in the toolbar or select DebugConnect from the menu. Note: If you receive the error message “Communication could not be established with the specified serial adapter”, open the Connection Options Dialog by selecting OptionsConnection Options from the menu. Verify that the USB Debug Adapter is selected and that the debug interface is set to JTAG.
  • Page 15 6.1.3. Testing Connectivity Using PING After pressing GO, the MCU will be executing the TCP/IP stack firmware. The LEDs on the RJ-45 Ethernet connector should light up if the MCU is connected to a network. Once the network router detects the presence of the embedded system, it will be accessible from any PC connected to the same network.
  • Page 16 We will now use the TCP/IP Configuration Wizard to generate a project with DHCP and Netfinder capability. 1. From the Windows Start menu, start the TCP/IP Configuration Wizard. The shortcut will be under the StartSilicon Laboratories menu. Alternatively, the Configuration Wizard can be started by double-clicking TCPIP_Config.exe located by default in the “C:\SiLabs\MCU\TCP-IP Config” directory.
  • Page 17 5. Save the selected configuration using the FileSave As menu. 6. Generate a new project with supporting firmware by selecting Generate Project from the File menu (see Figure 13). 7. When prompted for a folder to save the project, browse to an empty directory or create a new directory. Note: Any files in the selected directory will be overwritten.
  • Page 18 We will now build the project created by the TCP/IP Configuration Wizard and download the firmware to the MCU using the Silicon Laboratories IDE. 1. From the Windows Start menu, start the Silicon Laboratories IDE. The shortcut will be under the StartSilicon Laboratories menu. Alternatively, the Silicon Labs IDE can be started by double-clicking IDE.exe located by default in the “C:\SiLabs\MCU”...
  • Page 19 5. Verify the Compiler and Linker tabs are pointing to the C51.exe (compiler) and BL51.exe (linker) files in C:\Keil\C51\BIN in the Executable field. 6. Press the Compiler tab's Customize button. Under the Variable Location drop down box, select Large: XDATA and press OK. Then press OK to close the Tool Chain Integration dialog. 7.
  • Page 20 Ethernet-DK 8. Click the Connect button in the toolbar or select DebugConnect from the menu. Note: If you receive the error message “Communication could not be established with the specified serial adapter”, open the Connection Options Dialog by selecting OptionsConnection Options from the menu. Verify that the USB Debug Adapter is selected and that the debug interface is set to JTAG.
  • Page 21 6.2.3. Finding the Embedded System We will now search for embedded systems on the network. Note: The Netfinder utility v1.0 is not compatible with Windows Vista or Windows 7. 1. Open the Netfinder utility found in C:\SiLabs\MCU\Utilities\Netfinder. 2. Press the Search button as shown in Figure 14 to begin searching for devices. 3.
  • Page 22 Ethernet-DK 5. The default web browser should launch and display the home page served by the embedded web server. The same result can be achieved by typing the IP address of the embedded web server into the address bar of a web browser.
  • Page 23 7. Enter the IP address, subnet mask, and default gateway (if known) into the ‘Assign IP Address’ dialog and press OK. See Appendix A for information on how to configure the PC with a static IP address and how to select a static IP address for the CP2201EB.
  • Page 24 Ethernet-DK 10. The default web browser should launch and display the home page served by the embedded web server. The same result can be achieved by typing the IP address of the embedded web server into the address bar of a web browser. Figure 20 shows a screenshot of the uWeb-v2.0 home page. Figure 20.
  • Page 25 6.3. Stage 3—Configuring MAC and IP Addresses over the Serial Port In the first two stages of the demo, we learned how to generate firmware for an embedded web server using the TCP/IP Configuration Wizard and access the embedded server from a web browser. In this stage, we will learn how to dynamically configure the IP address over the serial port.
  • Page 26 Ethernet-DK 6.3.3. Programming the IP Address Now the MCU will be running the new firmware and blinking the green LED (P1.6) to indicate that the IP address has not been programmed. In this mode, the MCU is waiting for the user to initiate the update by connecting to the serial port and pressing any key to start.
  • Page 27 6.4. Stage 4—Adding Web Server Content In the first three stages of the demo, we learned how to make an embedded web server, find it on the network using Netfinder, and program its IP over the serial port. In this stage, we will learn how to change the HTML content on the server and see an example of an embedded temperature sensing web server (uWeb) that graphs temperature and controls an LED.
  • Page 28 This embedded web server contains multiple HTML pages, images, a Java temperature display applet, and CGI script capabilities allowing the detection and control of an LED state. This server demonstrates some of the capabilities of the Silicon Laboratories TCP/IP stack. The following instructions can be used to download the “uWeb” server.
  • Page 29 Ethernet-DK Figure 26. µWeb Embedded Web Server Rev. 0.6...
  • Page 30 TCP example, except data is sent in UDP packets. The UDP Echo Client/Server example is located by default in the C:\SiLabs\MCU\Examples\C8051F12x_13x\Ethernet\UDP directory. The example can be opened by opening the project file UDP.wsp in the Firmware directory in the Silicon Laboratories IDE.
  • Page 31 8. C8051F120 Target Board The Embedded Ethernet Development Kit includes a target board with a C8051F120 device pre-installed for evaluation and software development. Numerous input/output (I/O) connections are provided to facilitate prototyping using the target board. Refer to Figure 27 for the locations of the various I/O connectors. For further details, see the “C8051F12x Development Kit User’s Guide”...
  • Page 32 Ethernet-DK 8.1. C8051F120 Target Board Schematic Rev. 0.6...
  • Page 33 9. AB4 Ethernet Development Board The Embedded Ethernet Development Kit includes the AB4 Ethernet Development Board designed to connect the C8051F120 (or C8051F340, C8051F020, C8051F040, or C8051F060) target board to an ethernet network. The ethernet controller used is the CP2200. Refer to Figure 29 for the locations of the various I/O connectors. 96-pin Expansion I/O connector CP2200 Ethernet Controller RJ-45 Ethernet Connector...
  • Page 34 Ethernet-DK 9.1. Expansion I/O Connector (J1) The 96-pin expansion I/O connector J1 is used to connect the AB4 Ethernet Development Board to the C8051F120 Target Board. J1 provides access to many C8051F120 signal pins. Pins for +3 V, digital ground, analog ground and the unregulated power supply (VUNREG) are also available.
  • Page 35 Ethernet-DK 9.2. AB4 Board Schematic Rev. 0.6...
  • Page 36 10.4. Using the Keil Software 8051 Tools with the Silicon Laboratories IDE The default configuration of the Keil 8051 tools when using the Silicon Laboratories IDE project manager enables object extensions, debug record generation, and uses the OMF-51 format. This is required for source level debugging.
  • Page 37 Ethernet-DK —S PPENDIX UPPORTED ROTOCOLS Link/Physical Layer: Ethernet (IEEE802.3)—Widely installed local area network link/physical layer. Internet Layer: IP (Internet Protocol)—IP specifies the format of packets and manages the addressing of all devices on the network. IP is included in all builds of the TCP/IP stack. PING (Packet Internet Groper)—PING is a basic network program which verifies that a particular IP address exists and can respond to requests.
  • Page 38: Document Change List

    Ethernet-DK OCUMENT HANGE Revision 0.3 to Revision 0.4  Added Netfinder Example.  Added note that R1 should be shorted with a zero ohm resistor on the 'F12x Target Board.  Updated the supported protocols in the Appendix.  Updated screenshots for Version 3.1 of the TCP/IP Configuration Wizard.
  • Page 39 Ethernet-DK OTES Rev. 0.6...
  • Page 40: Contact Information

    Silicon Laboratories products are not designed, intended, or authorized for use in applications intended to support or sustain life, or for any other application in which the failure of the Silicon Laboratories product could create a situation where per- sonal injury or death may occur.