Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
When your heart beats, it pumps blood round your body to give it the energy and oxygen it
needs. As the blood moves, it pushes against the sides of the blood vessels. The strength of this
pushing is your blood pressure. If your blood pressure is too high, it puts extra strain on your
arteries (and your heart) and this may lead to heart attacks and strokes.
Blood pressure is typically recorded as two numbers, written as a ratio like this:
Systolic
The top number, which is also the higher of the two numbers, measures the pressure in the
arteries
when
the
heart
beats
(when
the
heart
muscle
contracts).
Diastolic
The bottom number, which is also the lower of the two numbers, measures the pressure in the
arteries between heartbeats (when the heart muscle is resting between beats and refilling with
blood).
his chart reflects blood pressure categories defined by the American Heart Association.
Blood
Pressure Systolic
Diastolic
Category
mm Hg (upper #)
Normal
and
less than 80
Prehypertension
120 139
or
80 89
140 159
or
90 99
160 or higher
or
100 or higher
or
High
Blood
Pressure
(Hypertension) Stage 1
High
Blood
Pressure
(Hypertension) Stage 2
Hypertensive
Crisis
mm Hg (lower #)
than
120/80
mm
Hg.
Your blood pressure rises with each heartbeat and falls when your heart relaxes between beats.
While BP can change from minute to minute with changes in posture, exercise, stress or sleep, it
should normally be less than 120/80 mm Hg (less than 120 systolic AND less than 80 diastolic)
for an adult age 20 or over. About one in three U.S. adults has high blood pressure.
.
A single high reading does not necessarily mean that you have high blood pressure. However, if
readings stay at 140/90 mm Hg or above (systolic 140 or above OR diastolic 90 or above) over
time, your doctor will likely want you to begin a treatment program. Such a program almost
always includes lifestyle changes and often prescription medication for those with readings of
140/90 or higher.
If, while monitoring your blood pressure, you get a systolic reading of 180 mm Hg or higher OR
a diastolic reading of 110 mm HG or higher, wait a couple of minutes and take it again. If the
reading is still at or above that level, you should seek immediate emergency medical treatment
for a hypertensive crisis. If you can't access the emergency medical services (EMS), have
someone drive you to the hospital right away.
Even if your blood pressure is normal, you should consider making lifestyle modifications
to prevent the development of HBP and improve your heart health.
Which number is more important, top (systolic) or bottom (diastolic)?
Typically more attention is given to the top number (the systolic blood pressure) as a major risk
factor for cardiovascular disease for people over 50 years old. In most people, systolic blood
pressure rises steadily with age due to increasing stiffness of large arteries, long-term build-up of
plaque, and increased incidence of cardiac and vascular disease.
Pulse oximeter
Pulse oximetry is a simple, relatively cheap and non-invasive technique to monitor oxygenation.
It monitors the percentage of haemoglobin that is oxygen-saturated. Oxygen saturation should
always be above 95%, although in those with long-standing respiratory disease or cyanotic
congenital heart disease, it may be lower, corresponding to disease severity. The oxyhaemoglobin
dissociation curve becomes sharply steep below about 90%, reflecting the more rapid
desaturation that occurs with diminishing oxygen partial pressure (PaO 2).On most machines the
default low oxygen saturation alarm setting is 90%.
Pulse oximetry does not provide information on the oxygen content of the blood nor ventilation
and thus care is needed in the presence of anaemia and in patients developing respiratory failure
due to carbon dioxide retention, for example.
Principles of pulse oximetry
Oximeters work by the principles of spectrophotometry: the relative absorption of red (absorbed
by deoxygenated blood) and infrared (absorbed by oxygenated blood) light of the systolic
component of the absorption waveform correlates to arterial blood oxygen saturations.
Measurements of relative light absorption are made multiple times every second and these are
processed by the machine to give a new reading every 0.5-1 second that averages out the
readings over the last three seconds.
Two light-emitting diodes, red and infrared, are positioned so that they are opposite their
respective detectors through 5-10 mm of tissue. Probes are usually positioned on the fingertip,
although earlobes and forehead are sometimes used as alternatives. One study has suggested that
the ear lobe is not a reliable site to measure oxygen saturations.Probes tend to use 'wrap' or 'clip'
style sensors.
Uses
Central cyanosis, the traditional clinical sign of hypoxaemia, is an insensitive marker occurring
only at 75-80% saturation. Consequently, pulse oximetry has a wide range of applications
including:
Pulse oximetry can replace blood gas analysis in many clinical situations unless PaCO 2or
acid-base state is needed. It is cheaper, easier to perform, less painful and can be more
accurate where the patient is conscious (hyperventilation at the prospect of pain raises
PaO2).
Pulse oximetry allows accurate use of O 2 and avoids wastage. For example, in patients
with respiratory failure, rather than limit the use of O2 to maintain hypoxic ventilatory drive,
it can be adjusted to a saturation of ~90% which is clinically acceptable.
Neonatal care - the safety limits for oxygen saturations are higher and narrower (95-97%)
compared to those for adults. Pulse oximetry is not yet a standard of care in the screening of
neonates for asymptomatic congenital heart disease but may become so. It appears to be
significantly more reliable than clinical methods alone, as shown by recent studies.
Intrapartum fetal monitoring - there has been some interest in the use of fetal pulse
oximetry in combination with routine cardiotocography (CTG) monitoring, although its use
does not reduce the operative delivery rate.
Using an oximeter
Poor perfusion (due to cold or hypotension) is the main cause of an inadequate pulse
wave. A sharp waveform with a dicrotic notch indicates good perfusion whilst a sine wavelike waveform suggests poor perfusion.
If a finger probe is used, the hand should be rested on the chest at the level of the heart
rather than the affixed digit held in the air (as patients commonly do) in order to minimise
motion artefact.
Checking that the displayed heart rate correlates to a manually checked heart rate (within
5 beats per minute) generally rules out significant motion artefact.
Emitters and detectors must oppose one another and light should not reach the detector
except through the tissue. Ensure the digit is inserted fully into the probe and that flexible
probes are attached correctly. Appropriately sized probes should be used for children and
infants.
Oximeter accuracy should be checked by obtaining at least one simultaneous blood gas,
although this rarely happens. Oximeters may correct average oximeter bias based on pooled
data but this does not eliminate the possibility of larger individual biases.
Sources of error
Handset
HLR/
VLR
UM
A-bis
BSC
MSC
SS7
PSTN
BTS
X.25
OMC
(Operation & Maintenance
Center)
Operation
Terminal
SIM
card
Mobile
station
Radio
sub-system
Network sub-system
Data Terminal
PSTN
4.615 ms), which forms the basic unit for the definition of logical channels. One physical
channel is one burst period per TDMA frame.
Channels are defined by the number and position of their corresponding burst periods. All
these definitions are cyclic, and the entire pattern repeats approximately every 3 hours. Channels
can be divided into dedicated channels, which are allocated to a mobile station, and common
channels, which are used by mobile stations in idle mode.
Traffic Channels:
A traffic channel (TCH) is used to carry speech and data traffic. Traffic channels are
defined using a 26-frame multiframe, or group of 26 TDMA frames. The length of a 26-frame
multi frame is 120 ms, which is how the length of a burst period is defined (120 ms divided by
26 frames divided by 8 burst periods per frame). Out of the 26 frames, 24 are used for traffic, 1 is
used for the Slow Associated Control Channel (SACCH) and 1 is currently unused.
In addition to these full-rate TCHs, there are also half-rate TCHs defined, although they
are not yet implemented. Half-rate TCHs will effectively double the capacity of a system once
half-rate speech coders are specified (i.e., speech coding at around 7 kbps, instead of 13 kbps).
Eighth-rate TCHs are also specified, and are used for signalling. In the recommendations, they
are called Stand-alone Dedicated Control Channels (SDCCH).
Control Channels:
Common channels can be accessed both by idle mode and dedicated mode mobiles. The
common channels are used by idle mode mobiles to exchange the signalling information required
to change to dedicated mode. Mobiles already in dedicated mode monitor the surrounding base
stations for handover and other information. The common channels are defined within a 51frame multiframe, so that dedicated mobiles using the 26-frame multiframe TCH structure can
still monitor control channels.
The common channels include:
Broadcast Control Channel (BCCH):
Continually broadcasts, on the downlink, information including base station: identity,
frequency allocations, and frequency-hopping sequences.
Frequency Correction Channel (FCCH) and Synchronisation Channel (SCH):
Used to synchronise the mobile to the time slot structure of a cell by defining the
boundaries of burst periods, and the time slot numbering. Every cell in a GSM network
broadcasts exactly one FCCH and one SCH, which are by definition on time slot number 0
(within a TDMA frame).
Random Access Channel (RACH):
Slotted Aloha channel used by the mobile to request access to the network.
Access Grant Channel (AGCH):
Used to allocate an SDCCH to a mobile for signalling (in order to obtain a dedicated
channel), following a request on the RACH.
Power Control:
There are five classes of mobile stations defined, according to their peak transmitter
power, rated at 20, 8, 5, 2, and 0.8 watts. To minimize co-channel interference and to conserve
power, both the mobiles and the Base Transceiver Stations operate at the lowest power level that
will maintain an acceptable signal quality. Power levels can be stepped up or down in steps of 2
dB from the peak power for the class down to a minimum of 13 dBm (20 milliwatts).
The mobile station measures the signal strength or signal quality (based on the Bit Error
Ratio), and passes the information to the Base Station Controller, which ultimately decides if and
when the power level should be changed. Power control should be handled carefully, since there
is the possibility of instability. This arises from having mobiles in co-channel cells alternatingly
increase their power in response to increased co-channel.
Network Aspects:
Ensuring the transmission of voice or data of a given quality over the radio link is only
part of the function of a cellular mobile network. A GSM mobile can seamlessly roam nationally
and internationally, which requires that registration, authentication, call routing and location
updating functions exist and are standardized in GSM networks. In addition, the fact that the
geographical area covered by the network is divided into cells necessitates the implementation of
a handover mechanism. These functions are performed by the Network Subsystem, mainly using
the Mobile Application Part (MAP) built on top of the Signalling System No. 7 protocol.
Authentication
Assignment of TMSI
Call selection
Handover
Introduction of encryption
GSM
Protocol
Stacks:
FIG.4.5: GSM PROTOCOL STACKS
Layer 3: Contains the following sub layers which control signalling channel functions
(BCH, CCCH and DCCH).
GSM Radio Interface:
GSM Radio interface uses the base FDMA+TDMA technologies along with an optional
Slow Frequency Hopping. The specs are the specifications are mentioned below.
8 channels/carrier
GSM Modem:
Our GSM modem is one of the most exciting and innovative electronic products ever
developed. With it you can stay in contact with your office, your home, emergency services, and
others, wherever service is provided.
General:
Our modem utilizes the GSM standard for cellular technology. GSM is a newer radio
frequency (RF) technology than the current FM technology that has been used for radio
communications for decades. The GSM standard has been established for use in the European
community and elsewhere. Your modem is actually a low power radio transmitter and receiver. It
sends out and receives radio frequency energy. When you use your modem, the cellular system
handling your calls controls both the radio frequency and the power level of your cellular
modem.
antenna. Otherwise, have your antenna repaired by a qualified technician. Use only the supplied
or approved antenna. Unauthorized antennas, modifications or attachments could damage the
modem and may contravene local RF emission regulations or invalidate type approval.
Driving:
Check the laws and regulations on the use of cellular devices in the area where you drive.
Always obey them. Also, when using your modem while driving, please: give full attention to
driving, pull off the road and park before making or answering a call if driving conditions so
allow. When applications are prepared for mobile use they should fulfil road-safety instructions
of the current law!
Electronic Devices:
Most electronic equipment, for example in hospitals and motor vehicles is shielded from
RF energy. However RF energy may affect some malfunctioning or improperly shielded
electronic equipment.
Vehicle Electronic Equipment:
Check your vehicle manufacturers representative to determine if any on board electronic
equipment is adequately shielded from RF energy.
Transmitters:
Performance is critical in three areas: in-channel, out-of-channel, and out-of band
In-channel measurements determine the link quality seen by the user in question:
Phase error and mean frequency error
Mean transmitted RF carrier power
Transmitted RF carrier power versus time
Out-of-channel measurements determine how much interference the user causes other
GSM users:
3GPP TS 11.21 V8.6.0: Base station system (BSS) equipment specification; radio
aspects.
It is worth noting that these specifications were written for the purposes of full type
approval and they are extensive. It is not practical to make the whole suite of measurements in
most application areas. For example, in manufacturing where throughput and cost are key
drivers, it is necessary to use a subset of the measurements defined in the specifications above.
Optimization is key, the objective should be to test sufficiently to prove correct assembly,
perform correct calibration and assure correct field operation, but with a minimum of expense. It
is not necessary to type approve infrastructure component shipped. This application note aims to
help the reader to interpret the standards and apply tests appropriately. The standards can be
difficult to understand, and independent parties might interpret them differently. Agilent
Technologies uses the standards as a basis from which to design measurement algorithms
Attention commands:
GSM engines are referred to as following term:
1) ME (Mobile Equipment);
2) MS (Mobile Station);
3) TA (Terminal Adapter);
4) DCE (Data Communication Equipment) or facsimile DCE(FAX modem, FAX board);
In application, controlling device controls the GSM engine by sending AT Command via its
serial interface. The controlling device at the other end of the serial line is referred to as
following term:
1) TE (Terminal Equipment);
2) DTE (Data Terminal Equipment) or plainly the application which is running on an
embedded system;
AT Command syntax
The "AT" or "at" prefix must be set at the beginning of each command line. To terminate a
command line enter <CR>.
Commands
are
usually
followed
by
response
that
includes.<CR><LF><response><CR><LF>
Throughout this document, only the responses are presented, <CR><LF> are omitted
intentionally.
The AT command set implemented by SIM300 is a combination of GSM07.05, GSM07.07 and
ITU-T recommendation V.25ter and the AT commands developed by SIMCOM.
Note: Only enter AT command through serial port after SIM300 is power on and Unsolicited
Result Code RDY is received from serial port. And if unsolicited result codeSCKS: 0
returned it indicates SIM card isnt present. If autobauding is enabled, the Unsolicited Result
Codes RDY and so on are not indicated when you start up the MEExtended Syntax
These commands can operate in several modes, as following table:
Table 1: Types of AT commands and AT+<x>=?
The
returns
mobile
the
parameters
ranges
set
equipment
list
and
with
of
value
the
corresponding
Write
command or by internal
Read command
AT+<x>?
processes.
This command returns the
currently set value of the
Write command
AT+<x>=<>
parameter or parameters.
This command sets the
user-definable
Execution command
AT+<x>
parameter
values.
The execution command
reads
parameters
non-variable
affected
by
The SIM300 AT command interface defaults to the IRA character set. The SIM300 supports the
following character sets:
GSM format
UCS2
HEX
IRA
PCCP437
PCDN
8859_1
The character set can be set and interrogated using the AT+CSCS command (GSM 07.07). The
character set is defined in GSM specification 07.05.
Overview of AT Commands According to GSM07.05
AT+CMGF
SELECT SMS MESSAGE FORMAT
AT+CMGF Select SMS Message Format AT+CMGF Select SMS Message Format
Read Command
Response
AT+CMGF?
+CMGF: <mode>
OK
Parameters
Test Command
AT+CMGF=?
Write Command
OK
Response
AT+CMGF=[<mode>]
ATE
ATE Set command echo mode ATE Set command echo mode
Write command
Response
ATE[<value>]
Write Command
OK
Response
AT+CMGD=<index>
storage
<mem1>
location
<index>.
OK
If error is related to ME functionality:
+CMS ERROR <err>
Parameters
<index> integer type; value in the range
of location numbers supported by the
associated memory
AT+CMGDA Delete All SMS AT+ CMGDA Delete All SMS
Test Command
Response:
AT+ CMGDA=?
+CMGDA:
listed
of
supported <type> s
OK
+CMS ERROR: NUM
Parameters
see write command
Write Command
Response:
AT+CMGDA=<type>
OK
+CMS ERROR: NUM
Parameters
1) If text mode:
DEL READ delete all read
messages
DEL UNREAD delete all
unread messages
DEL SENT delete all sent
SMS
DEL UNSENT delete all
unsent SMS
DEL
INBOX
delete
received SMS
DEL ALL delete all SMS
3) if PDU mode :
1 delete all read messages
2 delete all unread messages
3 delete all sent SMS
4 delete all unsent SMS
5 delete all received SMS
6 delete all SMS
all
OK
Parameters
AT+CMGR=<index>[,<mode>]
<stat>,<fo>,<mr>,[<ra>],
[<tora>],<scts>,<dt>,<st>
for SMS-COMMANDs:
+CMGR:<stat>,<fo>,<ct>[,<pid>,
[<mn>],[<da>],
[<toda>],<length><CR><LF><cdata>]
The iButton (also known as the Dallas Key) is a mechanical packaging standard that places a 1Wire component inside a small stainless steel "button" similar to a disk-shaped battery. iButtons
are connected to 1-Wire bus systems by means of sockets with contacts which touch the "lid" and
"base" of the canister. iButtons are used as Akbil smart tickets for the Public transport in
Istanbul. Alternatively, the connection can be semi-permanent with a different socket type; the
iButton clips into it, but is easily removed.
The Java Ring, a ring-mounted iButton with a Java Virtual Machine compatible with the Java
Card 2.0 specification within, was given to attendees of the JavaOne 1998 conference.[2]
Each 1-Wire chip has a unique code buried within it. This feature makes the chips, especially in
an iButton package, ideal for use as a key to open a lock, arm and deactivate burglar alarms,
authenticate computer system users, operate time clock systems, and other similar uses.
Use of the bus
In any MicroLan, there is always exactly one master in overall charge, which may be a PC or a
microcontroller. The master initiates activity on the bus, simplifying the avoidance of collisions
on the bus. Protocols are built into the software to detect collisions. After a collision, the master
tries again to effect the required communication.
The Dallas 1-Wire network is physically implemented as an open drain master device connected
to one or more open drain slaves [3] . A single pull-up resistor is common to all devices and acts to
pull the bus up to 3 or 5 volts, and may provide power to the slave devices. Communication
occurs when a master or slave asserts the bus lowthat is, connects the pull up resistor to
ground through its output MOSFET. Specific 1-Wire driver and bridge chips are also available.
Data rates of 16.3 kbit/s can be achieved. There is also an overdrive mode which speeds up the
communication by a factor of 10.
The master starts a transmission with a "reset" pulse, which pulls the wire to 0 volts for 480 s.
This resets every slave device on the bus, probably by depriving them all of power. After that,
any slave device, if present, shows that it exists with a "presence" pulse: it holds the wire to
ground for at least 60 s after the master releases the bus.
To send a "1", the bus master software sends a very brief (1 - 15 s) low pulse. To send a "0", the
software sends a 60 s low pulse. The falling (negative) edge of the pulse is used to start a
monostable multivibrator in the slave device. The multivibrator in the slave clocks to read the
data line about 30 s after the falling edge. The slave's multivibrator unavoidably has analog
tolerances that affect its timing accuracy, which is why the output pulses have to be 60 s long,
and the starting pulse can't be longer than 15 s.
If a parallel port is inconvenient or the operating system interferes with the timing, a UART
running at 100 kbit/s with a few resistors and special software can produce and sense acceptable
1-wire pulses. Serial or USB "bridge" chips are also available that handle the timing and
waveform requirements of the 1-Wire bus, and are particularly useful in utilizing long (greater
than 100 m) cables effectively. Up to 300 meter long buses consisting of simple twistedpair
telephone cable has been tested by the manufacturer. It will however require adjustment of pullup resistances from say 5k to 1 k.
When receiving data, the master sends a 1-15 s 0 volt pulse to start each bit. If the transmitting
slave unit wants to send a "1", it does nothing, and the wire goes immediately up to the pulled-up
voltage. If the transmitting slave wants to send a "0", it pulls the data line to ground for 60 s.
The basic sequence is a reset pulse followed by an 8-bit command, and then data is sent or
received in groups of 8-bits.
When a sequence of data is being transferred, errors can be detected with an 8-bit CRC (weak
data protection).
Many devices can share the same bus. Each device on the bus has a unique 64-bit serial number.
The least significant byte of the serial number is an 8-bit number that tells the type of the device.
The most significant byte is a standard (for the 1-wire bus) 8-bit CRC.[4]
There are several standard broadcast commands, and commands addressed to particular devices.
The master can send a selection command, and then the address of a particular device, and then
the next command is executed only by the selected device.
The bus also has an algorithm to recover the address of every device on the bus. Since the
address includes the device type and a CRC, recovering the address roster also produces a
reliable inventory of the devices on the bus. The 64-bit address space is searched as a binary tree,
allowing up to 75 devices to be found per second.
To find the devices, the master broadcasts an enumeration command, and then an address,
"listening" after each bit of an address. If a slave has all the address bits so far, it returns a 0. The
master uses this simple behavior to search systematically for valid sequences of address bits. The
process is much faster than a brute force search of all possible 64-bit numbers because as soon as
an invalid bit is detected, all subsequent address bits are known to be invalid. An enumeration of
10 or 15 devices finishes very quickly.
The location of devices on the bus is sometimes significant. For these situations, the
manufacturer has a special device that either passes through the bus or switches it off. Software
can therefore explore sequential
Example communication with a device
The following signals were generated by an FPGA, which was the master for the communication
with a DS2432 (EEPROM) chip, and measured with a logic analyzer. High on the 1-wire output
means that the output of the FPGA is in tri-state mode and the 1-wire device can pull down the
bus. Low means that the FPGA pulls down the bus. The 1-wire input is the measured bus signal.
On input sample time high, the FPGA samples the input for detecting the device response and
receiving bits.
MAX232
The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals
suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver
and typically converts the RX, TX, CTS and RTS signals.
The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single + 5 V supply
via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-232
in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as power
supply design does not need to be made more complicated just for driving the RS-232 in this
case.
The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard 5 V TTL
levels. These receivers have a typical threshold of 1.3 V, and a typical hysteresis of 0.5 V.
The later MAX232A is backwards compatible with the original MAX232 but may operate at
higher baud rates and can use smaller external capacitors 0.1 F in place of the 1.0 F
capacitors used with the original device.[1]
The newer MAX3232 is also backwards compatible, but operates at a broader voltage range,
from 3 to 5.5 V. [2]
[edit] Voltage levels
It is helpful to understand what occurs to the voltage levels. When a MAX232 IC receives a TTL
level to convert, it changes a TTL Logic 0 to between +3 and +15 V, and changes TTL Logic 1 to
between -3 to -15 V, and vice versa for converting from RS232 to TTL. This can be confusing
when you realize that the RS232 Data Transmission voltages at a certain logic state are opposite
from the RS232 Control Line voltages at the same logic state. To clarify the matter, see the table
below. For more information see RS-232 Voltage Levels.
RS232 Voltage
+3 V to +15 V
-3 V to -15 V
-3 V to -15 V
+3 V to +15 V
SERIAL COMMUNICATION
n telecommunication and computer science, the concept of serial communication is the process
of sending data one bit at a time, sequentially, over a communication channel or computer bus.
This is in contrast to parallel communication, where several bits are sent as a whole, on a link
with several parallel channels. Serial communication is used for all long-haul communication
and most computer networks, where the cost of cable and synchronization difficulties make
parallel communication impractical. Serial computer buses are becoming more common even at
shorter distances, as improved signal integrity and transmission speeds in newer serial
technologies have begun to outweigh the parallel bus's advantage of simplicity (no need for
serializer and deserializer, or SerDes) and to outstrip its disadvantages (clock skew, interconnect
density).
Serial versus parallel
The communication links across which computersor parts of computerstalk to one another
may be either serial or parallel. A parallel link transmits several streams of data (perhaps
representing particular bits of a stream of bytes) along multiple channels (wires, printed circuit
tracks, optical fibres, etc.); a serial link transmits a single stream of data.
At first sight it would seem that a serial link must be inferior to a parallel one, because it can
transmit less data on each clock tick. However, it is often the case that serial links can be clocked
considerably faster than parallel links, and achieve a higher data rate. A number of factors allow
serial to be clocked at a greater rate:
Clock skew between different channels is not an issue (for unclocked asynchronous serial
communication links)
A serial connection requires fewer interconnecting cables (e.g. wires/fibres) and hence
occupies less space. The extra space allows for better isolation of the channel from its
surroundings
In many cases, serial is a better option because it is cheaper to implement. Many ICs have serial
interfaces, as opposed to parallel ones, so that they have fewer pins and are therefore less
expensive.
In telecommunications, RS-232 (Recommended Standard 232) is the traditional name for a series
of standards for serial binary single-ended data and control signals connecting between a DTE
(Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly
used in computer serial ports. The standard defines the electrical characteristics and timing of
signals, the meaning of signals, and the physical size and pinout of connectors. The current
version of the standard is TIA-232-F Interface Between Data Terminal Equipment and Data
Circuit-Terminating Equipment Employing Serial Binary Data Interchange, issued in 1997
Scope of the standard
The Electronic Industries Association (EIA) standard RS-232-C[1] as of 1969 defines:
Electrical signal characteristics such as voltage levels, signaling rate, timing and slewrate of signals, voltage withstand level, short-circuit behavior, and maximum load
capacitance.
the framing of characters in the data stream (bits per character, start/stop bits, parity)
bit rates for transmission, although the standard says it is intended for bit rates lower than
20,000 bits per second. Many modern devices support speeds of 115,200 bit/s and above
Details of character format and transmission bit rate are controlled by the serial port hardware,
often a single integrated circuit called a UART that converts data from parallel to asynchronous
start-stop serial form. Details of voltage levels, slew rate, and short-circuit behavior are typically
controlled by a line driver that converts from the UART's logic levels to RS-232 compatible
signal levels, and a receiver that converts from RS-232 compatible signal levels to the UART's
logic levels.
History
RS-232 was first introduced in 1962. [2] The original DTEs were electromechanical
teletypewriters and the original DCEs were (usually) modems. When electronic terminals (smart
and dumb) began to be used, they were often designed to be interchangeable with teletypes, and
so supported RS-232. The C revision of the standard was issued in 1969 in part to accommodate
the electrical characteristics of these devices.
Since application to devices such as computers, printers, test instruments, and so on was not
considered by the standard, designers implementing an RS-232 compatible interface on their
equipment often interpreted the requirements idiosyncratically. Common problems were nonstandard pin assignment of circuits on connectors, and incorrect or missing control signals. The
lack of adherence to the standards produced a thriving industry of breakout boxes, patch boxes,
test equipment, books, and other aids for the connection of disparate equipment. A common
deviation from the standard was to drive the signals at a reduced voltage: the standard requires
the transmitter to use +12 V and 12 V, but requires the receiver to distinguish voltages as low as
+3 V and -3 V. Some manufacturers therefore built transmitters that supplied +5 V and -5 V and
labeled them as "RS-232 compatible."
Later personal computers (and other devices) started to make use of the standard so that they
could connect to existing equipment. For many years, an RS-232-compatible port was a standard
feature for serial communications, such as modem connections, on many computers. It remained
in widespread use into the late 1990s. In personal computer peripherals it has largely been
supplanted by other interface standards, such as USB. RS-232 is still used to connect older
designs of peripherals, industrial equipment (such as PLCs), console ports and special purpose
equipment such as a cash drawer for a cash register.
The standard has been renamed several times during its history as the sponsoring organization
changed its name, and has been variously known as EIA RS-232, EIA 232, and most recently as
TIA 232. The standard continued to be revised and updated by the Electronic Industries Alliance
and since 1988 by the Telecommunications Industry Association (TIA).[3] Revision C was issued
in a document dated August 1969. Revision D was issued in 1986. The current revision is TIA232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment
Employing Serial Binary Data Interchange, issued in 1997. Changes since Revision C have been
in timing and details intended to improve harmonization with the CCITT standard V.24, but
equipment built to the current standard will interoperate with older versions.
Limitations of the standard
Because the application of RS-232 has extended far beyond the original purpose of
interconnecting a terminal with a modem, successor standards have been developed to address
the limitations. Issues with the RS-232 standard include:[4]
The large voltage swings and requirement for positive and negative supplies increases
power consumption of the interface and complicates power supply design. The voltage
swing requirement also limits the upper speed of a compatible interface.
Single-ended signaling referred to a common signal ground limits the noise immunity and
transmission distance.
Multi-drop connection among more than two devices is not defined. While multi-drop
"work-arounds" have been devised, they have limitations in speed and compatibility.
Asymmetrical definitions of the two ends of the link make the assignment of the role of a
newly developed device problematic; the designer must decide on either a DTE-like or
DCE-like interface and which connector pin assignments to use.
The handshaking and control lines of the interface are intended for the setup and
takedown of a dial-up communication circuit; in particular, the use of handshake lines for
flow control is not reliably implemented in many devices.
No method is specified for sending power to a device. While a small amount of current
can be extracted from the DTR and RTS lines, this is only suitable for low power devices
such as mice.
Standard details
In RS-232, user data is sent as a time-series of bits. Both synchronous and asynchronous
transmissions are supported by the standard. In addition to the data circuits, the standard defines
a number of control circuits used to manage the connection between the DTE and DCE. Each
data or control circuit only operates in one direction, that is, signaling from a DTE to the
attached DCE or the reverse. Since transmit data and receive data are separate circuits, the
interface can operate in a full duplex manner, supporting concurrent data flow in both directions.
The standard does not define character framing within the data stream, or character encoding.
Voltage levels
Diagrammatic oscilloscope trace of voltage levels for an uppercase ASCII "K" character (0x4b)
with 1 start bit, 8 data bits, 1 stop bit
The RS-232 standard defines the voltage levels that correspond to logical one and logical zero
levels for the data transmission and the control signal lines. Valid signals are plus or minus 3 to
15 volts; the 3 V range near zero volts is not a valid RS-232 level. The standard specifies a
maximum open-circuit voltage of 25 volts: signal levels of 5 V, 10 V, 12 V, and 15 V are all
commonly seen depending on the power supplies available within a device. RS-232 drivers and
receivers must be able to withstand indefinite short circuit to ground or to any voltage level up to
25 volts. The slew rate, or how fast the signal changes between levels, is also controlled.
For data transmission lines (TxD, RxD and their secondary channel equivalents) logic one is
defined as a negative voltage, the signal condition is called marking, and has the functional
significance. Logic zero is positive and the signal condition is termed spacing. Control signals
are logically inverted with respect to what one sees on the data transmission lines. When one of
these signals is active, the voltage on the line will be between +3 to +15 volts. The inactive state
for these signals is the opposite voltage condition, between 3 and 15 volts. Examples of
control lines include request to send (RTS), clear to send (CTS), data terminal ready (DTR), and
data set ready (DSR).
Because the voltage levels are higher than logic levels typically used by integrated circuits,
special intervening driver circuits are required to translate logic levels. These also protect the
device's internal circuitry from short circuits or transients that may appear on the RS-232
interface, and provide sufficient current to comply with the slew rate requirements for data
transmission.
Because both ends of the RS-232 circuit depend on the ground pin being zero volts, problems
will occur when connecting machinery and computers where the voltage between the ground pin
on one end, and the ground pin on the other is not zero. This may also cause a hazardous ground
loop. Use of a common ground limits RS-232 to applications with relatively short cables. If the
two devices are far enough apart or on separate power systems, the local ground connections at
either end of the cable will have differing voltages; this difference will reduce the noise margin
of the signals. Balanced, differential, serial connections such as USB, RS-422 and RS-485 can
tolerate larger ground voltage differences because of the differential signaling.[6]
Unused interface signals terminated to ground will have an undefined logic state. Where it is
necessary to permanently set a control signal to a defined state, it must be connected to a voltage
source that asserts the logic 1 or logic 0 level. Some devices provide test voltages on their
interface connectors for this purpose.
Connectors
RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data Communication
Equipment (DCE); this defines at each device which wires will be sending and receiving each
signal. The standard recommended but did not make mandatory the D-subminiature 25 pin
connector. In general and according to the standard, terminals and computers have male
connectors with DTE pin functions, and modems have female connectors with DCE pin
functions. Other devices may have any combination of connector gender and pin definitions.
Many terminals were manufactured with female terminals but were sold with a cable with male
connectors at each end; the terminal with its cable satisfied the recommendations in the standard.
Presence of a 25 pin D-sub connector does not necessarily indicate an RS-232-C compliant
interface. For example, on the original IBM PC, a male D-sub was an RS-232-C DTE port (with
a non-standard current loop interface on reserved pins), but the female D-sub connector was used
for a parallel Centronics printer port. Some personal computers put non-standard voltages or
signals on some pins of their serial ports.
The standard specifies 20 different signal connections. Since most devices use only a few
signals, smaller connectors can often be used.
BATTERY
Batteries are an excellent emergency power source, but require some basic information to
use properly. They are electrochemical devices. They have plates, usually metallic, and either a
solution or a moist compound between the plates. A chemical reaction takes place in the battery
when it is discharged that produces a flow of electrons out one plate on the negative side and into
another plate on the positive side.
Here we are using dry lead/acid battery. It has plates of lead in sulphuric acid solution in
water. One of the sets of lead plates is coated with lead dioxide. As such a battery discharges it
creates two chemical reactions, one at the anode that ends up with an excess of electrons, and
one at the cathode that ends up short electrons. If a wire is connected between the two, the excess
electrons from the anode will travel through the wire as a current to the cathode where they are
needed to complete the electron deficient reaction there.
Dry lead acid battery of 12V/1.3A is used as source of power for the whole robot unit.
For digital circuitry 5 volts needed is derived from 12v battery using regulator IC7805.
LCD 16x2
Liquid crystal display is very important device in embedded system. It offers high flexibility to
user as he can display the required data on it. But due to lack of proper approach to LCD
interfacing many of them fail. Many people consider LCD interfacing a complex job but
according to me LCD interfacing is very easy task, you just need to have a logical approach. This
page is to help the enthusiast who wants to interface LCD with through understanding. Copy and
Paste technique may not work when an embedded system engineer wants to apply LCD
interfacing in real world projects.
You will be knowing about the booster rockets on space shuttle. Without these booster rockets
the space shuttle would not launch in geosynchronous orbit. Similarly to understand LCD
interfacing you need to have booster rockets attached! To get it done right you must have general
idea how to approach any given LCD.This page will help you develop logical approach towards
LCD interfacing.
First thing to begin with is to know what LCD driver/controller is used in LCD.Yes, your LCD is
dumb it does not know to talk with your microcontroller. LCD driver is a link between the
microcontroller and LCD. You can refer the datasheet of LCD to know the LCD driver for e.g.
JHD 162A is name of LCD having driver HD44780U.You have to interface the LCD according
to the driver specification. To understand the algorithm of LCD interfacing user must have
datasheet of both LCD and LCD driver. Many people ignore the datasheets and end up in
troubles. If you want to interface LCD successfully you must have datasheets.
Why people ignore datasheets? Most of us do not like to read 100 pages of datasheet. But for a
accurate technical specification datasheets are must. I will show you a technique to manipulate a
datasheet within minutes.
First thing to find out in datasheet is the features viz. operating voltage, type of interface,
maximum speed for interface in MHz, size of display data RAM, number of pixels, bits per
pixel, number of row and columns. You must have the pin diagram of LCD.Pin diagram of LCD
driver can be omitted.
Study the type of communication protocol whether it is parallel or serial interface. Check how
LCD discriminates data bytes and command bytes, which pins on LCD are used for
communication. Study Interface timing diagram given in the datasheet.
From datasheet of LCD driver find out whether hardware reset is required at startup, what is the
time of reset pulse, is it active low and which pins of LCD are to be toggled.
Major task in LCD interfacing is the initialization sequence. In LCD initialization you have to
send command bytes to LCD. Here you set the interface mode, display mode, address counter
increment direction, set contrast of LCD, horizontal or vertical addressing mode, color format.
This sequence is given in respective LCD driver datasheet. Studying the function set of LCD lets
you know the definition of command bytes. It varies from one LCD to another. If you are able to
initialize the LCD properly 90% of your job is done.
Next step after initialization is to send data bytes to required display data RAM memory location.
Firstly set the address location using address set command byte and than send data bytes using
the DDRAM write command. To address specific location in display data RAM one must have
the knowledge of how the address counter is incremented.
LCD INTERFACING:
The most commonly used Character based LCDs are based on Hitachi's HD44780 controller or
other which are compatible with HD44580. In this, we will discuss about character based LCDs,
their interfacing with various microcontrollers, various interfaces (8-bit/4-bit), programming,
special stuff and tricks you can do with these simple looking LCDs which can give a new look to
your application.
Pin Description:
The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 Line LCDs
which have only 1 controller and support at most of 80 characters, whereas LCDs supporting
more than 80 characters make use of 2 HD44780 controllers. Most LCDs with 1 controller has
14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED
connections). Pin description is shown in the table below.
Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Its
extended capacity is 80 X 8 bits, or 80 characters. The area in display data RAM (DDRAM) that
is not used for display can be used as general data RAM. So whatever you send on the DDRAM
is actually displayed on the LCD. For LCDs like 1x16, only 16 characters are visible, so
whatever you write after 16 chars is written in DDRAM but is not visible to the user.
Figures below will show you the DDRAM addresses of 1 Line, 2 Line and 4 Line LCDs.
CGRAM area is used to create custom characters in LCD. In the character generator RAM, the
user can rewrite character patterns by program. For 5 x 8 dots, eight character patterns can be
written, and for 5 x 10 dots, four character patterns can be written.
BF - Busy Flag
Busy Flag is a status indicator flag for LCD. When we send a command or data to the LCD for
processing, this flag is set (i.e. BF =1) and as soon as the instruction is executed successfully this
flag is cleared (BF = 0). This is helpful in producing and exact amount of delay. To read Busy
Flag, the condition RS = 0 and R/W = 1 must be met and The MSB of the LCD data bus (D7) act
as busy flag. When BF = 1 means LCD is busy and will not accept next command or data and BF
= 0 means LCD is ready for the next command or data to process.
Instruction Register (IR) and Data Register (DR)
There are two 8-bit registers in HD44780 controller Instruction and Data register. Instruction
register corresponds to the register where you send commands to LCD e.g. LCD shift command,
LCD clear, LCD address etc. and Data register is used for storing data
, which is to be displayed on LCD when send the enable signal of the LCD is asserted, the data
on the pins is latched in to the data register and data is then moved automatically to the DDRAM
and
hence
is
displayed
on
the
LCD?
Data Register is not only used for sending data to DDRAM but also for CGRAM, the address
where you want to send the data, is decided by the instruction you send to LCD.
Commands and Instruction set
Only the instruction register (IR) and the data register (DR) of the LCD can be controlled by the
MCU. Before starting the internal operation of the LCD, control information is temporarily
stored into these registers to allow interfacing with various MCUs, which operate at different
speeds, or various peripheral control devices. The internal operation of the LCD is determined by
signals sent from the MCU. These signals, which include register selection signal (RS),
read/write signal (R/W), and the data bus (DB0 to DB7), make up the LCD instructions (table
below). There are four categories of instructions that:
Although looking at the table you can make your own commands and test them. Below is a brief
list of useful commands which are used frequently while working on the LCD.
an LCD has to be initialized by instructions or by internal reset circuit. we will discuss both ways
of initialization one by one.
Display clear
Function
DL
set:
=
1;
=
8-bit
0;
interface
1-line
data
display
Display
on/off
control:
0;
Display
off
0;
Cursor
off
B = 0; Blinking off
Entry
I/D
mode
=
1;
S = 0; No shift
Increment
set:
by
Figure 7 shows the test conditions which are to be met for internal reset circuit to be active.
Now the problem with the internal reset circuit is, it is highly dependent on power supply, to
meet this critical power supply conditions is not hard but are difficult to achieve when you are
making a simple application. So usually the second method i.e. Initialization by instruction is
used and is recommended most of the time.
Initialization by instructions
Initializing LCD with instructions is really simple. Given below is a flowchart that describes the
step to follow, to initialize the LCD.
Send
command
0x30
2)
Send
command
8-bit
8-bit
Delay
5)
Send
command
8-bit
Delay
Send
Function
set
Display
see
interface
20ms
0x30
6)
interface
20ms
0x30
4)
8)
Using
Delay
3)
7)
interface
20ms
Table
4
Clear
for
more
information
command
9)
Set
entry
mode
command
explained
below
The first 3 commands are usually not required but are recommended when you are using 4-bit
interface. So you can program the LCD starting from step 7 when working with 8-bit interface.
Function set command depends on what kind of LCD you are using and what kind of interface
you are using.
Select bus width (0x30 - for 8-bit and 0x20 for 4-bit)
The busy flag will only be valid after the above reset sequence. Usually we do not use busy flag
in 4-bit mode as we have to write code for reading two nibbles from the LCD. Instead we simply
put a certain amount of delay usually 300 to 600uS. This delay might vary depending on the
LCD you are using, as you might have a different crystal frequency on which LCD controller is
running. So it actually depends on the LCD module you are using. So if you feel any problem
running the LCD, simply try to increase the delay. This usually works.
LCD connections in 4-bit Mode
Above is the connection diagram of LCD in 4-bit mode, where we only need 6 pins to interface
an LCD. D4-D7 are the data pins connection and Enable and Register select are for LCD control
pins. We are not using Read/Write (RW) Pin of the LCD, as we are only writing on the LCD so
we have made it grounded permanently. If you want to use it. Then you may connect it on your
controller but that will only increase another pin and does not make any big difference.
Potentiometer RV1 is used to control the LCD contrast. The unwanted data pins of LCD i.e. D0D3 are connected to ground.
PCB DESIGN
PCB design starts right from the selection of the laminates .The two main types of base
laminate are epoxy glass and phenolic paper laminates are generally used for simple circuits.
Though it is very cheap and can easily be drilled, phenolic paper has poor electrical
characteristics and it absorbs more moisture than epoxy glass. Epoxy glass has higher
mechanical
strength.
The important properties that have to be considered for selecting the PCB substrate are
the dielectric strength, insulation resistance, water absorption property, coefficient of thermal
expansion, shear strength, hardness, dimensional stability etc.
5.2.1 PCB Fabrication
The fabrication of a PCB includes four steps.
a) Preparing the PCB pattern.
b) Transferring the pattern onto the PCB.
c) Developing the PCB.
d) Finishing (i.e.) drilling, cutting, smoothing, turning etc.
Pattern designing is the primary step in fabricating a PCB. In this step, all interconnection
between the components in the given circuit are converted into PCB tracks. Several factors such
as positioning the diameter of holes, the area that each component would occupy, the type of end
terminal should be considered.
5.2.2
Transferring
the
PCB
Pattern
The copper side of the PCB should be thoroughly cleaned with the help of alcoholic spirit or
petrol. It must be completely free from dust and other contaminants.
The mirror image of the pattern must be carbon copied and to the laminate the complete
pattern may now be made each resistant with the help of paint and thin brush.
5.2.3 Developing
In this developing all excessive copper is removed from the board and only the
printed pattern is left behind. About 100ml of tap water should be heated to 75 C and 30.5
grams of FeCl3 added to it, the mixture should be thoroughly stirred and a few drops of HCl may
be added to speed up the process.
The board with its copper side facing upward should be placed in a flat bottomed plastic
tray and the aqueous solution of FeCl 2 poured in the etching process would take 40 to 60 min to
complete.
After etching the board it should be washed under running water and then
held against light .the printed pattern should be clearly visible. The paint should be removed with
the help of thinner.