DA A
Function: Decimal-adjust Accumulator for Addition
Description: DA A adjusts the eight-bit value in the Accumulator resulting from the earlier addition of two variables (each in
packed-BCD format), producing two four-bit digits. Any ADD or ADDC instruction may have been used to
perform the addition.
If Accumulator bits 3 through 0 are greater than nine (xxxx1010-xxxx1111), or if the AC flag is one, six is added to
the Accumulator producing the proper BCD digit in the low-order nibble. This internal addition sets the carry flag
if a carry-out of the low-order four-bit field propagates through all high-order bits, but it does not clear the carry
flag otherwise.
If the carry flag is now set, or if the four high-order bits now exceed nine (1010xxxx-1111xxxx), these high-order
bits are incremented by six, producing the proper BCD digit in the high-order nibble. Again, this sets the carry
flag if there is a carry-out of the high-order bits, but does not clear the carry. The carry flag thus indicates if the
sum of the original two BCD variables is greater than 100, allowing multiple precision decimal addition. OV is not
affected.
All of this occurs during the one instruction cycle. Essentially, this instruction performs the decimal conversion by
adding 00H, 06H, 60H, or 66H to the Accumulator, depending on initial Accumulator and PSW conditions.
Note: DA A cannot simply convert a hexadecimal number in the Accumulator to BCD notation, nor does DAA
apply to decimal subtraction.
Example: The Accumulator holds the value 56H (01010110B), representing the packed BCD digits of the decimal number
56. Register 3 contains the value 67H (01100111B), representing the packed BCD digits of the decimal number
67. The carry flag is set. The following instruction sequence
ADDC A,R3
DA A
first performs a standard two’s-complement binary addition, resulting in the value 0BEH (10111110) in the
Accumulator. The carry and auxiliary carry flags are cleared.
The Decimal Adjust instruction then alters the Accumulator to the value 24H (00100100B), indicating the packed
BCD digits of the decimal number 24, the low-order two digits of the decimal sum of 56, 67, and the carry-in. The
carry flag is set by the Decimal Adjust instruction, indicating that a decimal overflow occurred. The true sum of
56, 67, and 1 is 124.
BCD variables can be incremented or decremented by adding 01H or 99H. If the Accumulator initially holds 30H
(representing the digits of 30 decimal), then the following instruction sequence,
ADD A, # 99H
DA A
leaves the carry set and 29H in the Accumulator, since 30 + 99 = 129. The low-order byte of the sum can be
interpreted to mean 30 - 1 = 29.
Friday, February 12, 2010
Instruction Sets
Alphabetical List of Instructions
- ACALL: Absolute Call
- ADD, ADDC: Add Accumulator (With Carry)
- AJMP: Absolute Jump
- ANL: Bitwise AND
- CJNE: Compare and Jump if Not Equal
- CLR: Clear Register
- CPL: Complement Register
- DA: Decimal Adjust
- DEC: Decrement Register
- DIV: Divide Accumulator by B
- DJNZ: Decrement Register and Jump if Not Zero
- INC: Increment Register
- JB: Jump if Bit Set
- JBC: Jump if Bit Set and Clear Bit
- JC: Jump if Carry Set
- JMP: Jump to Address
- JNB: Jump if Bit Not Set
- JNC: Jump if Carry Not Set
- JNZ: Jump if Accumulator Not Zero
- JZ: Jump if Accumulator Zero
- LCALL: Long Call
- LJMP: Long Jump
- MOV: Move Memory
- MOVC: Move Code Memory
- MOVX: Move Extended Memory
- MUL: Multiply Accumulator by B
- NOP: No Operation
- ORL: Bitwise OR
- POP: Pop Value From Stack
- PUSH: Push Value Onto Stack
- RET: Return From Subroutine
- RETI: Return From Interrupt
- RL: Rotate Accumulator Left
- RLC: Rotate Accumulator Left Through Carry
- RR: Rotate Accumulator Right
- RRC: Rotate Accumulator Right Through Carry
- SETB: Set Bit
- SJMP: Short Jump
- SUBB: Subtract From Accumulator With Borrow
- SWAP: Swap Accumulator Nibbles
- XCH: Exchange Bytes
- XCHD: Exchange Digits
- XRL: Bitwise Exclusive OR
- Undefined: Undefined Instruction
GSM Modem as a Product
GSM Modem Product, from Sparr Electronics limited (SEL), provides full functional
capability to Serial devices to send SMS and Data over GSM Network. The product is
available as Board Level or enclosed in Metal Box. The Board Level product can be
integrated in to Various Serial devices in providing them SMS and Data capability and
the unit housed in a Metal Enclosure can be kept outside to provide serial port
connection. The GSM Modem supports popular "AT" command set so that users can
develop applications quickly. The product has SIM Card holder to which activated SIM
card is inserted for normal use. The power to this unit can be given from UPS to provide
uninterrupted operation. This product provides great feasibility for Devices in remote
location to stay connected which otherwise would not have been possible where
telephone lines do not exist
capability to Serial devices to send SMS and Data over GSM Network. The product is
available as Board Level or enclosed in Metal Box. The Board Level product can be
integrated in to Various Serial devices in providing them SMS and Data capability and
the unit housed in a Metal Enclosure can be kept outside to provide serial port
connection. The GSM Modem supports popular "AT" command set so that users can
develop applications quickly. The product has SIM Card holder to which activated SIM
card is inserted for normal use. The power to this unit can be given from UPS to provide
uninterrupted operation. This product provides great feasibility for Devices in remote
location to stay connected which otherwise would not have been possible where
telephone lines do not exist
Working of Pins
Abbreviation Full Name Function
TD Transmit Data Serial Data Output (TXD)
RD Receive Data Serial Data Input (RXD)
CTS Clear to Send This line indicates that the Modem is ready to exchange data.
DCD Data Carrier When the modem detects a "Carrier" from the detect modem at the other end of the phone line, this Line becomes active.
DSR Data Set Ready This tells the UART that the modem is ready to
establish a link.
DTR Data Terminal Ready This is the opposite to DSR. This tells the Modem that the UART is ready to link.
RTS Request To Send This line informs the Modem that the UART is ready to exchange data.
RI Ring Indicator Goes active when modem detects a ringing signal from the PSTN.
TD Transmit Data Serial Data Output (TXD)
RD Receive Data Serial Data Input (RXD)
CTS Clear to Send This line indicates that the Modem is ready to exchange data.
DCD Data Carrier When the modem detects a "Carrier" from the detect modem at the other end of the phone line, this Line becomes active.
DSR Data Set Ready This tells the UART that the modem is ready to
establish a link.
DTR Data Terminal Ready This is the opposite to DSR. This tells the Modem that the UART is ready to link.
RTS Request To Send This line informs the Modem that the UART is ready to exchange data.
RI Ring Indicator Goes active when modem detects a ringing signal from the PSTN.
Pin Description of DB-9
Serial Pin out (D-9 Connector)
Serial Port D-Type 9 pin connector which
is male on the back of the GSM modem,
thus you will require a female connector
on your device. Below is a table of pin
connections for the 9 pin D-Type
connector.
Pin No. Abbreviation Full Name
Pin 3 TD Transmit Data
Pin 2 RD Receive Data
Pin 7 RTS Request To Send
Pin 8 CTS Clear To Send
Pin 6 DSR Data Set Ready
Pin 5 SG Signal Ground
Pin 1 CD Carrier Detect
Pin 4 DTR Data Terminal Ready
Pin 9 RI Ring Indicator
Serial Port D-Type 9 pin connector which
is male on the back of the GSM modem,
thus you will require a female connector
on your device. Below is a table of pin
connections for the 9 pin D-Type
connector.
Pin No. Abbreviation Full Name
Pin 3 TD Transmit Data
Pin 2 RD Receive Data
Pin 7 RTS Request To Send
Pin 8 CTS Clear To Send
Pin 6 DSR Data Set Ready
Pin 5 SG Signal Ground
Pin 1 CD Carrier Detect
Pin 4 DTR Data Terminal Ready
Pin 9 RI Ring Indicator
Application area
· Mobile Transport vehicles.
· LAN based SMS servers
· Alarm notification of critical events including Servers
· Network Monitoring and SMS reporting
· Data Transfer applications from remote locations
· Monitor and control of Serial services through GSM Network
· Integration to custom software for Warehouse, Stock, Production, Dispatch
notification through SMS.
· AMR- Automatic Meter Reading
And many more…
· LAN based SMS servers
· Alarm notification of critical events including Servers
· Network Monitoring and SMS reporting
· Data Transfer applications from remote locations
· Monitor and control of Serial services through GSM Network
· Integration to custom software for Warehouse, Stock, Production, Dispatch
notification through SMS.
· AMR- Automatic Meter Reading
And many more…
ARCHITECTURE OF THE GSM NETWORK
A GSM network is composed of several functional entities, whose functions and
interfaces are specified. Figure 1.1 shows the layout of a generic GSM network. The
GSM network can be divided into three broad parts. The Mobile Station is carried by the
subscriber. The Base Station Subsystem controls the radio link with the Mobile Station.
The Network Subsystem, the main part of which is the Mobile services Switching Center
(MSC), performs the switching of calls between the mobile users, and between mobile
and fixed network users. The MSC also handles the mobility management operations.
Not shown is the Operations and Maintenance Center, which oversees the proper
operation and setup of the network. The Mobile Station and the Base Station Subsystem
communicate across the Um interface, also known as the air interface or radio link. The
Base Station Subsystem communicates with the Mobile services Switching Center across
the A interface.
interfaces are specified. Figure 1.1 shows the layout of a generic GSM network. The
GSM network can be divided into three broad parts. The Mobile Station is carried by the
subscriber. The Base Station Subsystem controls the radio link with the Mobile Station.
The Network Subsystem, the main part of which is the Mobile services Switching Center
(MSC), performs the switching of calls between the mobile users, and between mobile
and fixed network users. The MSC also handles the mobility management operations.
Not shown is the Operations and Maintenance Center, which oversees the proper
operation and setup of the network. The Mobile Station and the Base Station Subsystem
communicate across the Um interface, also known as the air interface or radio link. The
Base Station Subsystem communicates with the Mobile services Switching Center across
the A interface.
Service Provided by GSM
From the beginning, the planners of GSM wanted ISDN compatibility in terms of the
services offered and the control signalling used. However, radio transmission limitations,
in terms of bandwidth and cost, do not allow the standard ISDN B-channel bit rate of 64
kbps to be practically achieved.
Using the ITU-T definitions, telecommunication services can be divided into bearer
services, teleservices, and supplementary services. The most basic teleservice supported
by GSM is telephony. As with all other communications, speech is digitally encoded and
transmitted through the GSM network as a digital stream. There is also an emergency
service, where the nearest emergency-service provider is notified by dialing three digits.
A variety of data services is offered. GSM users can send and receive data, at rates up to
9600 bps, to users on POTS (Plain Old Telephone Service), ISDN, Packet Switched
Public Data Networks, and Circuit Switched Public Data Networks using a variety of
access methods and protocols, such as X.25 or X.32. Since GSM is a digital network, a
modem is not required between the user and GSM network, although an audio modem is
required inside the GSM network to interwork with POTS.
Other data services include Group 3 facsimile, as described in ITU-T recommendation
T.30, which is supported by use of an appropriate fax adaptor. A unique feature of GSM,
not found in older analog systems, is the Short Message Service (SMS). SMS is a
bidirectional service for short alphanumeric (up to 160 bytes) messages. Messages are
transported in a store-and-forward fashion. For point-to-point SMS, a message can be
sent to another subscriber to the service, and an acknowledgement of receipt is provided
to the sender. SMS can also be used in a cell-broadcast mode, for sending messages such
3
as traffic updates or news updates. Messages can also be stored in the SIM card for later
retrieval .
Supplementary services are provided on top of teleservices or bearer services. In the
current (Phase I) specifications, they include several forms of call forward (such as call
forwarding when the mobile subscriber is unreachable by the network), and call barring
of outgoing or incoming calls, for example when roaming in another country. Many
additional supplementary services will be provided in the Phase 2 specifications, such as
caller identification, call waiting, multi-party conversations.
services offered and the control signalling used. However, radio transmission limitations,
in terms of bandwidth and cost, do not allow the standard ISDN B-channel bit rate of 64
kbps to be practically achieved.
Using the ITU-T definitions, telecommunication services can be divided into bearer
services, teleservices, and supplementary services. The most basic teleservice supported
by GSM is telephony. As with all other communications, speech is digitally encoded and
transmitted through the GSM network as a digital stream. There is also an emergency
service, where the nearest emergency-service provider is notified by dialing three digits.
A variety of data services is offered. GSM users can send and receive data, at rates up to
9600 bps, to users on POTS (Plain Old Telephone Service), ISDN, Packet Switched
Public Data Networks, and Circuit Switched Public Data Networks using a variety of
access methods and protocols, such as X.25 or X.32. Since GSM is a digital network, a
modem is not required between the user and GSM network, although an audio modem is
required inside the GSM network to interwork with POTS.
Other data services include Group 3 facsimile, as described in ITU-T recommendation
T.30, which is supported by use of an appropriate fax adaptor. A unique feature of GSM,
not found in older analog systems, is the Short Message Service (SMS). SMS is a
bidirectional service for short alphanumeric (up to 160 bytes) messages. Messages are
transported in a store-and-forward fashion. For point-to-point SMS, a message can be
sent to another subscriber to the service, and an acknowledgement of receipt is provided
to the sender. SMS can also be used in a cell-broadcast mode, for sending messages such
3
as traffic updates or news updates. Messages can also be stored in the SIM card for later
retrieval .
Supplementary services are provided on top of teleservices or bearer services. In the
current (Phase I) specifications, they include several forms of call forward (such as call
forwarding when the mobile subscriber is unreachable by the network), and call barring
of outgoing or incoming calls, for example when roaming in another country. Many
additional supplementary services will be provided in the Phase 2 specifications, such as
caller identification, call waiting, multi-party conversations.
GSM History
1.1 HISTORY OF GSM
During the early 1980s, analog cellular telephone systems were experiencing rapid
growth in Europe, particularly in Scandinavia and the United Kingdom, but also in
France and Germany. Each country developed its own system, which was incompatible
with everyone else's in equipment and operation. This was an undesirable situation,
because not only was the mobile equipment limited to operation within national
boundaries, which in a unified Europe were increasingly unimportant, but there was also
a very limited market for each type of equipment, so economies of scale and the
subsequent savings could not be realized.
The Europeans realized this early on, and in 1982 the Conference of European Posts and
Telegraphs (CEPT) formed a study group called the Groupe Spécial Mobile (GSM) to
study and develop a pan-European public land mobile system. The proposed system had
to meet certain criteria:
· Good subjective speech quality
· Low terminal and service cost
· Support for international roaming
· Ability to support handheld terminals
· Support for range of new services and facilities
· Spectral efficiency
· ISDN compatibility
And interaction with the Integrated service digital network (ISDN) which offers the
capability to extend the single-subscriber –line system with the various to a
multiservice system.
The first commercial GSM system, called D2, was implemented in Germany in 1982.
This valuable channel of communication can equip us with a powerful tool for
controlling desired device or process parameter from distant location, through
electromagnetic waves.
With a little effort logic can be setup to even receive a feedback on the status of the
device or the process being controlled.
During the early 1980s, analog cellular telephone systems were experiencing rapid
growth in Europe, particularly in Scandinavia and the United Kingdom, but also in
France and Germany. Each country developed its own system, which was incompatible
with everyone else's in equipment and operation. This was an undesirable situation,
because not only was the mobile equipment limited to operation within national
boundaries, which in a unified Europe were increasingly unimportant, but there was also
a very limited market for each type of equipment, so economies of scale and the
subsequent savings could not be realized.
The Europeans realized this early on, and in 1982 the Conference of European Posts and
Telegraphs (CEPT) formed a study group called the Groupe Spécial Mobile (GSM) to
study and develop a pan-European public land mobile system. The proposed system had
to meet certain criteria:
· Good subjective speech quality
· Low terminal and service cost
· Support for international roaming
· Ability to support handheld terminals
· Support for range of new services and facilities
· Spectral efficiency
· ISDN compatibility
And interaction with the Integrated service digital network (ISDN) which offers the
capability to extend the single-subscriber –line system with the various to a
multiservice system.
The first commercial GSM system, called D2, was implemented in Germany in 1982.
This valuable channel of communication can equip us with a powerful tool for
controlling desired device or process parameter from distant location, through
electromagnetic waves.
With a little effort logic can be setup to even receive a feedback on the status of the
device or the process being controlled.
Subscribe to:
Posts (Atom)