Documentos de Académico
Documentos de Profesional
Documentos de Cultura
A SPECIAL PROJECT
Presented to
The Faculty of Electrical/Computer/Electronics and Communications Engineering
College of Engineering
Mindanao State University - Iligan Institute of Technology
Iligan City
March 2009
ABSTRACT
Monitoring System that will measure body temperature and will simulate a pulse rate
data through a wireless data acquisition device and then send the data to a web server that
The temperature readings are achieved by using a LM35 temperature sensor along
with the analog to digital conversion capability of the PIC16F877A. The data acquisition
device can handle temperature readings ranging from 2 – 150 degrees Celsius though
typical body temperature is only around 36 – 42 degrees Celsius. The data is sent from
the data acquisition device to the web server via Bluetooth using the EGBC – 04
Bluetooth module. The typical wireless range of the Bluetooth module is ten (10) meters
in an area with no obstacles. Using WIZ810MJ network module, the web server can then
be accessed from the local network that it is connected to. The web server can display
data from four different data acquisition devices and will update the data being displayed
The researchers would like to thank first and foremost our God Almighty for His
never ending love and presence in our everyday lives. We thank Him for always guiding
us especially during the time when our special project was still under development. We
We would also like to thank our ever so loving families namely the Jimenez
family, Mesina family, and the Miranda family, for their overwhelming support and
encouragement. Their hopes and aspirations for our futures served as our inspiration, our
driving force, and our strength during the times when we doubted our own abilities.
To the faculty of the EECE Department, thank you for being such good mentors.
To Engr. Jefrey Pasco for letting us setup our computers and equipment at the DSP lab
and for letting us conduct our hardware test runs there. To Engr. Rogelio Bersano for
Mercedenia Lambino and Engr. Angiline Teatro for being active in evaluating the
progress in our special project. To Engr. Stephen Haim for patiently correcting the
technicality of our manuscripts for the documentation of our project. And of course, to
our Adviser Engr. Lope Ben Porquis, for everything that he has done for us. We
acknowledge his patience with us in correcting our manuscript, his positivity for the
success of our project, him sharing his expertise on embedded systems and in firmware
programming, and his assistance in troubleshooting our hardware. Our project was
v
mainly put on the right track by his guidance. We thank God for giving us such a
knowledgeable faculty.
Our friends and colleagues also helped in the success of our project. We thank the
“overnighters” for accompanying us during our overnights inside the college and for
readily lending us their advice and some of their tools and equipment even though they
themselves are also busy making their own projects. We would also like to thank the
COE-EC for letting us borrow their water dispenser during our overnights. It has been a
great help for us “overnighters” since clean water is scarce in the college during late
hours in the night. We also extend our heartfelt thanks to our batch mates for their
friendship and support. We thank them for believing in us. Even in their own little way,
they had helped us push through with our project. We will forever be grateful.
The Researchers,
TITLE PAGE i
ABSTRACT ii
APPROVAL SHEET iii
ACKNOWLEDGEMENT iv
TABLE OF CONTENTS vi
LIST OF TABLES xi
LIST OF FIGURES xii
CHAPTER 1: INTRODUCTION 1
1.1 Background of the Study 1
1.2 Statement of the Problem 2
1.3 Objectives of the Study 2
1.4 Significance of the Study 3
1.5 Scope and Limitations 3
1.6 Definition of Terms 4
1.7 Theoretical Framework 5
1.7.1 Data Acquisition 5
1.7.1.1 Transducers 5
1.7.1.2 Signals 6
1.7.1.2.1 Analog Signals 7
1.7.1.2.1.1 Level 7
1.7.1.2.1.2 Shape 8
1.7.1.2.2 Digital Signals 8
1.7.1.2.2.1 State 9
1.7.1.2.2.2 Rate 9
1.7.2 Vital Signs 9
1.7.2.1 Body Temperature 10
1.7.3 Embedded Systems 10
1.7.4 Microcontroller 11
1.7.5 PIC microcontroller 13
1.7.5.1 PIC16f877A 13
1.7.6 AVR Microcontroller 15
1.7.6.1 Brief History 15
1.7.6.2 Device Architecture 16
1.7.6.2.1 Data RAM 16
1.7.6.2.2 Program Memory (Flash) 16
vii
vii
viii
CHAPTER 3: METHODOLOGY 51
3.1 Planning 52
3.2 Research and Parts Acquisition 52
3.3 System Overview 53
3.4 Hardware Development 53
3.4.1 Schematic Diagram and Board Layout 54
3.4.2 PCB Fabrication 54
3.4.2.1 Layout Film 54
3.4.2.2 Exposure 54
3.4.2.3 Developer 55
3.4.2.4 Etchant 55
3.4.2.5 Cleaning the track surface 55
3.4.2.6 Drilling 56
3.4.3 Components 56
3.4.3.1 Embedded Web Server 56
3.4.3.2 Bluetooth Host Controller 57
3.4.3.3 Bluetooth Slave Controller/Data Acquisition Device 59
3.5 Firmware Development 60
3.5.1 Embedded Web Server Firmware 60
3.5.1.1 Embedded Web Server 62
3.5.1.2 Web Pages/Files 63
3.5.2 Bluetooth Slave Controller and Data Acquisition Firmware 66
3.5.2.1 Analog to Digital Conversion 66
3.5.3 Bluetooth Host Controller Firmware 69
3.5.4 Bluetooth Module Settings 69
3.6 Setup and Testing 70
viii
ix
5.1 Conclusion 87
5.2 Recommendation 87
BIBLIOGRAPHY 89
APPENDICES 91
Appendix A: SCHEMATIC DIAGRAMS 91
A.1 Schematic Diagram of Embedded Web Server 92
A.2 Schematic Diagram of Bluetooth Host Controller 93
A.3 Schematic Diagram of Bluetooth Slave
Controller/Data Acquisition Device 94
A.4 Schematic Diagram of power supply for Embedded
Web Server and Bluetooth Host Controller 95
ix
x
x
xi
LIST OF TABLES
xi
xii
LIST OF FIGURES
xii
CHAPTER 1
INTRODUCTION
Information such as temperature is gathered by sensors that convert the information into
electrical signals. Sometimes only one sensor is needed, such as when recording
temperature. Sometimes hundreds or even thousands of sensors are needed, such as when
monitoring a complex industrial process. The signals from the sensors are transferred to a
In the past data acquisition equipment was largely mechanical, using smoked
drums or chart recorders. Later, electrically powered chart recorders and magnetic tape
recorders were used. Today, powerful microprocessors and computers perform data
acquisition faster, more accurately, more flexibly, with more sensors, more complex data
acquisition technology still continues to evolve and with the swift rise of Wi-Fi and
Bluetooth technologies, wireless data acquisition has become a possibility. It has then
become a trend to use network based data acquisition systems to reduce wiring costs. The
Ethernet network has become the most popular network to accomplish this task. Ethernet
2
Data Acquisition is becoming smarter and better equipped with more control functions as
they move from yesterday's I/O multiplexers to the smallest remote Ethernet Data
Acquisition modules.
The Internet is the major technology that allows all levels of an organization to be
able to communicate and make the sensor-to-boardroom model a reality. Access can be
realized from any device that utilizes a standard web browser, so connections between
remote manufacturing plants, production planners, plant managers, and the CEO can be
made without having to create a dedicated proprietary network. Since a web page can be
installed in the I/O system as a Web I/O, then not only a sensor-to-boardroom model can
This special project aims to develop an Ethernet - based wireless vital signs
displaying vital signs data like body temperature, and pulse rate readings.
2. Implement a basic web server on a microcontroller unit that will allow the user to
Using Hypertext transfer protocol (HTTP) for the exchange of data through
Ethernet made the Graphical User Interface (GUI) install – free and platform independent
because it uses a browser as the user interface which is supported by different operating
systems. A web server embedded on a microcontroller unit consumes much less power
than dedicated or desktop web servers, thus decreasing power consumption cost.
Moreover, the wireless feature of the data acquisition device made the data acquisition
mobile and portable. Combining the embedded web server and the wireless data
acquisition device, vital signs monitoring can now be done even without direct
1. The focus of the study is more on the Ethernet - based wireless data acquisition rather
2. Only the body temperature is actually being measured while the pulse rate data is
simulated just to demonstrate the capabilities of Ethernet - based wireless vital signs
monitoring.
3. The maximum operating distance of the wireless data acquisition device is 10 meters
module.
4. The speed of transmission of data in the network is dependent on the speed of the
6. The IP address, subnet mask and gateway address of the embedded web is static and
7. The data acquired is displayed in real time but data logging is not supported.
acquisition is defined as the process of uniting real world data to produce the data
to be maneuvered by the computer system. The data are in the form of waveforms
or signals. These signals are obtained using different instruments and devices.
Web Server – a computer program that accepts HTTP request from web clients through
web browsers and serve them HTTP responses that has optional data components
which are usually web pages like HTML documents linked with objects.
digitizing the signal for storage, analysis, and presentation on a PC. Data acquisition
systems come in many different PC technology forms for great flexibility when choosing
your system. Scientists and engineers can choose from PCI, PXI, PCI Express, PXI
Express, PCMCIA, USB, Wireless and Ethernet data acquisition for test, measurement,
and automation applications. There are five components to be considered when building a
Signals
Signal conditioning
1.7.1.1 Transducers
physical phenomenon could be the temperature of a room, the intensity of a light source,
the pressure inside a chamber, the force applied to an object, or many other things. An
effective data acquisition system can measure all of these different phenomena.
6
electrical signal, such as voltage or current. The ability of a data acquisition system to
phenomena into signals measurable by the data acquisition hardware. Transducers are
synonymous with sensors in data acquisition systems. There are specific transducers for
Figure 1.1 shows a short list of some common phenomena and the transducers used to
measure them.
1.7.1.2 Signals
However, different signals need to be measured in different ways. For this reason, it is
important to understand the different types of signals and their corresponding attributes.
An analog signal can be at any value with respect to time. A few examples of
analog signals include voltage, temperature, pressure, sound, and load. The three primary
characteristics of an analog signal include level, shape, and frequency (Figure 1.2).
1.7.1.2.1.1 Level
Because analog signals can take on any value, the level gives vital information
about the measured analog signal. The intensity of a light source, the temperature in a
room, and the pressure inside a chamber are all examples that demonstrate the importance
of the level of a signal. When measuring the level of a signal, the signal generally does
not change quickly with respect to time. The accuracy of the measurement, however, is
very important. A data acquisition system that yields maximum accuracy should be
1.7.1.2.1.2 Shape
Some signals are named after their specific shape - sine, square, saw tooth, and
triangle. The shape of an analog signal can be as important as the level, because by
measuring the shape of an analog signal, you can further analyze the signal, including
peak values, DC values, and slope. Signals where shape is of interest generally change
rapidly with respect to time, but system accuracy is still important. The analysis of
heartbeats, video signals, sounds, vibrations, and circuit responses are some applications
A digital signal cannot take on any value with respect to time. Instead, a digital
signal has two possible levels: high and low. Digital signals generally conform to certain
specifications that define characteristics of the signal. Digital signals are commonly
signal to be low when the level falls within 0 to 0.8 V, and the signal is high between 2 to
5 V. The useful information that can be measured from a digital signal includes the state
1.7.1.2.2.1 State
Digital signals cannot take on any value with respect to time. The state of a digital
signal is essentially the level of the signal - on or off, high or low. Monitoring the state of
1.7.1.2.2.2 Rate
The rate of a digital signal defines how the digital signal changes state with
respect to time. An example of measuring the rate of a digital signal includes determining
how fast a motor shaft spins. Unlike frequency, the rate of a digital signal measures how
often a portion of a signal occurs. A software algorithm is not required to determine the
rate of a signal.
Vital signs are measurements of the body's most basic functions. The four main
vital signs routinely monitored by medical professionals and healthcare providers include
body temperature, pulse rate, respiration rate (rate of breathing, blood pressure (Blood
pressure is not considered a vital sign, but is often measured along with the vital signs.)
Vital signs are useful in detecting or monitoring medical problems. Vital signs
elsewhere.
10
Body temperature is a measure of the body's ability to generate and get rid of
heat. The body is very good at keeping its temperature within a narrow, safe range in
When you are too hot, the blood vessels in your skin expand (dilate) to carry the
excess heat to your skin's surface. You may begin to sweat, and as the sweat evaporates,
it helps cool your body. When you are too cold, your blood vessels narrow (contract) so
that blood flow to your skin is reduced to conserve body heat. You may start shivering,
which is an involuntary, rapid contraction of the muscles. This extra muscle activity helps
generate more heat. Under normal conditions, this keeps your body temperature within a
There are many definitions of embedded system but all of these can be combined
used for a particular task. The special computer system is usually less powerful than
are very powerful and complicated. Usually a low power consumption CPU with a
limited amount of memory is used in embedded systems. Many embedded systems use
very small operating systems; most of these provide very limited operating system
capabilities. However as memory and CPU power is becoming cheap, many modern
operating systems are also being used in embedded systems these days.
11
Since embedded systems are used for special purpose tasks, there is usually no
need to add new applications to the system once it is built. Therefore programs and
operating systems are usually loaded only once into read-only memory. The read-only
memory is available in many forms these days and includes some type of ROM, flash
chips and flash cards. In case an upgrade is required, a new ROM chip replaces the old
one.
If you look at your surroundings, you will find tiny computers everywhere. They
are present even in places where you rarely notice them. Some of the most common
embedded systems used in everyday life are refrigerators, microwave ovens, TV, VCR,
DVD players, cameras, cars (Antilock brakes, engine control, sun roof, climate control,
Complicated and more sophisticated embedded systems include routers and switches
1.7.4 Microcontroller
The microcontroller includes a CPU, RAM, ROM, I/O ports, and timers like a standard
computer, but because they are designed to execute only a single specific task to control a
single system, they are much smaller and simplified so that they can include all the
that is used to create a multi-function computer or device and requires multiple chips to
12
microprocessors, is that the parts-count and design costs of the item being controlled can
be kept to a minimum. They are typically designed using CMOS (complementary metal
oxide semiconductor) technology, an efficient fabrication technique that uses less power
There are also multiple architectures used, but the predominant architecture is
CISC (Complex Instruction Set Computer), which allows the microcontroller to contain
multiple control instructions that can be executed with a single macro instruction. Some
use a RISC (Reduced Instruction Set Computer) architecture, which implements fewer
Early controllers were typically built from logic components and were usually
quite large. Later, microprocessors were used, and controllers were able to fit onto a
circuit board. Microcontrollers now place all of the needed components onto a single
chip. Because they control a single function, some complex devices contain multiple
microprocessors.
Microcontrollers have become common in many areas, and can be found in home
automobiles, and have many industrial uses as well, and have become a central part of
industrial robotics. Because they are usually used to control a single process and execute
are very inexpensive and are able to deliver powerful features that would otherwise be
to Programmable Intelligent Computer. PICs are popular to developers and hobbyists due
to their low cost, wide availability, large user base, extensive collection of application
notes, availability of low cost or free development tools, and serial programming (and re-
With the arrival of PIC microcontrollers it has now become possible to program
microchips. Unlike in the past when circuits are built around chips, we now build chips
around circuits. The technology of microcontrollers has limitless boundaries and complex
circuits can be made many times smaller through the use of PIC microcontrollers.
Prototyping can be greatly enhanced as it's often much easier to make changes to a PIC
1.7.5.1 PIC16f877A
The PIC16f877A is one of the most popular PIC microcontrollers and it's easy to
see why - it comes in a 40 pin DIP pinout and it has many internal peripherals.
14
The 40 pins make it easier to use the peripherals as the functions are spread out
over the pins. This makes it easier to decide what external devices to attach without
One of the main advantages is that each pin is only shared between two or three
functions so it's easier to decide what the pin function (other devices have up to 5
microcontroller (µC) which was developed by Atmel in 1996. The AVR was one of the
first microcontroller families to use on-chip flash memory for program storage, as
It is believed the AVR basic architecture was conceived by two students at the
The original AVR MCU was developed at a local ASIC house in Trondheim,
Norway, where the two founders of Atmel Norway were working as students. It was
known as a μRISC (Micro RISC). When the technology was sold to Atmel, the internal
architecture was further developed by Alf and Vegard at Atmel Norway, a subsidiary of
Atmel says that the name AVR is not an acronym and does not stand for anything
in particular. The creators of the AVR give no definitive answer as to what the term
Note that the use of "AVR" in this article generally refers to the 8-bit RISC line of
Among the first of the AVR line was the AT90S8515, which in a 40-pin DIP
package has the same pinout as an 8051 microcontroller, including the external
multiplexed address and data bus. The polarity of the RESET line was opposite (8051's
16
having an active-high RESET, while the AVR has an active-low RESET), but other than
Flash, EEPROM, and SRAM are all integrated onto a single chip, removing the
need for external memory. Some devices have an external bus to allow adding additional
Program instructions are stored in non-volatile Flash memory. Although they are
The size of the program memory is occasionally indicated in the naming of the
There is no provision for off-chip program memory; all code executed by the
The data address space consists of the register file, I/O registers, and SRAM.
The AVRs have 32 single-byte registers and are classified as 8-bit RISC devices.
17
In most variants of the AVR architecture, the working registers are mapped in as
the first 32 memory addresses (000016-001F16) followed by the 64 I/O registers (002016-
005F16).
Actual SRAM starts after these register sections (address 006016). (Note that the
I/O register space may be larger on some more extensive devices, in which case the
memory mapped I/O registers will occupy a portion of the SRAM address space.)
Even though there are separate addressing schemes and optimized opcodes for
register file and I/O register access, all can still be addressed and manipulated as if they
were in SRAM.
In the XMEGA variant, the working register file is not mapped into the data
address space; as such, it is not possible to treat any of the XMEGA's working registers
as though they were SRAM. Instead, the I/O registers are mapped into the data address
space starting at the very beginning of the address space. Additionally, the amount of data
address space dedicated to I/O registers has grown substantially to 4096 bytes (000016-
0FFF16). As with previous generations, however, the fast I/O manipulation instructions
can only reach the first 64 I/O register locations (the first 32 locations for bitwise
instructions). Following the I/O registers, the XMEGA series sets aside a 4096 byte range
of the data address space which can be used optionally for mapping the internal
EEPROM to the data address space (100016-1FFF16). The actual SRAM is located after
1.7.6.2.5 EEPROM
Programmable Read Only Memory (EEPROM) for semi-permanent data storage. Like
Flash memory, EEPROM can maintain its contents when electrical power is removed.
In most variants of the AVR architecture, this internal EEPROM memory is not
mapped into the MCU's addressable memory space. It can only be accessed the same way
an external peripheral device is, using special pointer registers and read/write instructions
which makes EEPROM access much slower than other internal RAM.
EEPROM mapping to the data or program memory depending on the configuration. The
XMEGA family also allows the EEPROM to be mapped into the data address space.
100,000 write cycles in their datasheets — a well designed EEPROM write routine
should compare the contents of an EEPROM address with desired contents and only
1.7.6.3 ATmega32L
the ATmega32 achieves throughputs approaching 1 MIPS per MHz allowing the system
designer to optimize power consumption versus processing speed. It also has 32 kilobytes
AVR Studio provides a project management tool, source file editor, simulator, and front-
designed to provide the programmer with the easiest possible solution for developing
PIC and C fit well together: PIC is the most popular 8bit chip in the world, used in
a variety of applications, and C, prized for its efficiency, is the natural choice for
advanced IDE, ANSI compliant compiler, broad set of hardware libraries, comprehensive
Write your C source code using the built-in Code Editor (code and parameter
Use the included MikroC libraries to dramatically speed up the development: data
Monitor your program structure, variables, and functions in the Code Explorer
Inspect program flow and debug executable logic with the integrated debugger
Get detailed reports and graphs: RAM and ROM map, code statistics, assembly
Plenty of examples were provided for the user to expand, develop, and use as
Think of a topology as a network's virtual shape or structure. This shape does not
necessarily correspond to the actual physical layout of the devices on the network. For
example, the computers on a home LAN may be arranged in a circle in a family room,
bus
ring
star
tree
mesh
More complex networks can be built as hybrids of two or more of the above basic
topologies.
21
Bus networks (not to be confused with the system bus of a computer) use a
common backbone to connect all devices. A single cable, the backbone, functions as a
shared communication medium that devices attach or tap into with an interface
connector. A device wanting to communicate with another device on the network sends a
broadcast message onto the wire that all other devices see, but only the intended recipient
Ethernet bus topologies are relatively easy to install and don't require much
both were popular Ethernet cabling options many years ago for bus topologies. However,
bus networks work best with a limited number of devices. If more than a few dozen
computers are added to a network bus, performance problems will likely result. In
addition, if the backbone cable fails, the entire network effectively becomes unusable.
In a ring network, every device has exactly two neighbors for communication
purposes. All messages travel through a ring in the same direction (either "clockwise" or
22
"counterclockwise"). A failure in any cable or device breaks the loop and can take down
To implement a ring network, one typically uses FDDI, SONET, or Token Ring
technology. Ring topologies are found in some office buildings or school campuses.
Many home networks use the star topology. A star network features a central
connection point called a "hub" that may be a hub, switch or router. Devices typically
Compared to the bus topology, a star network generally requires more cable, but a
failure in any star network cable will only take down one computer's network access and
not the entire LAN. (If the hub fails, however, the entire network also fails.)
23
Tree topologies integrate multiple star topologies together onto a bus. In its
simplest form, only hub devices connect directly to the tree bus, and each hub functions
as the "root" of a tree of devices. This bus/star hybrid approach supports future
expandability of the network much better than a bus (limited in the number of devices
due to the broadcast traffic it generates) or a star (limited by the number of hub
Mesh topologies involve the concept of routes. Unlike each of the previous
topologies, messages sent on a mesh network can take any of several possible paths from
source to destination. (Recall that even in a ring, although two cable paths exist,
messages can only travel in one direction.) Some WANs, most notably the Internet,
A mesh network in which every device connects to every other is called a full
mesh. As shown in the illustration below, partial mesh networks also exist in which some
1.7.9.2 Ethernet
Developed in the early 1970's, Ethernet has proven to be one of the most simple,
reliable, and long-lived networking protocols ever designed. The high speed and
Although Ethernet works across a variety of layer one media, the three most
popular forms are 10BaseT, 10Base2, and 10BaseF, which use unshielded twisted pair
(UTP), coaxial, and fiber optic cables respectively. UTP is used in a "star" configuration,
in which all nodes connect to a central hub. 10Base2 uses a single coaxial cable to
connect all workstations together in a "bus" configuration, and does not require a hub.
10BaseF uses fiber optics, which, though expensive, can travel long distances (2km) and
An interesting difference between coaxial Ethernet and other types is that coax
Ethernet hub) to connect to multiple other workstations. This is why coax Ethernet does
not require a hub, and Ethernet over other media typically does.
Ethernet Topologies
10BaseT *Very reliable- one fault *Relatively short distance *Offices and home
network. (100m).
26
workstation.)
wiring except from station to disrupts entire network networks, hub to hub
(200m).
10BaseF *Long distance networking *Very expensive to install. *Long distance hub-to-
interference.
WWW is part of Internet. It has over the last 10 or so years become the largest
part of the Internet. Before the WWW, information was viewed as pages of text, or
downloadable files. You would go to a particular location and view (or download) a file.
To get to another file, you had to go back to that location again and get it. The WWW
revolutionized the way that people use the Internet. The WWW itself is simply a set of
software that uses hypertext pages and the HTTP protocol to allow users to click
One of the main components of the WWW is the language used to make Web
pages. This language is called Hyper Text Markup Language (HTML). HTML pages can
be created in the simplest of text editors. It is basically ordinary text, but text that is
"marked up" with special HTML 'tags" that are used to define structure of the page.
HTML uses hyperlinks to link to other Web pages, or just about anything on the Internet
for that matter. HTML also allows for the inclusion of multimedia elements including
1.7.10.2 AJAX
web development techniques used to create interactive web applications or rich Internet
applications. With Ajax, web applications can retrieve data from the server
asynchronously in the background without interfering with the display and behavior of
the existing page. The use of Ajax has led to an increase in interactive animation on web
pages. Data is retrieved using the XMLHttpRequest object or through the use of Remote
Scripting in browsers that do not support it. Despite the name, the use of JavaScript and
XML is not actually required, nor do the requests need to be asynchronous. The acronym
AJAX has thus changed to the term Ajax, which does not represent these specific
technologies.
28
was the originating dialect of the ECMAScript standard. It is a dynamic, weakly typed,
languages and was designed to look like Java, but be easier for non-programmers to work
with.
Although best known for its use in websites (as client-side JavaScript),
applications.
language, although both have the common C syntax, and JavaScript copies many Java
names and naming conventions. The language's name is the result of a co-marketing deal
between Netscape and Sun, in exchange for Netscape bundling Sun's Java runtime with
their then-dominant browser. The key design principles within JavaScript are inherited
Application Programming Interface (API) for querying, traversing and manipulating such
documents.
DOM is likely to be best suited for applications where the document must be
accessed repeatedly or out of sequence order. If the application is strictly sequential and
one-pass, the SAX model is likely to be faster and use less memory. In addition, non-
option.
distributed, collaborative, hypermedia information systems. Its use for retrieving inter-
end-user; the server is the web site. The client making a HTTP request—using a web
browser, spider, or other end-user tool—is referred to as the user agent. The responding
server—which stores or creates resources such as HTML files and images—is called the
origin server. In between the user agent and origin server may be several intermediaries,
such as proxies, gateways, and tunnels. HTTP is not constrained to using TCP/IP and its
supporting layers, although this is its most popular application on the Internet. Indeed
HTTP can be "implemented on top of any other protocol on the Internet, or on other
networks. HTTP only presumes a reliable transport; any protocol that provides such
Control Protocol (TCP) connection to a particular port on a host (port 80 by default; see
List of TCP and UDP port numbers). An HTTP server listening on that port waits for the
client to send a request message. Upon receiving the request, the server sends back a
status line, such as "HTTP/1.1 200 OK", and a message of its own, the body of which is
An empty line
The request line and headers must all end with <CR><LF> (that is, a carriage
return followed by a line feed). The empty line must consist of only <CR><LF> and no
other whitespace. In the HTTP/1.1 protocol, all headers except Host are optional.
A request line containing only the path name is accepted by servers to maintain
desired action to be performed on the identified resource. What this resource represents,
implementation of the server. Often, the resource corresponds to a file or the output of an
REQUEST DESCRIPTION
METHOD
Asks for the response identical to the one that would correspond to a GET
HEAD
request, but without the response body.
Echoes back the received request, so that a client can see what intermediate
TRACE
servers are adding or changing in the request.
Returns the HTTP methods that the server supports for specified URL. This can
OPTIONS be used to check the functionality of a web server by requesting '*' instead of a
specific resource.
HTTP servers are required to implement at least the GET and HEAD methods and,
Some methods (for example, HEAD, GET, OPTIONS and TRACE) are defined
as safe, which means they are intended only for information retrieval and should not
change the state of the server. In other words, they should not have side effects, beyond
relatively harmless effects such as logging, caching, the serving of banner advertisements
or incrementing a web counter. Making arbitrary GET requests without regard to the
By contrast, methods such as POST, PUT and DELETE are intended for actions
which may cause side effects either on the server, or external side effects such as
financial transactions or transmission of email. Such methods are therefore not usually
used by conforming web robots or web crawlers, which tend to make requests without
Despite the prescribed safety of GET requests, in practice their handling by the
server is not technically limited in any way, and careless or deliberate programming can
just as easily (or more easily, due to lack of user agent precautions) cause non-trivial
changes on the server. This is discouraged, because it can cause problems for Web
caching, search engines and other automated agents, which can make unintended changes
on the server.
33
Methods PUT and DELETE are defined to be idempotent, meaning that multiple
identical requests should have the same effect as a single request. Methods GET, HEAD,
OPTIONS and TRACE, being prescribed as safe, should also be idempotent. HTTP is a
stateless protocol.
sending an identical POST request multiple times may further affect state or cause further
side effects (such as financial transactions). In some cases this may be desirable, but in
other cases this could be due to an accident, such as when a user does not realize that
their action will result in sending another request, or they did not receive adequate
feedback that their first request was successful. While web browsers may show alert
dialog boxes to warn users in some cases where reloading a page may re-submit a POST
request, it is generally up to the web application to handle cases where a POST request
Note that whether a method is idempotent is not enforced by the protocol or web
agent assumes that repeating the same request is safe when it isn't.
In HTTP/1.0 and since, the first line of the HTTP response is called the status line
and includes a numeric status code (such as "404") and a textual reason phrase (such as
34
"Not Found"). The way the user agent handles the response primarily depends on the
code and secondarily on the response headers. Custom status codes can be used since, if
the user agent encounters a code it does not recognize, it can use the first digit of the code
Also, the standard reason phrases are only recommendations and can be replaced
with "local equivalents" at the web developer's discretion. If the status code indicated a
problem, the user agent might display the reason phrase to the user to provide further
information about the nature of the problem. The standard also allows the user agent to
attempt to interpret the reason phrase, though this might be unwise since the standard
explicitly specifies that status codes are machine-readable and reason phrases are human-
readable.
codes and standard associated phrases, intended to give a short textual description of the
status. These status codes are specified by RFC 2616, along with additional codes (RFC
2518, RFC 2817, RFC 2295, RFC 2774, RFC 4918), some from the Distributed
Authoring (WebDAV) extension. Microsoft IIS servers may also use sub-codes, which
are not listed here. Others are unstandardised but commonly used.
The first digit of the status code specifies one of five classes of response. The
phrases used are the standard examples, but any human-readable alternative can be
provided.
35
This class of status code indicates a provisional response, consisting only of the
Status-Line and optional headers, and is terminated by an empty line. Since HTTP/1.0 did
not define any 1xx status codes, servers must not send a 1xx response to an HTTP/1.0
This class of status code indicates that the client's request was successfully
This class of status code indicates that further action needs to be taken by the user
agent in order to fulfill the request. The action required may be carried out by the user
agent without interaction with the user if and only if the method used in the second
request is GET or HEAD. A user agent should not automatically redirect a request more
than five times, since such redirections usually indicate an infinite loop.
The 4xx class of status code is intended for cases in which the client seems to
have erred. Except when responding to a HEAD request, the server should include an
permanent condition. These status codes are applicable to any request method. User
agents should display any included entity to the user. These are typically the most
Response status codes beginning with the digit "5" indicate cases in which the
the request. Except when responding to a HEAD request, the server should include an
temporary or permanent condition. Likewise, user agents should display any included
entity to the user. These response codes are applicable to any request method.
1.7.10.3.4 Sample
Client request (followed by a blank line, so that request ends with a double newline,
Server response (followed by a blank line and text of the requested page):
interact with text, images, videos, music, games and other information typically located
on a Web page at a Web site on the World Wide Web or a local area network. Text and
images on a Web page can contain hyperlinks to other Web pages at the same or different
Web site. Web browsers allow a user to quickly and easily access information provided
on many Web pages at many Web sites by traversing these links. Web browsers format
HTML information for display, so the appearance of a Web page may differ between
browsers.
Web browsers are the most-commonly-used type of HTTP user agent. Although
browsers are typically used to access the World Wide Web, they can also be used to
systems.
38
1.7.10.4.1 History
The history of the Web browser dates back to late 1980s, when a variety of
technologies laid the foundation for the first Web browser, the WorldWideWeb, by Tim
Berners-Lee in 1991. That browser brought together a variety of existing and new
The introduction of the NCSA Mosaic Web browser in 1993 – one of the first
graphical web browsers – led to an explosion in Web use. Marc Andreessen, the leader of
the Mosaic team at NCSA, soon started his own company, named Netscape, and released
the Mosaic-influenced Netscape Navigator in 1994, which quickly became the world's
most popular browser, accounting for 90% of all Web use at its peak (see usage share of
web browsers).
Microsoft responded with its browser Internet Explorer in 1995 (also heavily
influenced by Mosaic), initiating the industry's first browser war. By bundling Internet
Explorer with Windows, Microsoft was able to leverage its dominance in the operating
system market to take over the Web browser market; Internet Explorer usage share
attempt to produce a competitive browser using the open source software model. That
browser would eventually evolve into Firefox, which developed a respectable following
while still in the beta stage of development; shortly after the release of Firefox 1.0 in late
2004, Firefox (all versions) accounted for 7.4% of browser use.[3] As of February 2009,
Opera debuted in 1996; although it has never achieved widespread use, having
less than 1% browser usage share as of February 2009,[4] it has a substantial share of the
fast-growing mobile phone Web browser market, being preinstalled on over 40 million
phones. It is also available on several other embedded systems, including the Nintendo
Wii.
Apple's Safari had its first beta release in January 2003; as of February 2009, it
has a dominant share of Apple-based Web browsing, accounting for just over 8% of the
The most recent major entrant to the browser market is Google's Chrome, first
Some of the Web browsers currently available for personal computers include
[5]
Internet Explorer, Opera, Mozilla Firefox, Safari, Avant Browser, Konqueror, Lynx,
Google Chrome, Maxthon, Flock, Arachne, Epiphany, K-Meleon and AOL Explorer.
Web browsers communicate with Web servers primarily using Hypertext Transfer
Protocol (HTTP) to fetch Web pages. HTTP allows Web browsers to submit information
to Web servers as well as fetch Web pages from them. The most-commonly-used version
of HTTP is HTTP/1.1, which is fully defined in RFC 2616. HTTP/1.1 has its own
required standards that Internet Explorer does not fully support, but most other current-
Pages are located by means of a URL (Uniform Resource Locator, RFC 1738),
which is treated as an address, beginning with http: for HTTP transmission. Many
browsers also support a variety of other URL types and their corresponding protocols,
such as gopher: for Gopher (a hierarchical hyperlinking protocol), ftp: for File Transfer
Protocol (FTP), rtsp: for Real-time Streaming Protocol (RTSP), and https: for HTTPS
(HTTP Secure, which is HTTP augmented by Secure Sockets Layer or Transport Layer
Security).
The file format for a Web page is usually HTML (HyperText Markup Language)
and is identified in the HTTP protocol using a MIME content type. Most browsers
natively support a variety of formats in addition to HTML, such as the JPEG, PNG and
GIF image formats, and can be extended to support more through the use of plugins. The
combination of HTTP content type and URL protocol specification allows Web-page
designers to embed images, animations, video, sound, and streaming media into a Web
Early Web browsers supported only a very simple version of HTML. The rapid
dialects of HTML, leading to problems with Web interoperability. Modern Web browsers
should be rendered in the same way by all browsers. No browser fully supports HTML
4.01, XHTML 1.x or CSS 2.1 yet. Many sites are designed using WYSIWYG HTML-
FrontPage often generates non-standard HTML by default, hindering the work of the
W3C in promulgating standards, specifically with XHTML and Cascading Style Sheets
41
(CSS), which are used for page layout. Dreamweaver and other more modern Microsoft
HTML development tools such as Microsoft Expression Web and Microsoft Visual
Usenet news, Internet Relay Chat (IRC), and e-mail. Protocols supported may include
Network News Transfer Protocol (NNTP), Simple Mail Transfer Protocol (SMTP),
Internet Message Access Protocol (IMAP), and Post Office Protocol (POP). These
browsers are often referred to as "Internet suites" or "application suites" rather than
1.7.11 Bluetooth
Bluetooth is a wireless protocol for exchanging data over short distances from
fixed and mobile devices, creating personal area networks (PANs). It was originally
conceived as a wireless alternative to RS232 data cables. It can connect several devices,
Bluetooth takes small-area networking to the next level by removing the need for
user intervention and keeping transmission power extremely low to save battery power.
standard.
It provides agreement at the protocol level, where products have to agree on when
bits are sent, how many will be sent at a time, and how the parties in a
42
conversation can be sure that the message received is the same as the message
sent.
1.7.11.1 Operation
on a frequency of 2.45 gigahertz (actually between 2.402 GHz and 2.480 GHz, to be
exact). This frequency band has been set aside by international agreement for the use of
A number of devices that you may already use take advantage of this same radio-
frequency band. Baby monitors, garage-door openers and the newest generation of
cordless phones all make use of frequencies in the ISM band. Making sure that Bluetooth
and these other devices don't interfere with one another has been a crucial part of the
design process.
One of the ways Bluetooth devices avoid interfering with other systems is by
sending out very weak signals of about 1 milliwatt. By comparison, the most powerful
cell phones can transmit a signal of 3 watts. The low power limits the range of a
Bluetooth device to about 10 meters (32 feet), cutting the chances of interference between
your computer system and your portable telephone or television. Even with the low
power, Bluetooth doesn't require line of sight between communicating devices. The walls
in your house won't stop a Bluetooth signal, making the standard useful for controlling
devices in the same 10-meter (32-foot) radius, you might think they'd interfere with one
43
another, but it's unlikely. Bluetooth uses a technique called spread-spectrum frequency
hopping that makes it rare for more than one device to be transmitting on the same
frequency at the same time. In this technique, a device will use 79 individual, randomly
chosen frequencies within a designated range, changing from one to another on a regular
basis. In the case of Bluetooth, the transmitters change frequencies 1,600 times every
second, meaning that more devices can make full use of a limited slice of the radio
automatically, it’s unlikely that two transmitters will be on the same frequency at the
same time. This same technique minimizes the risk that portable phones or baby monitors
will disrupt Bluetooth devices, since any interference on a particular frequency will last
conversation takes place to determine whether they have data to share or whether one
needs to control the other. The user doesn't have to press a button or give a command --
the electronic conversation happens automatically. Once the conversation has occurred,
the devices -- whether they're part of a computer system or a stereo -- form a network.
Bluetooth systems create a personal-area network (PAN), or piconet, that may fill a room
or may encompass no more distance than that between the cell phone on a belt-clip and
the headset on your head. Once a piconet is established, the members randomly hop
frequencies in unison so they stay in touch with one another and avoid other piconets that
may be operating in the same room. Let's check out an example of a Bluetooth-connected
system.
44
In any wireless networking setup, security is a concern. Devices can easily grab
radio waves out of the air, so people who send sensitive information over a wireless
connection need to take precautions to make sure those signals aren't intercepted.
and remote access, just like WiFi is susceptible if the network isn't secure. With
Bluetooth, though, the automatic nature of the connection, which is a huge benefit in
terms of time and effort, is also a benefit to people looking to send you data without your
permission.
users can establish "trusted devices" that can exchange data without asking permission.
When any other device tries to establish a connection to the user's gadget, the user has to
decide to allow it. Service-level security and device-level security work together to
protect Bluetooth devices from unauthorized data transmission. Security methods include
authorization and identification procedures that limit the use of Bluetooth services to the
registered user and require that users make a conscious decision to open a file or accept a
data transfer. As long as these measures are enabled on the user's phone or other device,
unauthorized access is unlikely. A user can also simply switch his Bluetooth mode to
"non-discoverable" and avoid connecting with other Bluetooth devices entirely. If a user
makes use of the Bluetooth network primarily for synching devices at home, this might
automated connection process to send out infected files. However, since most cell phones
use a secure Bluetooth connection that requires authorization and authentication before
accepting data from an unknown device, the infected file typically doesn't get very far.
When the virus arrives in the user's cell phone, the user has to agree to open it and then
agree to install it. This has, so far, stopped most cell-phone viruses from doing much
sending a business card (just a text message, really) to other Bluetooth users within a 10-
meter (32-foot) radius. If the user doesn't realize what the message is, he might allow the
contact to be added to his address book, and the contact can send him messages that
phone and use its features, including placing calls and sending text messages, and the
user doesn't realize it's happening. The Car Whisperer is a piece of software that allows
hackers to send audio to and receive audio from a Bluetooth-enabled car stereo. Like a
innovation, and device manufacturers are releasing firmware upgrades that address new
phone conferencing security works. To learn more about Bluetooth security issues and
This chapter deals with related studies and topics that lead us to this special
project.
device, a master wireless unit for collecting data about the device by wireless
communicating with the slave wireless unit, and a center for communicating with the
master wireless unit through a line. The master wireless unit includes a control section for
controlling the operation of the master wireless unit, a data acquisition section for
collecting updated data from the outside of the master wireless unit to change the
operation of the control section, and a reprogramming section for rewriting the control
data that specify the operation of the control section based on the updated data.
device and a receiving device. The transmitting device is capable of receiving multiple
47
external inputs and generating and transmitting a radio frequency signal encoded with
enable it to accept inputs having different characteristics and ranges and to enable it to
provide variable sampling rate, gain and filtering of the inputs. The transmitting device
having a microprocessor such that the microprocessor controls the operation thereof. The
receiving device is capable of receiving the radio frequency signal, demodulating it and
decoding the data. The receiving device has a microprocessor such that the
the transmitting device and the receiving device by wired connection or through radio
frequency signal.
parameters of the monitored cooling system with the predefined operating parameters to
A vital signs monitoring system for allowing a user to easily monitor their vital
signs at home with a remote control type device. The vital signs monitoring system
48
includes a remote control for a television that has a plurality of sensors designed for
monitoring the vital signs of a user. A first transceiver is positioned in the housing such
that the transceiver is operationally coupled to the sensors whereby the first transceiver is
for transmitting vital sign information collected by the sensors. A television has a second
transceiver for receiving the information collected by the sensors, the television has a
processing unit operationally coupled to the second transceiver such that the processing
unit processes information received by the second transceiver. The television is for
developed by the NASA Ames Astrobionics team. This system is capable of logging
display purposes or further processing. It was developed for astronauts, but has many
applications as well. The core component of the system is a small, lightweight, wearable
device called "CPOD" that is worn on the body along with several sensors attached to it.
These sensors measure the following vital signs: ECG (2channels), respiration, activity
(3-axis acceleration), temperature (skin or ambient), heart rate, pulse oximetry SpO2, and
diastolic and systolic blood pressure. The wearable device acquires and logs these
physiological parameters up to 8 hours and can download or stream them in real time to a
JEZ XI is a device for sensing a person’s body temperature and skin conductance
which will be sent, via a wireless transmitter, to a remote PC where a wireless receiver is
connected in its serial(COM) port. The remote PC runs a program, called the J-AMP
Commander (also called the JEZ XI Data Receiver), which periodically checks the serial
port for incoming data, processes them, and sends them to the J-AMP MP3 player using
TCP/IP. J-AMP, in turn, employs AI techniques on the received data and produces an
educated guess of the user’s desired hourly MP3 rankings in its play list automatically.
The device also has remote control functionality for the J-AMP MP3 player (i.e. for
PLAY, STOP, NEXT, PREV, PAUSE, VOL+, and VOL- operations). Because of the
TCP/IP feature of the J-AMP and the J-AMP Commander/JEZ XI Data receiver, it is
possible to use two different PCs connected in a network: one to receive the data coming
from the JEZ XI, and the other one to run the J-AMP MP3 player.
coming from the skin temperature and skin conductance sensors into digital data. The
reason for choosing this MCU is that, it has built-in analog-to-digital converter and lots
of I/O ports, which makes it very suitable for this project. An ASK RF module is then
used for its wireless transmission and a Nokia 3310 LCD for its display. (Paghasian,
Transceiver Modules
This Project is a low-cost temperature data logging system composed of two units
of temperature sensor and a transmitting device (end device) and one receiver
(coordinator) which is connected to the PC via serial port. The LM35DZ in the end
device will gather temperature in its surroundings and input it to the XBee RF module.
The module will do the A/D conversion and send the data wirelessly to the coordinator.
The coordinator will then display and record the data. The test shows that the system has
affective reliable distance between the coordinator and the end device is up to 70 meters.
METHODOLOGY
This special project has undergone several steps to be completed. These include
planning, research and parts acquisition, hardware development and fabrication, firmware
development, testing/debugging.
3.1 Planning
deliberation, the researchers chose the vital signs monitoring as an application for the
data acquisition project. Related topics were then examined and the feasibility of such a
system was then weighed considering the different factors that would later be
encountered. The researchers then finalized the basic concept and divided the task of
For the collection of necessary data and information related to the project, the
researchers visited various internet sites and joined different internet forums to acquire
resources and inputs from different individuals who are experts on the system. The
researchers also visited different manufacturer's website to download and see the latest
review of the components used by this project. Internet sites of various electronic parts
vendors were also visited to inquire on the availability and prices of the components to be
sensor and Bluetooth module (EGBC-04) were ordered at e-gizmo Philippines. The
Wiznet module on the other hand was lent to us by Mr. Phillip Lim, while the software
used to design and developed the system were freewares and sharewares from various
internet sites. The rest of the parts were purchased in different electronic stores in Iligan
The whole system is composed of the embedded web server, Bluetooth host
controller and the data acquisition device with Bluetooth slave. The setup is shown figure
3.2.
3.4 Hardware
ardware Development
This section discusses the fabrication of the embedded web server, Bluetooth host
The task of designing the circuit was divided by among the researchers.
Schematic Diagrams were made using OrCAD and Cadsoft Eagle. OrCAD, which is a
suite of tools from Cadence, was used for the design and layout of the printed circuit
boards (PCBs) for the Bluetooth host controller and the data acquisition device, while
EagleCad was used for the circuit board design and the schematic diagrams of the
Fabrication is conducted in sequential steps; there is no provision to skip any of the steps,
Films are generated by printing the Layout files on the transparency. The
transparent film will be used to facilitate exposure process that will be further discussed
in this section.
3.4.2.2 Exposure
The exposure of the circuit is the next step. The white protective cover from the
board was peeled off under subdued lighting conditions. To avoid getting unwanted
prints on the PCB, the cover was peeled while holding the edges. The transparent film is
then placed over the coated side of the board. To maintain good contact, a glass plate is
55
placed over the film. The PCB was then exposed about 15cm under a fluorescent lamp
for 8 minutes.
3.4.2.3 Developer
The developing of the exposed PCB is next. The developing solution that comes
with the pre-sensitized PCB package was used. The board was then immersed in the
solution and agitated by rocking the container until the PCB trace pattern began to
appear. The PCB was then rinsed thoroughly with clean running water when the coating
of all unwanted areas of the PCB was dissolved and the copper surface is exposed. It
must be noted that a new developing solution must be used for every new exposed board.
3.4.2.4 Etchant
Etchant is used to remove the Copper from the board. There are two types of
etchant, Ferric Chloride and Ammonium Persulfate. For this project Ferric Chloride was
used. A safety reminder for this process: Be very careful when handling this solution. It
leaves bad stains and can potentially cause burn marks on the skin and can possibly cause
Apply a small amount of acetone on the pads. Repeat until clear the copper pads
3.4.2.6 Drilling
The board was then drilled with holes using a 1/32" – diameter drill bit. The bit
must be sharp and pointed enough to avoid detachment of the pads from the board during
3.4.3 Components
The following is a list of electronic components used in the embedded web server:
WIZnet Module
hardwired chip, include PHY), MAG-JACK (RJ45 with transformer) with other glue
logics. It can be used as a component and no effort is required to interface the W5100
chip and the MAG-JACK. The WIZ810MJ was chosen so the researchers could develop
server. Atmega32L was chosen as the microcontroller for the web server because
of its 32 kilobytes flash memory which is suitable for big applications like web
(2) 22pF capacitor serves as a loading capacitor which stabilizes oscillation for a
ATmega32L.
(2) 2x11 female header 2.00mm pitch socket for Wiznet module.
Controller:
PIC16F877A was chosen as the microcontroller for the Bluetooth host controller
because of its UART module that was used to communicate with both the
Bluetooth module and the Atmega32L web server. It has a single UART module
which was enough, since the flow of data is from the Bluetooth module to
PIC16f877A and then to the Atmega32L. The Rx pin of the PIC16f877A was
58
used in receiving data from the Bluetooth module and the Tx pin was used in
project.
8MHz Crystal Oscillator clock input source for PIC16f877A. The maximum
(2) 22pF capacitor serves as a loading capacitor which stabilizes oscillation for a
PIC16f877A.
not used.
PIC16f877A controls Bluetooth module and handles the data acquired from the
sensor.
4MHz Crystal oscillator clock input for the PIC16f877A. Lower frequency
would lower the power consumption but this is the lowest available frequency at
(2) 22pF capacitor serves as a loading capacitor which stabilizes oscillation for a
clearer signal.
PIC16f877A.
AVR Studio was used in developing the web server firmware. High level C
language was chosen because it is preferable for firmwares that have big and complex
algorithms. Since AVR Studio has only included assembly language compiler in their
add the GNU Compiler Collection (GCC) plug-in to AVR studio for the compilation of C
source codes.
The embedded web server firmware is composed of two parts. The main part is
the embedded web server and the other is the embedded web pages that will be stored in
The web server source code was first developed in the Dev-C++ IDE which uses
Minimalist GNU for Windows (MingW) port of GNU Compiler Collection (GCC) as its
compiler and can run the source code as a desktop application (PC-based). It is suitable
for the PC-based web server development because it is almost completely compatible
with the GCC that is used for AVR firmware development. Programming the web server
The functions that were created for this project were built to be portable, that is,
functions that are platform dependent were separated from the general purpose functions
and were grouped together. A function that uses platform dependent functions and
statements will just call the separated functions. So it will be easier to port the code to
another platform, the grouped platform dependent functions and statements were
61
enclosed in #include guards which can tell the compiler which part of the code to
compile.
The PC-based web server was slowly ported to an AVR MCU compatible code by
reducing possible RAM usage to match the Atmega32L RAM size. Because of the
compatibility of the compiler for the PC-based web server and the compiler for the
Atmega32L, only the Atmega32L specific include resource files were added. However,
the socket communication provided by the Windows Socket API (WinSock API) was not
compatible with the Wiznet driver V1.4 definition. The main function of the program was
changed to match the Wiznet Socket API socket communication and the winsock API
protocol that handles HTTP requests from a browser. A corresponding response for the
requests will be sent by the server. It could be a success header along with the requested
Since the W5100 chip implements a hardwire TCP/IP stack layer, the only thing
to do to access the Ethernet is to set or read the right registers in the chip. An interface
driver in C language is provided by Wiznet to handle the task of reading and writing into
the W5100 registers. Communication to the Ethernet was further simplified by the
SOCKET API (Application Programming Interface) also included in the driver package.
driver must be ported first to be able to use it for the Atmega32L. Wiznet also provides
the porting tutorial in their site. The IP address, subnet mask, and gateway address were
preconfigured in the firmware. The IP address was set to 10.10.25.195, the subnet mask
was set to 255.255.248.0 and the gateway was set to 10.10.31.254. This was to enable the
project to work in the Digital Signal Processing Lab local area network.
machine address (MAC address), the gateway address, and the memory
4. Wait for an incoming request and accept if there is one and then continue
back to step 4.
8. Interrupt on every UART receive and check if the format of the data being
The web pages and web files for the web server were created using notepad.
These files are the index.htm, the ajax.js, and the sty.css. These files are just in plain text
format but follow the syntax of their respective languages. A vsigns_htm() function that
is referenced when a request to vsigns.htm is made was also created for the dynamic data
page. These will be the files that can be requested by the user. The embedded web server
will only send these files to the requesting user and let the browser interpret the files.
compatible include file. Every ASCII character inside each file will be converted into its
8-bit number equivalent. Thus, there in no need for escaping of the special characters.
64
The command prompt in figure 3.6 shows the success in converting every file to a C type
include file.
Each file will have its filename as its variable name but the dot (“.”) before the
file extension will be replaced with an underscore (“_”) because a dot in C represents an
operation for struct field access. These variables will have a data type “prog_uchar”
meaning it is an unsigned char type that will be located in the flash ROM.
The researchers implemented their own ROM file system structure in the web
server firmware to handle the indexing of the web files declared as “prog_uchar”. A file
in this file system structure has a filename, pointer to a html function (for dynamic page
request), pointer to the first character of the file in the flash memory and the size of the
The following web files were compiled together with the web server:
1. index.htm - the main and default page. It is the graphical user interface (GUI) of
this project. It requests the ajax.js and sty.css to provide ajax capability and other
65
functions. A table is presented in this web page displaying the temperature and
pulse rate. Four units are displayed in the page for future upgrades. The data is
updated every 5 seconds by the JavaScript function SetInterval() that will be called
2. ajax.js – is a JavaScript that defines the functions for AJAX requests and some
other functions that are called in an interval to request the data from the server
without any interaction from the user. Functions for time and date display were also
included to have a feature of comparing the time of the request of data to the time
dynamic pages. When AJAX is employed, a browser request can be done without
actually reloading or refreshing the whole page and updates only a small part in the
page. Therefore, the communication time and the size of data that comes from the
server are minimized. Error in the communication with the server, data acquisition
device failure and abnormal data is handled by the script. It is also responsible for
handling and parsing the response of the server and in placing it in their respective
3. sty.css – is a CSS file that defines the properties of the container class and tags of
that the appearance of the index.htm can be changed without editing the index.htm.
cascading style sheet but this will not affect the overall functionality of the
application.
66
A function in ajax.js requests the html file vsigns.htm. This resource request will
be parsed by the server but will not serve a file; instead, a function is executed that sends
a server formatted string to the browser. The content of the string varies depending on the
vital signs data sent by the Bluetooth host controller. It serves as a dynamic web page of
A PIC16F877A was used as the bluetooth slave controller and a data acquisition
device. It serves as the intermediate between the sensors and the bluetooth module. The
data from the sensors is received and/or converted and is then formatted before it is sent
via the slave bluetooth device. In sending the data, the device will first send its identifier
which is either ‘252’, ‘253’, ‘254’, or ‘255.’ After the identifier is sent, a delay of five
milliseconds is employed. After the delay, the temperature data is then transmitted and
The ADC module of the PIC16F877A was used for the analog to digital
conversion. The 10-bit A/D converter converts analog signals ranging from Vref- up to
Vref+, which in this case is 0V and 3.3V respectively. The result of the conversion is a
10-bit digital value (2^10 or 1024) and is formatted to be right justified. The 2 two most
significant bits are stored in ADRESH while the other 8 bits are stored in ADRESL.
67
The LM35 temperature sensor outputs an analog voltage that is proportional to the
surrounding temperature with a resolution of 10mV per degree Celsius. The voltage
output range of the LM35 is from 0-1.48 V which corresponds to 2 - 150 degrees Celsius.
Since no signal conditioning was added into the circuit, the maximum A/D
conversion output from the A/D module of the microcontroller is only 459. 459 is 1.48V/
3.3V times 1024 which is approximately only forty five percent (45%) of the total A/D
range. This means that a conversion value of 459 corresponds to a temperature reading of
150 degree Celsius and a conversion value of zero corresponds to 2 degrees Celsius since
the L35 outputs 0mV starting from 2 degrees Celsius and below.
The following steps show the processing of the conversion data as it is translated
1. The output voltage of the LM35 is converted into digital data by the A/D module
the number of incremented voltage levels during conversion of the digital data.
0 – 3.3 Volts: voltage range that the A/D module of the microcontroller can
3.3V/1024 = 3.22mV which is the incremental voltage level required by the A/D
module for it to increment its conversion level. This is okay since the resolution
of the LM35 is 10mV per degree Celsius which is around 3 incremental voltage
levels.
68
Example:
is 35 conversion increments.
2. The number of conversion increments is then added by two (2) to get the
Example:
We determined before that a voltage output of 112.7mV from the LM35 results in
37 degrees Celsius.
After the A/D conversion is done, the results are temporarily stored. The pulse
data is then obtained by random. When both of the data are ready, the transmission then
begins. First, the identifier associated with the data acquisition device is sent. In this case,
milliseconds (5ms), the temperature data is then sent. After another five-millisecond
The Bluetooth host controller that is connected to the embedded web server is a
PIC16F877A. It receives data from the remote bluetooth slaves and after verification,
forwards the data to the web server. The Bluetooth host verifies if the data is from a
Bluetooth slave by checking the identifier. If it receives the correct identifier then it
receives the two remaining data that is sent by the Bluetooth slave which are the
temperature and the pulse data. It then stores the temperature and pulse data in an array
that corresponds to the identifier that was received. The reception of data is interrupt-
based. This was done to ensure the reception of data. Timer0’s interrupt service routine is
employed as a 5 second timer. After 5 seconds, all of the data stored in the array for each
of the acquisition devices is sent to the web server. First a number 2 is sent as a pseudo
flag that initiates the reception of data by the web server. Then the data from the
acquisition devices is then sent, starting from the one with the identifier of ‘252’, then
‘253’, ‘254’ and then finally the one with ‘255’ as the identifier. In each of the
acquisition device data, the temperature data is sent first then the pulse data second.
The two bluetooth modules that were used were EGBC – 04 bluetooth modules
presenting itself as a simple UART channel to its host. Sending and receiving data to and
from another Bluetooth device is reduced to a simple task of reading and writing to the
equivalent UART channel. All complex bluetooth tasks involved such as authentication,
70
encryption, transport, channel hopping, etc, are automatically performed by the EGBC –
04.
The bluetooth module for the data acquisition device was configured as a slave.
The device was named “KARD”. Its UART mode was set to one (1) stop bit and no
parity bit. The baud rate was configured to be 9600 baud. It was set to bind only to the
master module located at the embedded web server so that it will connect only to the
The Bluetooth module for the embedded web server was configured as a master.
The device was named “DARK”. Its UART mode was set to one (1) stop bit and no
The data acquisition device is turned on by connecting it to the battery pack. The
embedded web server hardware and the Bluetooth host controller are connected to 3.3V
regulator using jumper wires. The regulator is supplied with 6V from a DC power supply.
The embedded web server is connected to the Ethernet hub/switch using a UTP
cable that is connected to the Ethernet port of the Wiznet module. The IP address, subnet
mask, and gateway address configured in the embedded web server firmware should
match the network settings of the network that it is connected to. Since the firmware does
not support dynamic configuration, the IP address configured in the firmware must not be
A computer on the same local area network can access the embedded web server.
This is done by entering the IP address of the embedded web server on a web browser in
the computer.
CHAPTER 4
This chapter discusses the results of the hardware design and construction and the
firmware.
The fabrication of our hardware was one of the crucial parts of our special project.
The three main parts of the hardware are the embedded web server, Bluetooth host
Since all the printed circuit boards for the hardware were pre-sensitized, the
resulting etched PCBs were neat. Pin headers and jumper wires were used to connect the
power supply to the devices. The UART receive of the Atmega32L was connected to the
UART transmit of the PIC16f877A (HOST side) by a single jumper wire. The modules
and microcontroller were not directly soldered to the circuit board and used IC sockets to
avoid damaging the modules and microcontroller from excessive soldering heat.
73
Figure 4.2 Final Hardware Assembly: Bluetooth Host Controller Together With the
The embedded web server device was initially tested with a test firmware that
initializes the W5100 chip’s IP address, subnet mask and machine address. The porting
guide of from Wiznet states that once the chip is initialized, it will give a reply when
pinged.
The configured IP address of the test firmware was 192.168.0.1, subnet mask of
connected to a crossover UTP cable connected to a laptop computer at one end that has
an IP address of 192.168.0.2 and the same subnet mask. The hardware was pinged using
The wiznet link indicators (amber and green LEDs in figure 4.3) lit up and the
reply to the ping was received in the command prompt. The result of the command ping
The Bluetooth host controller was supplied with a regulated 3.3V using an
Bluetooth dongle was used. The dongle was connected to a laptop computer and the
device discovery function was turned on. The laptop computer was able to detect and
connect with the Bluetooth module. The whole Bluetooth host controller was then
connected to the web server module to verify its functionality. The Bluetooth host
controller was able to connect to the web server and was able to send the temperature
supply while the LM35 temperature sensor operates on at least 4V. The researchers
decided to use four 1.5V AA batteries (6V in total) for the supply and placed it in a four-
battery holder pack. The supply was directly connected to the LM35 sensor. The supply
was also regulated to 3.3V using BA033 for the Bluetooth module and PIC16f877A.
This device, together with the battery pack, was put inside a pouch that can be
and Bluetooth module to operate. Thus the power supply was made. The regulator is
Figure 4.7 3.3V Voltage Regulators for the Embedded Web Server
4.2 Firmware
The data flow of the system is from the sensor, then to the PIC16f877A (Slave
side), then to the Bluetooth slave, the Bluetooth host, the PIC16f877A (Host Side), the
Atmega32L, the Wiznet module and then to the web browser of the user.
79
The firmware for the Bluetooth slave controller and data acquisition device was
debugged using the hyper terminal of MiKroC. The Bluetooth slave was paired to a CD-
R King Bluetooth dongle that is connected to a laptop computer. The data was received in
The sensor, together with a room thermometer was placed in different places to
sample temperature. The temperature that was received in the hyper terminal was
compared to the readings from a room thermometer. Table 4.1 shows the comparison of
five samples.
31 30 3.33%
37 37 0%
39 39.5 1.2%
36 36.5 1.3%
The data in table 4.1 shows that the temperature readings of the data acquisition
device are very close to the actual temperature readings of the room thermometer. The
highest error the device is only 3.33% thus giving an acceptable reliability.
80
The Bluetooth host controller was also tested using the CD-R King Bluetooth
dongle. The input came from the MikroC hyper terminal. The Bluetooth host controller
was connected to the embedded web server in order for the researchers to see the data
sent by the hyper terminal. The Bluetooth host controller was able to receive data from
the data acquisition device and was able to send the data to the web server in the format
The firmware for the embedded web server was first tested using random data
inputs to see if the hypertext transfer protocol code is fully functional. Making the code
portable between Atmega32L and Windows Operating System enabled the researchers to
easily debug the protocol flow. The running window of the PC-based web server is
shown in figure 4.8. The lines of string in the window were printed every time the server
Two methods for debugging the web server were used by the researchers. The
first one was to use the C language “printf()” function to watch variables at certain lines
in the program. And the second method was using the Dev-C++ debug functionality and
watched the variables while running the program slowly and line-by-line.
Since it worked, the UART communication with PIC16F877A was included and
the code was transferred to an AVR Studio project. The complete embedded web server
The webpage displays the current date and time. It also shows the time and date of
the current data request and the time and date that on which the latest data arrived or was
received in the browser. The displayed latency is the difference between the time the
browser request was sent and the time the response was received. Up to four data
acquisition device outputs can be displayed in the web browser. A status of the unit is
also displayed whether the data acquisition device is connected or not (ON or OFF).
Server and device communication errors, as well as abnormal vitals signs (temperatures
Figures 4.9-4.12 shows the resulting browser views of the running embedded web
server while being accessed using a Mozilla Firefox browser. Only a single data
acquisition device was built so the data for Vital Signs Units (VS unit) 2,3, and 4 are set
to “N/A” (Not Applicable) by the JavaScript function handling the response of the server
and displayed the status of each VS unit to “OFF”. The temperature data is the only
actual reading because the pulse rate data was just randomly generated in the data
acquisition device as stated in the Scope and Limitations. When the client becomes
82
disconnected from the server, the date and time of reception display will turn red as well
as the latency box that now displays the message: “No response from server!".
Figure 4.12 Browser View When the Server is Offline or the User is Disconnected
84
The web server was also tested using other web browsers such as Opera, Internet
Explorer and Google Chrome as a compatibility test of the web pages. It shows that only
the Internet Explorer browser does not support the red background color for errors. Since
it does not affect the over-all functionality of the web application, this problem was
ignored.
The default web page (index.htm) of the web server was added with a feature of
displaying the difference of the AJAX request timestamp and server response timestamp
in milliseconds. The researchers use the term latency to for this value.
First, the researchers tested the latency of a single client connected to the web
server over the network in Digital Signal Processing Lab. Figure 4.13 shows a latency of
16 milliseconds encircled in white. This includes the processing time of the firmware,
time spent in transmission through Ethernet and the processing time of the browser. Refer
The next test was to connect to the server from the computers on the same
network. There is no significant change in the latency of the connection from the two
browsers. So another test was done. This was to open multiple browsers pointing to the
server on one of the connecting computers. Figure 4.14 shows six windows (four Mozilla
Firefox and two Internet Explorer browsers) all connecting simultaneously to the web
server. The encircled parts of the browsers show the latency of each connection to the
server. The latencies displayed from left to right and down were 15, 16, 16, 17, 16 and 16
researchers proceeded to test with more simultaneous connections because the result was
more than what was expected. Before, the researchers first assumed that the capacity of
86
the server was only up to four clients simultaneously connecting to the server because
only four sockets are available in the Wiznet module. However, by setting the interval of
the AJAX request to 5 milliseconds, the interval of the server receiving requests from
clients will not occur at the same time. Therefore, the server can have enough time to
5.1 Conclusion
This special project was successfully done. The researchers were able to develop a
data acquisition system capable of displaying vital signs data like body temperature.
However, the researchers only simulated the value for pulse rate in the data acquisition
device to show that multiple data can reach the embedded web server from the data
acquisition device.
microcontroller unit that serves the web page displaying the data acquired by the data
acquisition device. The web server was customized for the project requirements. The web
server is able to serve dynamic web pages through the aide of AJAX (Asynchronous
JavaScript and XML). The web server can process and serve up to six simultaneous
connections from a single computer together with another connection from another
5.2 Recommendation
The researchers had very good results with the system at present, but there is a lot
1. Add more interfaces in the data acquisition device for additional vital signs
sensors.
2. Increase the number of data acquisition devices and add better multiplexing
4. Move the storage of the web pages from flash memory to an external storage like
5. Add database connectivity or support for data logging so that data can be stored
6. Add a method for changing the IP address, subnet mask and gateway address for
88
BIBLIOGRAPHY
Books
Paul, Christopher, et.al. The Linux Development Platform Configuring, Using and
Maintaining a Complete Programming Environment. Upper Saddle River, New
Jersey: Pearson Education, Inc. 2003
Special Projects
Napoleon Garde and Jerome Paghasian, JEZ XI: A Wireless Sensor-Remote Controller
Device For an Intelligent, PC-Based, Client-Server MP3 Player System. College
of Engineering, Mindanao State University – Iligan Institute of Technology,
March 2007
Niño Balansag, Loinel Evangelio, Allenn Lowaton, Wireless Temperature Data Logger
Implemented in a Two Point-To-Single Point Topology Utilizing Zigbee Protocol
Through XBee Radio Frequency Transceiver Modules, College of Engineering,
Mindanao State University – Iligan Institute of Technology, March 2008
Internet
W. Chen, et. al. 2005. Development of a Multiple Vital Signs Monitoring System for m-
Healthcare. 2p. http://www.rgi.tut.fi/ijbem/volume7/number1/pdf/090.pdf
W5100_Porting_Guide.pdf
http://www.wiznet.co.kr/rg4_board/down.php?&kw=we&bd_num=15866&key=0
&mode
=down&bbs_code=en_pds
Appendix A
SCHEMATIC DIAGRAMS
Schematic Diagram of power supply for Embedded Web Server and Bluetooth Host
Controller
92
A.4 Schematic Diagram of power supply for Embedded Web Server and Bluetooth
Host Controller providing 3.3 Volts supply.
Appendix B
SOURCE CODES
//When this is build and compiled in AVR Studio, this will be compiled
//as the embedded web server
//If compiled in DEV-C++, this will be build and compiled as an
//executable file for windows
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include <stdlib.h>
#define HTTP_PORT 80
#define INBUFSIZE 40
#ifdef AVR
#include <avr/io.h>
#include "W5100/types.h"
#include "W5100/w5100.h"
#include "W5100/socket.h"
#include <avr\pgmspace.h>
#include <avr\eeprom.h>
#include <util\delay.h>
#define BAUD 9600UL
#define MUBBR ((F_CPU/16/BAUD) -1)
#include <avr/interrupt.h>
//hardware/mac address
EEMEM uint8_t mac_addr[6]={ 0x00, 0x0D, 0xF0, 0x3C, 0x3F, 0xAB };
//ip address
EEMEM uint8_t ip_addr[4]={10,10,25,195}; //-->dsp lab
//subnet mask
EEMEM uint8_t netmask[4]={255,255,248,0}; //-->dsp lab
//gateway address
EEMEM uint8_t gate_addr[4]={10,10,31,254};// -->dsp lab
#define prtf(fmt, args...) prtf_P(PSTR(fmt), ##args)
#else
#include <winsock.h>
98
#include <stdint.h>
#define send(a,b,c) send(a,b,c,0)
#define recv(a,b,c) recv(a,b,c,0)
#define pgm_read_byte_near(p) (*(p))
#define PGM_VOID_P uint8_t*
#define memcpy_P(a,b,c) memcpy(a,b,c)
#define prog_uchar uint8_t
#define prtf(fmt, args...) prtf_P(fmt, ##args)
#endif
#include "pages.inc" //webpages definitions
//success http response header
prog_uchar hdr[]="HTTP/1.0 200 OK\r\nContent-Type: text/html \r\n\r\n";
int num_files;
SOCKET clientSocket,serverSocket;
uint8_t inBuf[INBUFSIZE];//input buffer
uint8_t startRcv=0;//start receiving flag
uint8_t dataRcv[8]={0,0,0,0,0,0,0,0};//initial data
uint8_t data_idx=0;//dataRcv indexer
//flush output
void net_oflush() {
if (outBufPtr != outBuf){
send(clientSocket, outBuf, outBufPtr-outBuf);
}
outBufPtr = outBuf;
}
}
#endif
//sends vsigns.htm
void vsigns(){
int i;
net_write_P(hdr,sizeof(hdr)-1);
#ifndef AVR
//if compiling for windows, get random data for testing
getdata();
#endif
for(i=0;i<4;i++){
prtf("%d,%d|",dataRcv[2*i],dataRcv[2*i+1]);//temperature,pulse rate
net_oflush();
}
}
101
else if (c != '\r')
nnl = 0;
}
current_msg_size = fragmented_msg_ind = 0;
}
// http handler function
void httpServe(){
char filename[30],c;
int cnt=0;
filename[0]=0;
//parse http method
if (toupper(net_getc()) != 'G' ||
toupper(net_getc()) != 'E' ||
toupper(net_getc()) != 'T' ||
net_getc() != ' ') {
OutputHTTPError(405); //method is not "GET"
flushInput();//reject the succeeding data
return;
}
//get the file requested
while ((c=net_getc())!=' ' && c != '?') {
if(c!='/'){
filename[cnt++]=tolower(c);
}
}
//in case of empty file request
//send index.htm
//eg. http://192.168.0.2
if(filename[0]==0){
strcpy(filename,"index.htm");
cnt=9;
}
filename[cnt]=0;
serveFile(filename);
flushInput();
}
#ifdef AVR
//if comipling for AVR, tell compiler to compiler the
104
setSUBR( ip );
eeprom_read_block(ip, ip_addr, 4); // ip
setSIPR( ip );
eeprom_read_block(ip, gate_addr, 4);// gateway
setGAR( ip );
sysinit(0x55, 0x55);
}
int main(){
int i=0;
w5100_init();
//usart initialization
UCSRB = (1<<RXCIE)|(1<<RXEN); //only interrupt-based recv is used
UCSRC = (1<<URSEL)|(0<<UMSEL)
|(0<<UPM1)|(0<<UPM0)
|(0<<USBS)|(1<<UCSZ1)|(1<<UCSZ0);
UBRRH = (uint8_t)(MUBBR>>8);
UBRRL = (uint8_t)MUBBR;
DDRD=0x02;
//end of usart initialization
sei();//enable global interrupt
// poll all four sockets
num_files=sizeof(romFS)/sizeof(struct fileSys);
while(1) {
socketServer(0);
i++;
if(i>=4)
i=0;
}
return 0;
}
ISR(USART_RXC_vect){
char ReceivedByte;
ReceivedByte = UDR;
//start receiving only if
//number 2 is received
if(ReceivedByte==2)
startRcv=1;
106
else if(startRcv==1){
dataRcv[data_idx]=ReceivedByte;
data_idx++;
}
if (data_idx>=8){
data_idx=0;
startRcv=0;
}
}
#else
//else webserver is compiled for the windows
void sockServer(short nPort)
{
// Create a TCP/IP stream socket to "listen" with
serverSocket = socket(AF_INET, // Address family
SOCK_STREAM, // Socket
type
0); // Protocol
if (serverSocket == INVALID_SOCKET)
{
printf("socket()");
return;
}
// Fill in the address structure
SOCKADDR_IN saServer;
saServer.sin_family = AF_INET;
if (bind(serverSocket,(LPSOCKADDR)&saServer,sizeof(struct
sockaddr)) == SOCKET_ERROR) // bind the name to the socket
{
printf("bind()");
closesocket(serverSocket);
return;
107
}
int nLen;
nLen = sizeof(SOCKADDR);
if (gethostname(inBuf, INBUFSIZE) == SOCKET_ERROR)
{
printf("gethostname()");
closesocket(serverSocket);
return;
}
// Show the server name and port number
printf("\nServer named %s waiting on port %d\n",
inBuf, nPort);
// Set the socket to listen
printf("\nlisten()");
if (listen(serverSocket,10)== SOCKET_ERROR)
{
printf("listen()");
closesocket(serverSocket);
return;
}
// Wait for an incoming request
for(;;){
printf("\nWaiting for browser request...");
clientSocket = accept(serverSocket,NULL,NULL);
if (serverSocket == INVALID_SOCKET){
printf("\nRequest accepted!");
closesocket(serverSocket);
return ;
}
httpServe();
printf("\nResponse sent!");
closesocket(clientSocket);
}
closesocket(serverSocket);
}
int main()
{
WORD wVersionRequested = MAKEWORD(1,1);
108
WSADATA wsaData;
// Initialize WinSock and check version
WSAStartup(wVersionRequested, &wsaData);
if (wsaData.wVersion != wVersionRequested)
{
return 0;
}
num_files=sizeof(romFS)/sizeof(struct fileSys);
sockServer(80);
WSACleanup();
}
#endif
109
//pages.inc
//generated by the rom file maker
//the C include conversion of the web files:
//index.htm----index_htm
//sty.css--------sty_css
//ajax.js--------ajax_js
prog_uchar index_htm[]={
0x3C, 0x68, 0x74, 0x6D, 0x6C, 0x3E, 0x0A, 0x3C, 0x68, 0x65, 0x61,
0x64, 0x3E, 0x0A, 0x3C, 0x74, 0x69, 0x74, 0x6C, 0x65, 0x3E, 0x45,
0x42, 0x57, 0x56, 0x53, 0x4D, 0x3C, 0x2F, 0x74, 0x69, 0x74, 0x6C,
0x65, 0x3E, 0x0A, 0x3C, 0x6C, 0x69, 0x6E, 0x6B, 0x20, 0x68, 0x72,
0x65, 0x66, 0x3D, 0x22, 0x73, 0x74, 0x79, 0x2E, 0x63, 0x73, 0x73,
0x22, 0x20, 0x72, 0x65, 0x6C, 0x3D, 0x22, 0x73, 0x74, 0x79, 0x6C,
0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x74, 0x79, 0x70,
0x65, 0x3D, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2F, 0x63, 0x73, 0x73,
0x22, 0x20, 0x2F, 0x3E, 0x0A, 0x3C, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x20, 0x6C, 0x61, 0x6E, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3D,
0x22, 0x6A, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x22, 0x20, 0x73, 0x72, 0x63, 0x3D, 0x22, 0x61, 0x6A, 0x61, 0x78,
0x2E, 0x6A, 0x73, 0x22, 0x3E, 0x3C, 0x2F, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x3E, 0x0A, 0x3C, 0x62, 0x6F, 0x64, 0x79, 0x20, 0x6F,
0x6E, 0x4C, 0x6F, 0x61, 0x64, 0x3D, 0x27, 0x67, 0x65, 0x74, 0x5F,
0x64, 0x61, 0x74, 0x61, 0x28, 0x29, 0x3B, 0x20, 0x73, 0x65, 0x74,
0x49, 0x6E, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6C, 0x28, 0x22, 0x67,
0x65, 0x74, 0x5F, 0x64, 0x61, 0x74, 0x61, 0x28, 0x29, 0x3B, 0x22,
0x2C, 0x20, 0x35, 0x30, 0x30, 0x30, 0x29, 0x3B, 0x20, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x73, 0x65, 0x74, 0x49, 0x6E, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6C, 0x28, 0x22, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61,
0x79, 0x43, 0x75, 0x72, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6D,
0x65, 0x28, 0x29, 0x3B, 0x22, 0x2C, 0x20, 0x31, 0x30, 0x30, 0x30,
0x29, 0x3B, 0x27, 0x3E, 0x0A, 0x20, 0x3C, 0x74, 0x61, 0x62, 0x6C,
0x65, 0x20, 0x61, 0x6C, 0x69, 0x67, 0x6E, 0x3D, 0x20, 0x22, 0x63,
110
0x65, 0x6E, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74,
0x68, 0x3D, 0x22, 0x31, 0x30, 0x30, 0x25, 0x22, 0x20, 0x62, 0x6F,
0x72, 0x64, 0x65, 0x72, 0x3D, 0x22, 0x31, 0x22, 0x20, 0x63, 0x65,
0x6C, 0x6C, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6E, 0x67, 0x3D, 0x22,
0x35, 0x22, 0x20, 0x63, 0x65, 0x6C, 0x6C, 0x70, 0x61, 0x64, 0x64,
0x69, 0x6E, 0x67, 0x3D, 0x22, 0x31, 0x22, 0x3E, 0x0A, 0x20, 0x20,
0x3C, 0x74, 0x72, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74,
0x64, 0x20, 0x63, 0x6F, 0x6C, 0x73, 0x70, 0x61, 0x6E, 0x3D, 0x38,
0x20, 0x61, 0x6C, 0x69, 0x67, 0x6E, 0x3D, 0x20, 0x22, 0x63, 0x65,
0x6E, 0x74, 0x65, 0x72, 0x22, 0x20, 0x63, 0x6C, 0x61, 0x73, 0x73,
0x3D, 0x22, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x20, 0x3E,
0x0A, 0x09, 0x20, 0x20, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6E,
0x65, 0x74, 0x2D, 0x42, 0x61, 0x73, 0x65, 0x64, 0x20, 0x57, 0x69,
0x72, 0x65, 0x6C, 0x65, 0x73, 0x73, 0x20, 0x56, 0x69, 0x74, 0x61,
0x6C, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x73, 0x20, 0x4D, 0x6F, 0x6E,
0x69, 0x74, 0x6F, 0x72, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x2F,
0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x2F, 0x74, 0x72, 0x3E,
0x0A, 0x20, 0x20, 0x3C, 0x74, 0x72, 0x3E, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x3C, 0x74, 0x64, 0x20, 0x63, 0x6F, 0x6C, 0x73, 0x70, 0x61,
0x6E, 0x3D, 0x38, 0x20, 0x49, 0x44, 0x3D, 0x22, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x22, 0x20, 0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D,
0x22, 0x6C, 0x62, 0x6C, 0x22, 0x3E, 0x3C, 0x2F, 0x74, 0x64, 0x3E,
0x0A, 0x20, 0x20, 0x3C, 0x2F, 0x74, 0x72, 0x3E, 0x0A, 0x20, 0x20,
0x3C, 0x74, 0x72, 0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x74, 0x72, 0x3E,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x63, 0x6F,
0x6C, 0x73, 0x70, 0x61, 0x6E, 0x3D, 0x32, 0x20, 0x61, 0x6C, 0x69,
0x67, 0x6E, 0x3D, 0x20, 0x22, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72,
0x22, 0x20, 0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D, 0x22, 0x44, 0x41,
0x44, 0x75, 0x6E, 0x69, 0x74, 0x22, 0x20, 0x3E, 0x0A, 0x09, 0x20,
0x20, 0x20, 0x20, 0x56, 0x53, 0x20, 0x55, 0x4E, 0x49, 0x54, 0x20,
0x31, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x2F, 0x74, 0x64, 0x3E,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x63, 0x6F,
0x6C, 0x73, 0x70, 0x61, 0x6E, 0x3D, 0x32, 0x20, 0x20, 0x61, 0x6C,
0x69, 0x67, 0x6E, 0x3D, 0x20, 0x22, 0x63, 0x65, 0x6E, 0x74, 0x65,
0x72, 0x22, 0x20, 0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D, 0x22, 0x44,
0x41, 0x44, 0x75, 0x6E, 0x69, 0x74, 0x22, 0x20, 0x3E, 0x0A, 0x09,
0x20, 0x20, 0x20, 0x20, 0x56, 0x53, 0x20, 0x55, 0x4E, 0x49, 0x54,
0x20, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x2F, 0x74, 0x64,
111
0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x63,
0x6F, 0x6C, 0x73, 0x70, 0x61, 0x6E, 0x3D, 0x32, 0x20, 0x20, 0x61,
0x6C, 0x69, 0x67, 0x6E, 0x3D, 0x20, 0x22, 0x63, 0x65, 0x6E, 0x74,
0x65, 0x72, 0x22, 0x20, 0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D, 0x22,
0x44, 0x41, 0x44, 0x75, 0x6E, 0x69, 0x74, 0x22, 0x20, 0x3E, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x09, 0x56, 0x53, 0x20, 0x55, 0x4E, 0x49,
0x54, 0x20, 0x33, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x2F, 0x74,
0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20,
0x63, 0x6F, 0x6C, 0x73, 0x70, 0x61, 0x6E, 0x3D, 0x32, 0x20, 0x20,
0x61, 0x6C, 0x69, 0x67, 0x6E, 0x3D, 0x20, 0x22, 0x63, 0x65, 0x6E,
0x74, 0x65, 0x72, 0x22, 0x20, 0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D,
0x22, 0x44, 0x41, 0x44, 0x75, 0x6E, 0x69, 0x74, 0x22, 0x20, 0x3E,
0x0A, 0x09, 0x20, 0x20, 0x20, 0x20, 0x56, 0x53, 0x20, 0x55, 0x4E,
0x49, 0x54, 0x20, 0x34, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x2F,
0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x2F, 0x74, 0x72, 0x3E,
0x0A, 0x20, 0x20, 0x3C, 0x74, 0x72, 0x20, 0x63, 0x6C, 0x61, 0x73,
0x73, 0x3D, 0x22, 0x6C, 0x62, 0x6C, 0x22, 0x3E, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68,
0x3D, 0x22, 0x32, 0x30, 0x25, 0x22, 0x20, 0x3E, 0x54, 0x65, 0x6D,
0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x28, 0x64, 0x65,
0x67, 0x2E, 0x43, 0x29, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74,
0x68, 0x3D, 0x22, 0x35, 0x25, 0x22, 0x20, 0x69, 0x64, 0x3D, 0x22,
0x74, 0x65, 0x6D, 0x70, 0x31, 0x22, 0x3E, 0x3C, 0x2F, 0x74, 0x64,
0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x77,
0x69, 0x64, 0x74, 0x68, 0x3D, 0x22, 0x32, 0x30, 0x25, 0x22, 0x20,
0x3E, 0x54, 0x65, 0x6D, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72,
0x65, 0x28, 0x64, 0x65, 0x67, 0x2E, 0x43, 0x29, 0x3A, 0x3C, 0x2F,
0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64,
0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3D, 0x22, 0x35, 0x25, 0x22,
0x20, 0x69, 0x64, 0x3D, 0x22, 0x74, 0x65, 0x6D, 0x70, 0x32, 0x22,
0x3E, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3D, 0x22,
0x32, 0x30, 0x25, 0x22, 0x20, 0x3E, 0x54, 0x65, 0x6D, 0x70, 0x65,
0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x28, 0x64, 0x65, 0x67, 0x2E,
0x43, 0x29, 0x3A, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68,
0x3D, 0x22, 0x35, 0x25, 0x22, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x74,
112
0x65, 0x6D, 0x70, 0x33, 0x22, 0x3E, 0x3C, 0x2F, 0x74, 0x64, 0x3E,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69,
0x64, 0x74, 0x68, 0x3D, 0x22, 0x32, 0x30, 0x25, 0x22, 0x20, 0x3E,
0x54, 0x65, 0x6D, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65,
0x28, 0x64, 0x65, 0x67, 0x2E, 0x43, 0x29, 0x3A, 0x3C, 0x2F, 0x74,
0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20,
0x77, 0x69, 0x64, 0x74, 0x68, 0x3D, 0x22, 0x35, 0x25, 0x22, 0x20,
0x69, 0x64, 0x3D, 0x22, 0x74, 0x65, 0x6D, 0x70, 0x34, 0x22, 0x3E,
0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x2F, 0x74,
0x72, 0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x74, 0x72, 0x20, 0x63, 0x6C,
0x61, 0x73, 0x73, 0x3D, 0x22, 0x6C, 0x62, 0x6C, 0x22, 0x3E, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x3E, 0x50, 0x75,
0x6C, 0x73, 0x65, 0x20, 0x52, 0x61, 0x74, 0x65, 0x28, 0x42, 0x50,
0x4D, 0x29, 0x3A, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x70,
0x75, 0x6C, 0x73, 0x65, 0x31, 0x22, 0x3E, 0x3C, 0x2F, 0x74, 0x64,
0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x3E,
0x50, 0x75, 0x6C, 0x73, 0x65, 0x20, 0x52, 0x61, 0x74, 0x65, 0x28,
0x42, 0x50, 0x4D, 0x29, 0x3A, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x69, 0x64, 0x3D,
0x22, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x32, 0x22, 0x3E, 0x3C, 0x2F,
0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64,
0x20, 0x3E, 0x50, 0x75, 0x6C, 0x73, 0x65, 0x20, 0x52, 0x61, 0x74,
0x65, 0x28, 0x42, 0x50, 0x4D, 0x29, 0x3A, 0x3C, 0x2F, 0x74, 0x64,
0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x69,
0x64, 0x3D, 0x22, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x33, 0x22, 0x3E,
0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C,
0x74, 0x64, 0x20, 0x3E, 0x50, 0x75, 0x6C, 0x73, 0x65, 0x20, 0x52,
0x61, 0x74, 0x65, 0x28, 0x42, 0x50, 0x4D, 0x29, 0x3A, 0x3C, 0x2F,
0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64,
0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x34,
0x22, 0x3E, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x3C,
0x2F, 0x74, 0x72, 0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x74, 0x72, 0x20,
0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D, 0x22, 0x6C, 0x62, 0x6C, 0x22,
0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x3E,
0x55, 0x6E, 0x69, 0x74, 0x20, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x3A, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x3C, 0x74, 0x64, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x73, 0x74, 0x61,
113
0x74, 0x31, 0x22, 0x3E, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x3E, 0x55, 0x6E, 0x69,
0x74, 0x20, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3A, 0x3C, 0x2F,
0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64,
0x20, 0x69, 0x64, 0x3D, 0x22, 0x73, 0x74, 0x61, 0x74, 0x32, 0x22,
0x3E, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x3C, 0x74, 0x64, 0x20, 0x3E, 0x55, 0x6E, 0x69, 0x74, 0x20, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x3A, 0x3C, 0x2F, 0x74, 0x64, 0x3E,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x69, 0x64,
0x3D, 0x22, 0x73, 0x74, 0x61, 0x74, 0x33, 0x22, 0x3E, 0x3C, 0x2F,
0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64,
0x20, 0x3E, 0x55, 0x6E, 0x69, 0x74, 0x20, 0x53, 0x74, 0x61, 0x74,
0x75, 0x73, 0x3A, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x3C, 0x74, 0x64, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x73,
0x74, 0x61, 0x74, 0x34, 0x22, 0x3E, 0x3C, 0x2F, 0x74, 0x64, 0x3E,
0x0A, 0x20, 0x20, 0x3C, 0x2F, 0x74, 0x72, 0x3E, 0x0A, 0x20, 0x20,
0x3C, 0x74, 0x72, 0x20, 0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D, 0x22,
0x6C, 0x62, 0x6C, 0x22, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C,
0x74, 0x64, 0x20, 0x63, 0x6F, 0x6C, 0x73, 0x70, 0x61, 0x6E, 0x3D,
0x38, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x44, 0x61, 0x74, 0x65, 0x22, 0x3E, 0x26, 0x6E, 0x62,
0x73, 0x70, 0x3B, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20,
0x3C, 0x2F, 0x74, 0x72, 0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x74, 0x72,
0x20, 0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D, 0x22, 0x6C, 0x62, 0x6C,
0x22, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x74, 0x64, 0x20,
0x63, 0x6F, 0x6C, 0x73, 0x70, 0x61, 0x6E, 0x3D, 0x36, 0x20, 0x69,
0x64, 0x3D, 0x22, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44,
0x61, 0x74, 0x65, 0x22, 0x3E, 0x26, 0x6E, 0x62, 0x73, 0x70, 0x3B,
0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x0A, 0x09, 0x3C, 0x74, 0x64, 0x20,
0x63, 0x6F, 0x6C, 0x73, 0x70, 0x61, 0x6E, 0x3D, 0x32, 0x20, 0x69,
0x64, 0x3D, 0x22, 0x6C, 0x61, 0x74, 0x65, 0x6E, 0x63, 0x79, 0x22,
0x3E, 0x26, 0x6E, 0x62, 0x73, 0x70, 0x3B, 0x3C, 0x2F, 0x74, 0x64,
0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x2F, 0x74, 0x72, 0x3E, 0x0A, 0x20,
0x20, 0x3C, 0x74, 0x72, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C,
0x74, 0x64, 0x20, 0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D, 0x27, 0x66,
0x6F, 0x6F, 0x74, 0x65, 0x72, 0x27, 0x20, 0x63, 0x6F, 0x6C, 0x73,
0x70, 0x61, 0x6E, 0x3D, 0x38, 0x3E, 0x3C, 0x70, 0x3E, 0x54, 0x68,
0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6F, 0x6E, 0x20, 0x74,
114
0x68, 0x69, 0x73, 0x20, 0x77, 0x65, 0x62, 0x20, 0x61, 0x70, 0x70,
0x6C, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x69, 0x73,
0x20, 0x66, 0x72, 0x6F, 0x6D, 0x20, 0x74, 0x68, 0x65, 0x20, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x74, 0x61,
0x20, 0x61, 0x63, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x69, 0x6F,
0x6E, 0x20, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2C, 0x20, 0x70,
0x72, 0x6F, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x61, 0x6E,
0x64, 0x20, 0x66, 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x74, 0x65, 0x64,
0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6C, 0x75,
0x65, 0x74, 0x6F, 0x6F, 0x74, 0x68, 0x20, 0x68, 0x6F, 0x73, 0x74,
0x20, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4D,
0x43, 0x55, 0x20, 0x28, 0x50, 0x49, 0x43, 0x31, 0x36, 0x66, 0x38,
0x37, 0x37, 0x41, 0x29, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x74, 0x68,
0x65, 0x6E, 0x20, 0x69, 0x6E, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64,
0x20, 0x69, 0x6E, 0x20, 0x61, 0x6E, 0x20, 0x65, 0x6D, 0x62, 0x65,
0x64, 0x64, 0x65, 0x64, 0x20, 0x64, 0x79, 0x6E, 0x61, 0x6D, 0x69,
0x63, 0x20, 0x77, 0x65, 0x62, 0x70, 0x61, 0x67, 0x65, 0x20, 0x69,
0x6E, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74,
0x68, 0x65, 0x20, 0x20, 0x4D, 0x43, 0x55, 0x2D, 0x62, 0x61, 0x73,
0x65, 0x64, 0x20, 0x28, 0x41, 0x54, 0x4D, 0x45, 0x47, 0x41, 0x33,
0x32, 0x4C, 0x29, 0x20, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x2E, 0x20, 0x3C, 0x2F, 0x70, 0x3E, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x3C, 0x70, 0x3E, 0x4B, 0x69, 0x73, 0x74,
0x65, 0x72, 0x20, 0x47, 0x65, 0x6E, 0x65, 0x73, 0x69, 0x73, 0x20,
0x20, 0x4A, 0x69, 0x6D, 0x65, 0x6E, 0x65, 0x7A, 0x20, 0x28, 0x41,
0x54, 0x4D, 0x45, 0x47, 0x41, 0x33, 0x32, 0x4C, 0x20, 0x66, 0x69,
0x72, 0x6D, 0x77, 0x61, 0x72, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20,
0x65, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x77, 0x65,
0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x61, 0x6E, 0x64,
0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77,
0x65, 0x62, 0x70, 0x61, 0x67, 0x65, 0x73, 0x29, 0x3C, 0x62, 0x72,
0x2F, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x41, 0x72, 0x76, 0x69, 0x6E, 0x20, 0x44, 0x69, 0x61, 0x6F, 0x20,
0x4D, 0x69, 0x72, 0x61, 0x6E, 0x64, 0x61, 0x20, 0x28, 0x50, 0x49,
0x43, 0x31, 0x36, 0x66, 0x38, 0x37, 0x37, 0x41, 0x20, 0x66, 0x69,
0x72, 0x6D, 0x77, 0x61, 0x72, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20,
0x62, 0x6C, 0x75, 0x65, 0x74, 0x6F, 0x6F, 0x74, 0x68, 0x20, 0x63,
0x6F, 0x6D, 0x6D, 0x75, 0x6E, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6F,
115
0x6E, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x61, 0x63,
0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x29, 0x3C,
0x62, 0x72, 0x2F, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x44, 0x79, 0x6C, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65,
0x73, 0x65, 0x20, 0x4D, 0x65, 0x73, 0x69, 0x6E, 0x61, 0x20, 0x28,
0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x20, 0x66, 0x6F,
0x72, 0x20, 0x65, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20,
0x77, 0x65, 0x62, 0x2C, 0x20, 0x62, 0x6C, 0x75, 0x65, 0x74, 0x6F,
0x6F, 0x74, 0x68, 0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x75, 0x6E, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, 0x6E, 0x64, 0x20,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61,
0x74, 0x61, 0x20, 0x61, 0x63, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74,
0x69, 0x6F, 0x6E, 0x29, 0x20, 0x3C, 0x2F, 0x70, 0x3E, 0x3C, 0x2F,
0x74, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x3C, 0x2F, 0x74, 0x72, 0x3E,
0x0A, 0x3C, 0x2F, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x3E, 0x0A, 0x3C,
0x2F, 0x62, 0x6F, 0x64, 0x79, 0x3E, 0x0A, 0x3C, 0x2F, 0x68, 0x74,
0x6D, 0x6C, 0x3E, 0x0A
};
prog_uchar ajax_js[]={
0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x69, 0x6E,
0x69, 0x74, 0x41, 0x6A, 0x61, 0x78, 0x28, 0x29, 0x7B, 0x0A, 0x20,
0x76, 0x61, 0x72, 0x20, 0x78, 0x6D, 0x6C, 0x48, 0x74, 0x74, 0x70,
0x3D, 0x6E, 0x75, 0x6C, 0x6C, 0x3B, 0x0A, 0x20, 0x74, 0x72, 0x79,
0x7B, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6D, 0x6C, 0x48,
0x74, 0x74, 0x70, 0x3D, 0x6E, 0x65, 0x77, 0x20, 0x58, 0x4D, 0x4C,
0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x28, 0x29, 0x3B, 0x0A, 0x20, 0x7D, 0x63, 0x61, 0x74, 0x63, 0x68,
0x20, 0x28, 0x65, 0x29, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x74,
0x72, 0x79, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x78, 0x6D, 0x6C, 0x48, 0x74, 0x74, 0x70, 0x3D, 0x6E,
0x65, 0x77, 0x20, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x58, 0x4F,
0x62, 0x6A, 0x65, 0x63, 0x74, 0x28, 0x22, 0x4D, 0x73, 0x78, 0x6D,
0x6C, 0x32, 0x2E, 0x58, 0x4D, 0x4C, 0x48, 0x54, 0x54, 0x50, 0x22,
0x29, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x63, 0x61, 0x74,
0x63, 0x68, 0x20, 0x28, 0x65, 0x29, 0x7B, 0x20, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6D, 0x6C, 0x48, 0x74,
0x74, 0x70, 0x3D, 0x6E, 0x65, 0x77, 0x20, 0x41, 0x63, 0x74, 0x69,
116
0x76, 0x65, 0x58, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x28, 0x22,
0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E, 0x58,
0x4D, 0x4C, 0x48, 0x54, 0x54, 0x50, 0x22, 0x29, 0x3B, 0x20, 0x7D,
0x0A, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x72, 0x65, 0x74, 0x75,
0x72, 0x6E, 0x20, 0x78, 0x6D, 0x6C, 0x48, 0x74, 0x74, 0x70, 0x3B,
0x0A, 0x7D, 0x0A, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x63,
0x76, 0x44, 0x61, 0x74, 0x65, 0x3B, 0x0A, 0x20, 0x66, 0x75, 0x6E,
0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x67, 0x65, 0x74, 0x5F, 0x64,
0x61, 0x74, 0x61, 0x28, 0x29, 0x7B, 0x0A, 0x20, 0x76, 0x61, 0x72,
0x20, 0x73, 0x69, 0x6D, 0x70, 0x6C, 0x65, 0x61, 0x6A, 0x61, 0x78,
0x20, 0x3D, 0x20, 0x6E, 0x65, 0x77, 0x20, 0x69, 0x6E, 0x69, 0x74,
0x41, 0x6A, 0x61, 0x78, 0x28, 0x29, 0x3B, 0x0A, 0x20, 0x76, 0x61,
0x72, 0x20, 0x74, 0x65, 0x6D, 0x70, 0x20, 0x3D, 0x20, 0x6E, 0x65,
0x77, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x64, 0x6F, 0x63,
0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22,
0x74, 0x65, 0x6D, 0x70, 0x31, 0x22, 0x29, 0x2C, 0x64, 0x6F, 0x63,
0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22,
0x74, 0x65, 0x6D, 0x70, 0x32, 0x22, 0x29, 0x2C, 0x64, 0x6F, 0x63,
0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22,
0x74, 0x65, 0x6D, 0x70, 0x33, 0x22, 0x29, 0x2C, 0x64, 0x6F, 0x63,
0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22,
0x74, 0x65, 0x6D, 0x70, 0x34, 0x22, 0x29, 0x29, 0x3B, 0x0A, 0x20,
0x76, 0x61, 0x72, 0x20, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x20, 0x3D,
0x20, 0x6E, 0x65, 0x77, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28,
0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65,
0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49,
0x64, 0x28, 0x22, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x31, 0x22, 0x29,
0x2C, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67,
0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79,
0x49, 0x64, 0x28, 0x22, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x32, 0x22,
0x29, 0x2C, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E,
0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42,
0x79, 0x49, 0x64, 0x28, 0x22, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x33,
0x22, 0x29, 0x2C, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74,
117
0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74,
0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x70, 0x75, 0x6C, 0x73, 0x65,
0x34, 0x22, 0x29, 0x29, 0x3B, 0x0A, 0x20, 0x76, 0x61, 0x72, 0x20,
0x73, 0x74, 0x61, 0x74, 0x20, 0x3D, 0x20, 0x6E, 0x65, 0x77, 0x20,
0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x64, 0x6F, 0x63, 0x75, 0x6D,
0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D,
0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x73, 0x74,
0x61, 0x74, 0x31, 0x22, 0x29, 0x2C, 0x64, 0x6F, 0x63, 0x75, 0x6D,
0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D,
0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x73, 0x74,
0x61, 0x74, 0x32, 0x22, 0x29, 0x2C, 0x64, 0x6F, 0x63, 0x75, 0x6D,
0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D,
0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x73, 0x74,
0x61, 0x74, 0x33, 0x22, 0x29, 0x2C, 0x64, 0x6F, 0x63, 0x75, 0x6D,
0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D,
0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x73, 0x74,
0x61, 0x74, 0x34, 0x22, 0x29, 0x29, 0x3B, 0x0A, 0x20, 0x76, 0x61,
0x72, 0x20, 0x76, 0x73, 0x69, 0x67, 0x6E, 0x73, 0x3D, 0x20, 0x6E,
0x65, 0x77, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x29, 0x3B,
0x0A, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x71, 0x44, 0x61,
0x74, 0x65, 0x3D, 0x6E, 0x65, 0x77, 0x20, 0x44, 0x61, 0x74, 0x65,
0x28, 0x29, 0x3B, 0x0A, 0x20, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65,
0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65,
0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x44, 0x61, 0x74, 0x65, 0x22, 0x29, 0x2E,
0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x3D, 0x22,
0x44, 0x61, 0x74, 0x61, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x65, 0x64, 0x20, 0x6F, 0x6E, 0x3A, 0x20, 0x22, 0x2B, 0x72,
0x65, 0x71, 0x44, 0x61, 0x74, 0x65, 0x2E, 0x74, 0x6F, 0x53, 0x74,
0x72, 0x69, 0x6E, 0x67, 0x28, 0x29, 0x3B, 0x0A, 0x20, 0x69, 0x66,
0x28, 0x73, 0x69, 0x6D, 0x70, 0x6C, 0x65, 0x61, 0x6A, 0x61, 0x78,
0x3D, 0x3D, 0x6E, 0x75, 0x6C, 0x6C, 0x29, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x61, 0x6C, 0x65, 0x72, 0x74, 0x28, 0x22, 0x59, 0x6F,
0x75, 0x72, 0x20, 0x62, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0x20,
0x64, 0x6F, 0x65, 0x73, 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x73, 0x75,
0x70, 0x70, 0x6F, 0x72, 0x74, 0x20, 0x41, 0x6A, 0x61, 0x78, 0x22,
0x29, 0x3B, 0x0A, 0x20, 0x73, 0x69, 0x6D, 0x70, 0x6C, 0x65, 0x61,
0x6A, 0x61, 0x78, 0x2E, 0x6F, 0x6E, 0x72, 0x65, 0x61, 0x64, 0x79,
118
0x73, 0x74, 0x61, 0x74, 0x65, 0x63, 0x68, 0x61, 0x6E, 0x67, 0x65,
0x20, 0x3D, 0x20, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E,
0x28, 0x29, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
0x28, 0x73, 0x69, 0x6D, 0x70, 0x6C, 0x65, 0x61, 0x6A, 0x61, 0x78,
0x2E, 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65,
0x20, 0x3D, 0x3D, 0x20, 0x34, 0x29, 0x7B, 0x0A, 0x09, 0x09, 0x20,
0x20, 0x76, 0x61, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x3D, 0x22,
0x3C, 0x68, 0x74, 0x6D, 0x6C, 0x3E, 0x3C, 0x73, 0x74, 0x79, 0x6C,
0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x5C, 0x22, 0x74, 0x65,
0x78, 0x74, 0x2F, 0x63, 0x73, 0x73, 0x5C, 0x22, 0x3E, 0x3C, 0x21,
0x2D, 0x2D, 0x2E, 0x73, 0x74, 0x79, 0x6C, 0x65, 0x31, 0x20, 0x7B,
0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3A, 0x20, 0x23, 0x30, 0x30, 0x30,
0x30, 0x30, 0x30, 0x3B, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x67, 0x72,
0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3A,
0x20, 0x23, 0x66, 0x66, 0x30, 0x30, 0x30, 0x30, 0x3B, 0x7D, 0x2D,
0x2D, 0x3E, 0x3C, 0x2F, 0x73, 0x74, 0x79, 0x6C, 0x65, 0x3E, 0x3C,
0x62, 0x6F, 0x64, 0x79, 0x3E, 0x3C, 0x73, 0x70, 0x61, 0x6E, 0x20,
0x63, 0x6C, 0x61, 0x73, 0x73, 0x3D, 0x5C, 0x22, 0x73, 0x74, 0x79,
0x6C, 0x65, 0x31, 0x5C, 0x22, 0x3E, 0x22, 0x3B, 0x0A, 0x09, 0x09,
0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x74, 0x61, 0x69, 0x6C, 0x3D,
0x22, 0x3C, 0x2F, 0x73, 0x70, 0x61, 0x6E, 0x3E, 0x3C, 0x2F, 0x62,
0x6F, 0x64, 0x79, 0x3E, 0x3C, 0x2F, 0x68, 0x74, 0x6D, 0x6C, 0x3E,
0x22, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6F,
0x6E, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x3D, 0x20, 0x73, 0x69,
0x6D, 0x70, 0x6C, 0x65, 0x61, 0x6A, 0x61, 0x78, 0x2E, 0x72, 0x65,
0x73, 0x70, 0x6F, 0x6E, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, 0x3B,
0x0A, 0x09, 0x09, 0x20, 0x20, 0x69, 0x66, 0x28, 0x73, 0x69, 0x6D,
0x70, 0x6C, 0x65, 0x61, 0x6A, 0x61, 0x78, 0x2E, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x21, 0x3D, 0x32, 0x30, 0x30, 0x29, 0x7B, 0x0A,
0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6F, 0x63,
0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22,
0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x65,
0x22, 0x29, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D,
0x4C, 0x3D, 0x68, 0x65, 0x61, 0x64, 0x2B, 0x22, 0x44, 0x69, 0x73,
0x63, 0x6F, 0x6E, 0x6E, 0x65, 0x63, 0x74, 0x65, 0x64, 0x21, 0x21,
0x21, 0x20, 0x4C, 0x61, 0x73, 0x74, 0x20, 0x52, 0x65, 0x63, 0x65,
119
0x69, 0x76, 0x65, 0x64, 0x20, 0x6F, 0x6E, 0x3A, 0x22, 0x2B, 0x72,
0x65, 0x63, 0x76, 0x44, 0x61, 0x74, 0x65, 0x2B, 0x74, 0x61, 0x69,
0x6C, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6F, 0x63, 0x75, 0x6D,
0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D,
0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x6C, 0x61,
0x74, 0x65, 0x6E, 0x63, 0x79, 0x22, 0x29, 0x2E, 0x69, 0x6E, 0x6E,
0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x3D, 0x20, 0x68, 0x65, 0x61,
0x64, 0x2B, 0x22, 0x4E, 0x6F, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6F,
0x6E, 0x73, 0x65, 0x20, 0x66, 0x72, 0x6F, 0x6D, 0x20, 0x53, 0x65,
0x72, 0x76, 0x65, 0x72, 0x21, 0x22, 0x2B, 0x74, 0x61, 0x69, 0x6C,
0x3B, 0x0A, 0x09, 0x09, 0x09, 0x20, 0x20, 0x66, 0x6F, 0x72, 0x20,
0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3D, 0x30, 0x3B, 0x20, 0x69,
0x3C, 0x34, 0x3B, 0x69, 0x2B, 0x2B, 0x29, 0x7B, 0x0A, 0x09, 0x09,
0x09, 0x09, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x5B, 0x69, 0x5D,
0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x3D,
0x22, 0x4E, 0x2F, 0x41, 0x22, 0x3B, 0x0A, 0x09, 0x09, 0x09, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x65, 0x6D, 0x70, 0x5B, 0x69,
0x5D, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C,
0x3D, 0x22, 0x4E, 0x2F, 0x41, 0x22, 0x3B, 0x0A, 0x09, 0x09, 0x09,
0x09, 0x20, 0x20, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x5B, 0x69, 0x5D,
0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x3D,
0x22, 0x4E, 0x2F, 0x41, 0x22, 0x3B, 0x0A, 0x09, 0x09, 0x09, 0x20,
0x20, 0x7D, 0x0A, 0x09, 0x09, 0x20, 0x20, 0x7D, 0x0A, 0x09, 0x09,
0x20, 0x20, 0x65, 0x6C, 0x73, 0x65, 0x7B, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x72, 0x65, 0x63, 0x76, 0x44, 0x61, 0x74, 0x65, 0x3D, 0x6E, 0x65,
0x77, 0x20, 0x44, 0x61, 0x74, 0x65, 0x28, 0x29, 0x3B, 0x20, 0x20,
0x20, 0x20, 0x0A, 0x09, 0x09, 0x09, 0x20, 0x20, 0x64, 0x6F, 0x63,
0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22,
0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x65,
0x22, 0x29, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D,
0x4C, 0x3D, 0x22, 0x44, 0x61, 0x74, 0x61, 0x20, 0x72, 0x65, 0x63,
0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x6F, 0x6E, 0x3A, 0x20, 0x22,
0x2B, 0x72, 0x65, 0x63, 0x76, 0x44, 0x61, 0x74, 0x65, 0x2E, 0x74,
0x6F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28, 0x29, 0x3B, 0x0A,
0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6F, 0x63,
120
0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22,
0x6C, 0x61, 0x74, 0x65, 0x6E, 0x63, 0x79, 0x22, 0x29, 0x2E, 0x69,
0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x3D, 0x22, 0x44,
0x61, 0x74, 0x61, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x3A, 0x20, 0x22, 0x20, 0x2B,
0x28, 0x72, 0x65, 0x63, 0x76, 0x44, 0x61, 0x74, 0x65, 0x2D, 0x72,
0x65, 0x71, 0x44, 0x61, 0x74, 0x65, 0x29, 0x2B, 0x20, 0x22, 0x20,
0x6D, 0x73, 0x65, 0x63, 0x22, 0x3B, 0x0A, 0x09, 0x09, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x70, 0x65, 0x72,
0x55, 0x6E, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x3D, 0x20, 0x72,
0x65, 0x73, 0x70, 0x6F, 0x6E, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61,
0x2E, 0x73, 0x70, 0x6C, 0x69, 0x74, 0x28, 0x22, 0x7C, 0x22, 0x29,
0x3B, 0x0A, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66,
0x6F, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3D, 0x30, 0x3B,
0x20, 0x69, 0x3C, 0x70, 0x65, 0x72, 0x55, 0x6E, 0x69, 0x74, 0x44,
0x61, 0x74, 0x61, 0x2E, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x3B,
0x69, 0x2B, 0x2B, 0x29, 0x7B, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x76,
0x73, 0x69, 0x67, 0x6E, 0x73, 0x3D, 0x70, 0x65, 0x72, 0x55, 0x6E,
0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x5B, 0x69, 0x5D, 0x2E, 0x73,
0x70, 0x6C, 0x69, 0x74, 0x28, 0x22, 0x2C, 0x22, 0x29, 0x3B, 0x0A,
0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x28, 0x76, 0x73, 0x69, 0x67,
0x6E, 0x73, 0x5B, 0x30, 0x5D, 0x3D, 0x3D, 0x30, 0x29, 0x7B, 0x0A,
0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x74, 0x65, 0x6D,
0x70, 0x5B, 0x69, 0x5D, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48,
0x54, 0x4D, 0x4C, 0x3D, 0x22, 0x4E, 0x2F, 0x41, 0x22, 0x3B, 0x0A,
0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x74, 0x61, 0x74, 0x5B, 0x69,
0x5D, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C,
0x3D, 0x68, 0x65, 0x61, 0x64, 0x2B, 0x22, 0x4F, 0x46, 0x46, 0x22,
0x2B, 0x74, 0x61, 0x69, 0x6C, 0x3B, 0x0A, 0x09, 0x09, 0x09, 0x09,
0x7D, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x65, 0x6C, 0x73, 0x65, 0x7B,
0x0A, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
0x28, 0x76, 0x73, 0x69, 0x67, 0x6E, 0x73, 0x5B, 0x30, 0x5D, 0x3C,
0x33, 0x38, 0x20, 0x26, 0x26, 0x20, 0x76, 0x73, 0x69, 0x67, 0x6E,
0x73, 0x5B, 0x30, 0x5D, 0x3E, 0x3D, 0x33, 0x36, 0x29, 0x0A, 0x09,
0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x74, 0x65, 0x6D, 0x70,
0x5B, 0x69, 0x5D, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54,
0x4D, 0x4C, 0x3D, 0x76, 0x73, 0x69, 0x67, 0x6E, 0x73, 0x5B, 0x30,
121
0x5D, 0x3B, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20,
0x65, 0x6C, 0x73, 0x65, 0x7B, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09,
0x20, 0x20, 0x20, 0x74, 0x65, 0x6D, 0x70, 0x5B, 0x69, 0x5D, 0x2E,
0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x3D, 0x68,
0x65, 0x61, 0x64, 0x2B, 0x76, 0x73, 0x69, 0x67, 0x6E, 0x73, 0x5B,
0x30, 0x5D, 0x2B, 0x74, 0x61, 0x69, 0x6C, 0x3B, 0x0A, 0x09, 0x09,
0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x5B,
0x69, 0x5D, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D,
0x4C, 0x3D, 0x22, 0x4F, 0x4E, 0x22, 0x3B, 0x0A, 0x09, 0x09, 0x09,
0x09, 0x09, 0x7D, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x7D, 0x0A, 0x09,
0x09, 0x09, 0x09, 0x69, 0x66, 0x28, 0x76, 0x73, 0x69, 0x67, 0x6E,
0x73, 0x5B, 0x31, 0x5D, 0x3D, 0x3D, 0x30, 0x29, 0x7B, 0x20, 0x20,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
0x75, 0x6C, 0x73, 0x65, 0x5B, 0x69, 0x5D, 0x2E, 0x69, 0x6E, 0x6E,
0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x3D, 0x22, 0x4E, 0x2F, 0x41,
0x22, 0x3B, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x74, 0x61,
0x74, 0x5B, 0x69, 0x5D, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48,
0x54, 0x4D, 0x4C, 0x3D, 0x68, 0x65, 0x61, 0x64, 0x2B, 0x22, 0x4F,
0x46, 0x46, 0x22, 0x2B, 0x74, 0x61, 0x69, 0x6C, 0x3B, 0x0A, 0x09,
0x09, 0x09, 0x09, 0x7D, 0x0A, 0x09, 0x09, 0x09, 0x20, 0x20, 0x09,
0x65, 0x6C, 0x73, 0x65, 0x7B, 0x0A, 0x09, 0x09, 0x09, 0x20, 0x20,
0x09, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x6C, 0x73, 0x65, 0x5B,
0x69, 0x5D, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D,
0x4C, 0x3D, 0x76, 0x73, 0x69, 0x67, 0x6E, 0x73, 0x5B, 0x31, 0x5D,
0x3B, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x74, 0x61, 0x74,
0x5B, 0x69, 0x5D, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54,
0x4D, 0x4C, 0x3D, 0x22, 0x4F, 0x4E, 0x22, 0x3B, 0x0A, 0x09, 0x09,
0x09, 0x09, 0x7D, 0x0A, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20,
0x7D, 0x0A, 0x09, 0x09, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7D, 0x20, 0x20, 0x20, 0x0A, 0x20, 0x7D, 0x0A, 0x20, 0x76,
0x61, 0x72, 0x20, 0x75, 0x72, 0x6C, 0x3D, 0x22, 0x76, 0x73, 0x69,
0x67, 0x6E, 0x73, 0x2E, 0x68, 0x74, 0x6D, 0x3F, 0x74, 0x73, 0x3D,
0x22, 0x2B, 0x72, 0x65, 0x71, 0x44, 0x61, 0x74, 0x65, 0x3B, 0x0A,
0x20, 0x73, 0x69, 0x6D, 0x70, 0x6C, 0x65, 0x61, 0x6A, 0x61, 0x78,
0x2E, 0x6F, 0x70, 0x65, 0x6E, 0x28, 0x22, 0x47, 0x45, 0x54, 0x22,
0x2C, 0x75, 0x72, 0x6C, 0x2C, 0x74, 0x72, 0x75, 0x65, 0x29, 0x3B,
0x0A, 0x20, 0x73, 0x69, 0x6D, 0x70, 0x6C, 0x65, 0x61, 0x6A, 0x61,
122
0x78, 0x2E, 0x73, 0x65, 0x6E, 0x64, 0x28, 0x6E, 0x75, 0x6C, 0x6C,
0x29, 0x3B, 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69,
0x6F, 0x6E, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x43,
0x75, 0x72, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6D, 0x65, 0x28,
0x29, 0x7B, 0x0A, 0x09, 0x76, 0x61, 0x72, 0x20, 0x73, 0x74, 0x61,
0x74, 0x3D, 0x6E, 0x65, 0x77, 0x20, 0x44, 0x61, 0x74, 0x65, 0x28,
0x29, 0x2E, 0x74, 0x6F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28,
0x29, 0x3B, 0x0A, 0x09, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E,
0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E,
0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x22, 0x29, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48,
0x54, 0x4D, 0x4C, 0x3D, 0x22, 0x54, 0x6F, 0x64, 0x61, 0x79, 0x20,
0x69, 0x73, 0x3A, 0x20, 0x22, 0x2B, 0x20, 0x73, 0x74, 0x61, 0x74,
0x3B, 0x0A, 0x7D, 0x0A
};
prog_uchar sty_css[]={
0x62, 0x6F, 0x64, 0x79, 0x7B, 0x0A, 0x09, 0x62, 0x61, 0x63, 0x6B,
0x67, 0x72, 0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x70, 0x6F, 0x73, 0x69,
0x74, 0x69, 0x6F, 0x6E, 0x3A, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x65,
0x72, 0x3B, 0x0A, 0x09, 0x6D, 0x61, 0x72, 0x67, 0x69, 0x6E, 0x2D,
0x6C, 0x65, 0x66, 0x74, 0x3A, 0x20, 0x32, 0x30, 0x25, 0x3B, 0x0A,
0x09, 0x6D, 0x61, 0x72, 0x67, 0x69, 0x6E, 0x2D, 0x72, 0x69, 0x67,
0x68, 0x74, 0x3A, 0x20, 0x32, 0x30, 0x25, 0x3B, 0x0A, 0x09, 0x62,
0x61, 0x63, 0x6B, 0x67, 0x72, 0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x72,
0x65, 0x70, 0x65, 0x61, 0x74, 0x3A, 0x20, 0x6E, 0x6F, 0x2D, 0x72,
0x65, 0x70, 0x65, 0x61, 0x74, 0x3B, 0x0A, 0x09, 0x62, 0x61, 0x63,
0x6B, 0x67, 0x72, 0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x63, 0x6F, 0x6C,
0x6F, 0x72, 0x3A, 0x20, 0x23, 0x30, 0x30, 0x33, 0x33, 0x30, 0x30,
0x3B, 0x0A, 0x7D, 0x0A, 0x2E, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
0x20, 0x7B, 0x0A, 0x09, 0x66, 0x6F, 0x6E, 0x74, 0x2D, 0x73, 0x69,
0x7A, 0x65, 0x3A, 0x20, 0x33, 0x36, 0x70, 0x78, 0x3B, 0x0A, 0x09,
0x66, 0x6F, 0x6E, 0x74, 0x2D, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74,
0x3A, 0x20, 0x62, 0x6F, 0x6C, 0x64, 0x65, 0x72, 0x3B, 0x0A, 0x09,
0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3A, 0x20, 0x23, 0x42, 0x37, 0x42,
0x30, 0x46, 0x46, 0x3B, 0x0A, 0x09, 0x62, 0x61, 0x63, 0x6B, 0x67,
0x72, 0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x63, 0x6F, 0x6C, 0x6F, 0x72,
0x3A, 0x20, 0x23, 0x30, 0x30, 0x35, 0x45, 0x30, 0x30, 0x3B, 0x0A,
123
0x09, 0x62, 0x61, 0x63, 0x6B, 0x67, 0x72, 0x6F, 0x75, 0x6E, 0x64,
0x2D, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x3A, 0x20,
0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x20, 0x63, 0x65, 0x6E, 0x74,
0x65, 0x72, 0x3B, 0x0A, 0x09, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74,
0x3A, 0x20, 0x31, 0x30, 0x25, 0x3B, 0x0A, 0x09, 0x77, 0x69, 0x64,
0x74, 0x68, 0x3A, 0x20, 0x36, 0x30, 0x25, 0x3B, 0x0A, 0x09, 0x74,
0x65, 0x78, 0x74, 0x2D, 0x61, 0x6C, 0x69, 0x67, 0x6E, 0x3A, 0x20,
0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x3B, 0x0A, 0x09, 0x76, 0x65,
0x72, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x2D, 0x61, 0x6C, 0x69, 0x67,
0x6E, 0x3A, 0x20, 0x6D, 0x69, 0x64, 0x64, 0x6C, 0x65, 0x3B, 0x0A,
0x09, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x3A, 0x20,
0x72, 0x65, 0x6C, 0x61, 0x74, 0x69, 0x76, 0x65, 0x3B, 0x0A, 0x7D,
0x0A, 0x2E, 0x63, 0x6F, 0x6E, 0x74, 0x65, 0x6E, 0x74, 0x20, 0x7B,
0x0A, 0x09, 0x62, 0x61, 0x63, 0x6B, 0x67, 0x72, 0x6F, 0x75, 0x6E,
0x64, 0x2D, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3A, 0x20, 0x23, 0x43,
0x43, 0x43, 0x43, 0x46, 0x46, 0x3B, 0x0A, 0x09, 0x62, 0x61, 0x63,
0x6B, 0x67, 0x72, 0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x70, 0x6F, 0x73,
0x69, 0x74, 0x69, 0x6F, 0x6E, 0x3A, 0x20, 0x63, 0x65, 0x6E, 0x74,
0x65, 0x72, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x3B, 0x0A,
0x09, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3A, 0x20, 0x61, 0x75,
0x74, 0x6F, 0x3B, 0x0A, 0x09, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3A,
0x20, 0x36, 0x30, 0x25, 0x3B, 0x0A, 0x09, 0x74, 0x65, 0x78, 0x74,
0x2D, 0x61, 0x6C, 0x69, 0x67, 0x6E, 0x3A, 0x20, 0x63, 0x65, 0x6E,
0x74, 0x65, 0x72, 0x3B, 0x0A, 0x09, 0x76, 0x65, 0x72, 0x74, 0x69,
0x63, 0x61, 0x6C, 0x2D, 0x61, 0x6C, 0x69, 0x67, 0x6E, 0x3A, 0x20,
0x6D, 0x69, 0x64, 0x64, 0x6C, 0x65, 0x3B, 0x0A, 0x09, 0x70, 0x6F,
0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x3A, 0x20, 0x72, 0x65, 0x6C,
0x61, 0x74, 0x69, 0x76, 0x65, 0x3B, 0x0A, 0x7D, 0x0A, 0x2E, 0x6C,
0x62, 0x6C, 0x7B, 0x0A, 0x09, 0x62, 0x61, 0x63, 0x6B, 0x67, 0x72,
0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3A,
0x20, 0x23, 0x41, 0x34, 0x44, 0x30, 0x41, 0x37, 0x3B, 0x20, 0x20,
0x20, 0x20, 0x0A, 0x7D, 0x0A, 0x2E, 0x66, 0x6F, 0x6F, 0x74, 0x65,
0x72, 0x20, 0x7B, 0x0A, 0x09, 0x62, 0x61, 0x63, 0x6B, 0x67, 0x72,
0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x69,
0x6F, 0x6E, 0x3A, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x20,
0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x3B, 0x0A, 0x09, 0x68, 0x65,
0x69, 0x67, 0x68, 0x74, 0x3A, 0x20, 0x31, 0x30, 0x25, 0x3B, 0x0A,
0x09, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3A, 0x20, 0x36, 0x30, 0x25,
124
0x3B, 0x0A, 0x09, 0x74, 0x65, 0x78, 0x74, 0x2D, 0x61, 0x6C, 0x69,
0x67, 0x6E, 0x3A, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x3B,
0x0A, 0x09, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x2D,
0x61, 0x6C, 0x69, 0x67, 0x6E, 0x3A, 0x20, 0x6D, 0x69, 0x64, 0x64,
0x6C, 0x65, 0x3B, 0x0A, 0x09, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x69,
0x6F, 0x6E, 0x3A, 0x20, 0x72, 0x65, 0x6C, 0x61, 0x74, 0x69, 0x76,
0x65, 0x3B, 0x0A, 0x09, 0x66, 0x6F, 0x6E, 0x74, 0x2D, 0x66, 0x61,
0x6D, 0x69, 0x6C, 0x79, 0x3A, 0x20, 0x22, 0x54, 0x69, 0x6D, 0x65,
0x73, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x52, 0x6F, 0x6D, 0x61, 0x6E,
0x22, 0x2C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x73, 0x2C, 0x20, 0x73,
0x65, 0x72, 0x69, 0x66, 0x3B, 0x0A, 0x09, 0x66, 0x6F, 0x6E, 0x74,
0x2D, 0x73, 0x69, 0x7A, 0x65, 0x3A, 0x20, 0x31, 0x32, 0x70, 0x78,
0x3B, 0x0A, 0x09, 0x66, 0x6F, 0x6E, 0x74, 0x2D, 0x73, 0x74, 0x79,
0x6C, 0x65, 0x3A, 0x20, 0x6E, 0x6F, 0x72, 0x6D, 0x61, 0x6C, 0x3B,
0x0A, 0x09, 0x6C, 0x69, 0x6E, 0x65, 0x2D, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x3A, 0x20, 0x6E, 0x6F, 0x72, 0x6D, 0x61, 0x6C, 0x3B,
0x0A, 0x09, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3A, 0x20, 0x23, 0x39,
0x39, 0x46, 0x46, 0x43, 0x43, 0x3B, 0x0A, 0x7D, 0x0A, 0x2E, 0x44,
0x41, 0x44, 0x75, 0x6E, 0x69, 0x74, 0x20, 0x7B, 0x0A, 0x09, 0x66,
0x6F, 0x6E, 0x74, 0x2D, 0x73, 0x69, 0x7A, 0x65, 0x3A, 0x20, 0x31,
0x34, 0x70, 0x78, 0x3B, 0x0A, 0x09, 0x68, 0x65, 0x69, 0x67, 0x68,
0x74, 0x3A, 0x20, 0x61, 0x75, 0x74, 0x6F, 0x3B, 0x0A, 0x09, 0x66,
0x6C, 0x6F, 0x61, 0x74, 0x3A, 0x20, 0x6E, 0x6F, 0x6E, 0x65, 0x3B,
0x0A, 0x09, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3A, 0x20, 0x61, 0x75,
0x74, 0x6F, 0x3B, 0x0A, 0x09, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x69,
0x6F, 0x6E, 0x3A, 0x20, 0x72, 0x65, 0x6C, 0x61, 0x74, 0x69, 0x76,
0x65, 0x3B, 0x0A, 0x09, 0x66, 0x6F, 0x6E, 0x74, 0x2D, 0x77, 0x65,
0x69, 0x67, 0x68, 0x74, 0x3A, 0x20, 0x62, 0x6F, 0x6C, 0x64, 0x3B,
0x0A, 0x09, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3A, 0x20, 0x23, 0x30,
0x30, 0x36, 0x36, 0x33, 0x33, 0x3B, 0x0A, 0x09, 0x62, 0x61, 0x63,
0x6B, 0x67, 0x72, 0x6F, 0x75, 0x6E, 0x64, 0x2D, 0x63, 0x6F, 0x6C,
0x6F, 0x72, 0x3A, 0x20, 0x23, 0x30, 0x31, 0x41, 0x36, 0x42, 0x38,
0x3B, 0x0A, 0x09, 0x74, 0x65, 0x78, 0x74, 0x2D, 0x61, 0x6C, 0x69,
0x67, 0x6E, 0x3A, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x3B,
0x0A, 0x09, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x2D,
0x61, 0x6C, 0x69, 0x67, 0x6E, 0x3A, 0x20, 0x6D, 0x69, 0x64, 0x64,
0x6C, 0x65, 0x3B, 0x0A, 0x7D
};
125
//SPI.h
//AVR Mega32 SPI ---ported from atmega128
//This is part of the wiznet driver v1.4
//defining the port and registers
//to be used for SPI communication
//between w5100 and MCU
#define SPI0_WaitForReceive()
126
//---------------------------------------------------------------------
//---------------------------------------------------------------------
//IInChip SPI HAL
#define IINCHIP_SpiInit SPI0_Init
#define IINCHIP_SpiSendData SPI0_SendByte
#define IINCHIP_SpiRecvData SPI0_RxData
if((fp=fopen(filename,"r"))==NULL){
printf("\n error");
return 0;
}
printf(filename);
printf(" converted to ");
for(i=0;filename[i];i++){
if(filename[i]=='.')
filename[i]='_';
}
printf(filename);
printf("\n");
sprintf(openning,"prog_uchar %s[]={",filename); //array
declaration
fputs(openning,out);
fputs("\n ",out);
ch=fgetc(fp);
i=0;
while((chnxt=fgetc(fp))!=EOF){
if(i>=11){i=0; fputs("\n ",out);};
fprintf(out,"0x%02X, ",ch); //print each character as hex
number
i++;
ch=chnxt;
}
fprintf(out,"0x%02X ",ch);
fputs("\n\n",out);
fputs(closing,out);
fclose(fp);
}
fclose(lst);
fclose(out);
system("pause");
return 0;
}
129
<!--index.htm-->
<!--Default web page of the project-->
<!--after the page is loaded, data is requested
<!--every 5 second by the function get_data()-->
<!--defined in the ajax.js script-->
<html>
<head>
<title>EBWVSM</title>
<link href="sty.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="ajax.js"></script>
<body onLoad='get_data(); setInterval("get_data();", 5000);
setInterval("displayCurDateTime();", 1000);'>
<table align= "center" width="100%" border="1" cellspacing="5"
cellpadding="1">
<tr>
<td colspan=8 align= "center" class="header" >
Ethernet-Based Wireless Vital Signs Monitor
</td>
</tr>
<tr>
<td colspan=8 ID="status" class="lbl"></td>
</tr>
<tr>
<tr>
<td colspan=2 align= "center" class="DADunit" >
VS UNIT 1
</td>
<td colspan=2 align= "center" class="DADunit" >
VS UNIT 2
</td>
<td colspan=2 align= "center" class="DADunit" >
VS UNIT 3
</td>
<td colspan=2 align= "center" class="DADunit" >
VS UNIT 4
</td>
</tr>
130
<tr class="lbl">
<td width="20%" >Temperature(deg.C)</td>
<td width="5%" id="temp1"></td>
<td width="20%" >Temperature(deg.C):</td>
<td width="5%" id="temp2"></td>
<td width="20%" >Temperature(deg.C):</td>
<td width="5%" id="temp3"></td>
<td width="20%" >Temperature(deg.C):</td>
<td width="5%" id="temp4"></td>
</tr>
<tr class="lbl">
<td >Pulse Rate(BPM):</td>
<td id="pulse1"></td>
<td >Pulse Rate(BPM):</td>
<td id="pulse2"></td>
<td >Pulse Rate(BPM):</td>
<td id="pulse3"></td>
<td >Pulse Rate(BPM):</td>
<td id="pulse4"></td>
</tr>
<tr class="lbl">
<td >Unit Status:</td>
<td id="stat1"></td>
<td >Unit Status:</td>
<td id="stat2"></td>
<td >Unit Status:</td>
<td id="stat3"></td>
<td >Unit Status:</td>
<td id="stat4"></td>
</tr>
<tr class="lbl">
<td colspan=8 id="receiveDate"> </td>
</tr>
<tr class="lbl">
<td colspan=6 id="requestDate"> </td>
<td colspan=2 id="latency"> </td>
</tr>
<tr>
131
//ajax.js
//contains functions and statements
//that handle the ajax initialization,
//http request,
//receiving of response from server,
//date and time display,
//data display and format,
//and connection status display
function initAjax(){
var xmlHttp=null;
try{
xmlHttp=new XMLHttpRequest();
}catch (e){
try {
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }
}
return xmlHttp;
}
var recvDate;
function get_data(){
var simpleajax = new initAjax();
var temp = new
Array(document.getElementById("temp1"),document.getElementById("temp2")
,document.getElementById("temp3"),document.getElementById("temp4"));
var pulse = new Array(document.getElementById("pulse1"),
document.getElementById("pulse2"),
document.getElementById("pulse3"),
document.getElementById("pulse4"));
var stat = new Array(document.getElementById("stat1"),
document.getElementById("stat2"),
document.getElementById("stat3"),
document.getElementById("stat4"));
133
document.getElementById("receiveDate").innerHTML=head+"Disconnected!!!
Last Received on:"+recvDate+tail;
document.getElementById("latency").innerHTML= head+"No
response from Server!"+tail;
for (var i=0; i<4;i++){
stat[i].innerHTML="N/A";
temp[i].innerHTML="N/A";
pulse[i].innerHTML="N/A";
}
}
else{
recvDate=new Date();
}
else{
if(vsigns[0]<38 && vsigns[0]>=36)
temp[i].innerHTML=vsigns[0];
else{
temp[i].innerHTML=head+vsigns[0]+tail;
stat[i].innerHTML="ON";
}
}
if(vsigns[1]==0){
pulse[i].innerHTML="N/A";
stat[i].innerHTML=head+"OFF"+tail;
}
else{
pulse[i].innerHTML=vsigns[1];
stat[i].innerHTML="ON";
}
}
}
}
}
var url="vsigns.htm?ts="+reqDate;
simpleajax.open("GET",url,true);
simpleajax.send(null);
}
function displayCurDateTime(){
var stat=new Date().toString();
document.getElementById("status").innerHTML="Today is: "+ stat;
}
<!-- sty.css-->
body{
background-position: center;
margin-left: 20%;
margin-right: 20%;
background-repeat: no-repeat;
135
background-color: #003300;
.header {
font-size: 36px;
font-weight: bolder;
color: #B7B0FF;
background-color: #005E00;
height: 10%;
width: 60%;
text-align: center;
vertical-align: middle;
position: relative;
.content {
background-color: #CCCCFF;
height: auto;
width: 60%;
text-align: center;
vertical-align: middle;
position: relative;
.lbl{
background-color: #A4D0A7;
.footer {
height: 10%;
width: 60%;
text-align: center;
vertical-align: middle;
position: relative;
font-size: 12px;
font-style: normal;
line-height: normal;
color: #99FFCC;
.DADunit {
font-size: 14px;
height: auto;
float: none;
width: auto;
position: relative;
font-weight: bold;
color: #006633;
background-color: #01A6B8;
text-align: center;
vertical-align: middle;
}
137
/**********************************************************************
*
* File Name: BLUETOOTH_HOST.C
* Test configuration:
*
* MCU: PIC16F877A
* Oscillator: HS, 08.0000 MHz
*
* NOTES:
*
* MiKro C code for the bluetooth host for the special project entitled
*
* ETHERNET-BASED WIRELESS VITAL SIGNS MONITOR
*
*********************************************************************/
// USER DEFINES
// CONSTANT VARIABLES
// GLOBAL VARIABLES
// FUNCTION PROTOTYES
/**********************************************************************
* MAIN FUNCTION DEFINITION
**********************************************************************/
void main()
{
/**********************************************************************
* INTERRUPT SERVICE ROUTINE FUNCTION DEFINITION
**********************************************************************/
void interrupt()
{
{
update_time(); //update tme and transmit
}
/**********************************************************************
* IDENTIFY AND BUFFER FUNCTION DEFINITION
**********************************************************************/
void identify_and_buffer()
{
unsigned short i = 0;
/*********************************************************************
* UPDATE TIME FUNCTION DEFINITION
**********************************************************************/
void update_time()
{
}
}
/**********************************************************************
* TRANSMIT DATA FUNCTION DEFINITION
*********************************************************************/
void transmit_data()
{
unsigned short i = 0;
}
142
/**********************************************************************
*
* File Name: DATA_ACQUISITION_DEVICE.C
* Test configuration:
*
* MCU: PIC16F887A
* Oscillator: XT, 04.0000 MHz
*
* NOTES:
*
* MiKro C code for the data acquisition device for the special project entitled
*
* ETHERNET-BASED WIRELESS VITAL SIGNS MONITOR
*
**********************************************************************/
//USER DEFINES
#define done 0
#define start 1
#define conversion PIR1.ADIF
#define Not_Done !PIR1.ADIF
#define ADC_Start ADCON0.GO
#define convert_ADC_to_temp ((adcResult * 148.00)/ 458.80) + 2
//CONSTANT VARIABLES
//GLOBAL VARIBLES
unsigned adcResult = 0;
char pulseData = 0;
char tempData = 0;
// FUNCTION PROTOTYPES
void adc_start(void);
143
/**********************************************************************
* MAIN FUNCTION DEFINITION
**********************************************************************/
void main()
{
TRISA = 0x01; // set RA0 as input
TXSTA = 0x24; // TXEN(TXSTA[5]) = 1 and BRGH(TXSTA[2]) = 1
RCSTA = 0x90; // SPEN(RCSTA[7]) = 1 and CREN(RCSTA[4]) =1
SPBRG = 0x19; // baud rate set to 9600 with FOsc = 4MHz
INTCON = 0x60; // enable interrupts
PIE1 = 0x71; // enable receive complete interrupt
ADCON0 = 0x81; // FOsc/32 and A/D module is powered on
ADCON1 = 0x8E; // Right justfied, Vref+ = Vdd, Vref- = Vss
TRISB = 0x00; // configure PORTB as output
PORTB.F1 = 1; // set RB1
while(1)
{
};
/********************************************************************** *
*A/D Conversion Routine
**********************************************************************/
void adc_start()
{
}
Appendix C
TECHNICAL SPECIFICATIONS/MANUALS
EGBC-04 Manual
EMPLOYMENT HISTORY:
On-the-job Training: Lexmark
k Research and Development Corporation (LRDC)
Cebu Business Park, Cebu City, Cebu
March 24 – June 24 2008
EDUCATIONAL ATTAINMENT:
Elementary: Sgt. Miguel P. Canoy Memorial Central School,, Buru-un,
Buru Iligan City
Secondary: Mindanao State University – Iligan Institute
itute of Technology, Integrated
Developmental School, Tibanga, Iligan City
Tertiary: Mindanao State University – Iligan Institute of Technology, Bachelor of
Science in Electronics and Communications Engineering,
Engineering Andres
Bonifacio Avenue, Tibanga, Iligan City
ORGANIZATIONS
2004 – 2009 Junior Institute of Electronics and Communications Engineers of the
Philippines - Northern Mindanao Sector (JIECEP - NMS)
2000 – 2009 Mindanao State University – Iligan Institute of Technology
Kataastaasang Samahan ng mga Mag-aaral
aaral (KASAMA)
179
CURRICULUM VITAE
EMPLOYMENT HISTORY:
On-the-job Training: Cebu Mitsumi Incorporated
Sabang, Danao City, Cebu
April 14 – May 31 2008
EDUCATIONAL ATTAINMENT:
Elementary: Lobogon Elementary School, Aloran, Misamis Occidental
Secondary: Aloran Trade High School (ATHS), Aloran, Misamis Occidental
Tertiary: Mindanao State University – Iligan Institute of Technology, Bachelor of
Science in Computer Engineering, Andres Bonifacio Avenue, Tibanga,
Iligan City
ORGANIZATIONS
2004 – 2009 Mindanao State University – Iligan Institute of Technology
Department of Science and Technology Scholar’s Association (MIDSA)
2004 – 2009 Mindanao State University – Iligan Institute of Technology
Kataastaasang Samahan ng mga Mag-aaral (KASAMA)
180
CURRICULUM VITAE
EMPLOYMENT HISTORY:
On-the-job Training: GLOBAL Steel Incorporated
Suarez, Iligan City
April - May 2008
EDUCATIONAL ATTAINMENT:
Elementary: St. Michael’s College, Tibanga, Iligan City
Secondary: Mindanao State University – Iligan Institute
itute of Technology, Integrated
Developmental School, Tibanga, Iligan City
Tertiary: Mindanao State University – Iligan Institute of Technology, Bachelor of
Science in Electronics and Communications Engineering,
Engineering Andres
Bonifacio Avenue, Tibanga, Iligan City
ORGANIZATIONS
2004 – 2009 Junior Institute of Electronics and Communications Engineers of the
Philippines - Northern Mindanao Sector (JIECEP - NMS)
2000 – 2009 Mindanao State University – Iligan Institute of Technology
Kataastaasang Samahan ng mga Mag-aaral
aaral (KASAMA)