Professional Documents
Culture Documents
SYSTEM DESIGN
To implement a web server on an 8 bit Microcontroller we will use AVR microcontroller because of its high
throughput. Also ENC28J60 Ethernet controller is used instead of Realtek family of Ethernet controller because of low
number of pins which provides an easy interfacing with 8 bit Microcontroller. The following important components in
brief (For further study their datasheet can be referred): The block diagram of System is as shown in figure 2.
Atmel ATmega32 Microcontroller
ENC28J60 Ethernet Controller.
Integrated Magnetics RJ -45 Jack.
Along with these the miscellaneous components used and about the SPI (Serial Peripheral Interfacing) used to
interface ATmega32 with ENC28J60. [1]
Atmel ATmega32 Microcontroller
A Microcontroller is a highly integrated chip that contains all the components comprising a controller. Typically
this includes a CPU, RAM, some form of ROM, I/O ports, and timers. The reason for using ATmega32 as an 8-bit
Microcontroller in our application is because of its high throughput and SPI(Serial Peripheral Interface) interfacing. The
SPI interfacing provides serial interface with the device and hence lowering the number of address and data lines used. In
order to maximize performance and parallelism, the AVR uses Harvard architecture with separate memories and buses
for program and data. Instructions in the program memory are executed with a single level pipelining. While one
instruction is being executed, the next instruction is pre-fetched from the program memory. This concept enables
instructions to be executed in every clock cycle. The program memory is In-System Reprogrammable Flash memory. The
fast-access Register File contains 32 x 8-bit general purpose working registers with a single clock cycle access time. Six of
the 32 registers can be used as three 16-bit indirect address register pointers for Data Space addressing enabling efficient
address calculations. The ALU supports arithmetic and logic operations between registers or between a constant and a
register. Single register operations can also be executed in the ALU. After an arithmetic operation, the Status Register is
updated to reflect information about the result of the operation.
ENC28J60 Ethernet Controller
An Ethernet Controller is a device used to implement Ethernet Protocol. The reason for using ENC28J60 as an
Ethernet Controller in our application is because its supports SPI(Serial Peripheral Interface) interfacing. The SPI
interfacing provides serial interface with the device and hence lowers the number of address and data lines used. The
ENC28J60 is a stand-alone Ethernet controller with an industry standard Serial Peripheral Interface (SPI). It is designed to
serve as an Ethernet network interface for any controller equipped with SPI. The ENC28J60 meets all of the IEEE 802.3
specifications. It incorporates a number of packet filtering schemes to limit incoming packets. It also provides an internal
DMA module for fast data throughput and hardware assisted checksum calculation, which is used in various network
protocols. Communication with the host controller is implemented via an interrupt pin and the SPI, with clock rates of up
to 20 MHz. Two dedicated pins are used for LED link and network activity indication. [4]
SPI (Serial Peripheral Interface)
An ATmega32 Microcontroller uses SPI (Serial Peripheral Interface) to effectively communicate with the
Ethernet controller ENC28J60. The usage of SPI provides serial communication thus eliminating large number of lines
used for data and addressing purpose. The SPI allows high-speed synchronous data transfer between the AVR and
peripheral devices or between several AVR devices. On most parts the SPI has a second purpose where it is used for In
System Programming (ISP). The interconnection between two SPI devices always happens between a master device and a
slave device. Compared to some peripheral devices like sensors which can only run in slave mode, the SPI of the AVR can
AVR Embedded Based Web Server 45
be configured for both master and slave mode. The mode the AVR is running in is specified by the settings of the master
bit (MSTR) in the SPI control register (SPCR). Special considerations about the SS pin have to be taken into account. The
master is the active part in this system and has to provide the clock signal a serial data transmission is based on. The slave
is not capable of generating the clock signal and thus cannot get active on its own. The slave just sends and receives data if
the master generates the necessary clock signal. The master however generates the clock signal only while sending data.
That means that the master has to send data to the slave to read data from the slave.
SYSTEM TESING
Figure 3 shows the simple web page designed using HTML language. It is requested by the client to server.
Then the internet processes these request and server response for client request with web page. Now the Client can know
46 Maheshchandra Jadhav & M. S. Biradar
the status of industry machineries and can control the machines via its own browser from remote location. The status
of the stepper motor is shown on the web page by typing the IP address of the server board. We can view the status of
stepper motor as shown and change the status by clicking on it and update the system. The status of the stepper motor is
changed similarly the temperature of the room will be observed for every hour by refreshing the results. Hence, results
show that the client can access the whole industry from any remote place via its own local browser. In industry the single
AVR board acts as data acquisition and control system and as web server, so the system is compact with less complexity.