Specifications

SLAA137A
MSP430 Internet Connectivity 11
4 Software Description
This chapter describes the implemented TCP/IP stack, the ethernet driver, and the HTTP server.
The entire software is written in C and therefore porting to other MCU systems should be quite
easy. For reasons of better understanding, the code is separated into different modules. Table 3
gives an overview of these modules.
Table 3. Overview of the Software Modules
Application
Transfers data via ethernet and TCP/IP
Uses the API functions of the TCP/IP module which encapsulates the whole
stack and hides it from the application
TCP/IP module
(tcpip.c,
tcpip.h)
Is a library for application development
Implements the protocols ARP, ICMP, IP and TCP
Reacts on events (frame reception, API calls by the user)
Ethernet module
(cs8900.c,
cs8900.h)
Hardware driver for using the CS8900A LAN controller
Provides functions for configuration purposes as well as for reading and writing of
registers and sending and receiving of ethernet frames
Ethernet
Physical layer on which the data transfer takes place; access is via the LAN
controller
NOTE: For developing a user application, it is highly recommended to use a network monitor
program for examining and decoding ethernet frames (for example, Microsoft™ Netmon™).
4.1 Ethernet Module
The main task of the ethernet module cs8900.c is the encapsulation of functions for data
transmission by easy-to-use C functions. The ethernet module also generates the clock scheme
used for accessing the internal registers of the CS8900A.
In the header file cs8900.h, several things concerning the network interface can be configured. A
very important setting is the MAC address of the network interface. This 48-bit address is
defined using six symbolic constants MYMAC_1 to MYMAC_6. The user can modify this
address, but must ensure that it is unique in the local network. An address of FFFF FFFF FFFF
is not allowed because this is reserved as a broadcast address and therefore cannot be used as
an individual one.
Table 4 gives an overview of the ethernet module procedures, and Figure 5 shows how to use
them.