Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
________________________________________________________________________
Introduction
Encoding Decoding
Modulation Demodulation
(Distortion) (Distortion) (Distortion)
Noise
Source
________________________________________________________________________
www.powerzone.info 5
Wireless Data Transceiver
________________________________________________________________________
________________________________________________________________________
www.powerzone.info 6
Wireless Data Transceiver
________________________________________________________________________
1.3 Block Diagram
FM FM
Transmitter Transmitter
FM receiver FM receiver
LCD LCD
MCU MCU
Keyboard Keyboard
________________________________________________________________________
www.powerzone.info 7
Wireless Data Transceiver
________________________________________________________________________
1.3.1 Block Diagram Description
Keyboard:
Keyboard 1&2 constitute keyboard module. User interacts with the
microcontroller through the keyboard when the station is in the transmitting mode, user
enters message. Serial keyboard is used in this project. The scan codes associated with
each key is illustrated in Appendix.
Microcontroller:
Microcontroller 1&2 comprise this unit. In the transmitting mode of a
station, the microcontroller accepts the message from the keyboard, convert it into DTMF
format and transmit through FM.
In the receiving mode of a station the microcontroller stores message
and when the user enters the description key the original is displayed on the LCD.89C52
the flash version of 8051 family with 8kb internal ROM is used in this project.
Liquid Crystal Display:
While the station is in the transmitter mode, the LCD unit in that
station will display entire message. In the receiver mode the LCD display the received
message. A two line 16 character LCD display with embedded controller HD44780 from
Crystalonics is used.
LEDs and Buzzer:
These units are used as indicators to the user. When the power is ON
the blue LED blinks indicating that the system is ON. When press each key a red LED
blinks indicating the interruption the keyboard. Tone from the buzzer is indicating that a
message is received.
Power Supply:
Power Supply units are used to power the devices. A +5V & +12V
regulated DC supply are required for the functioning of the circuit. Capacitor filter is
used along with the regulator.
DTMF transceiver:
The MT8888C Integrated DTMF Transceiver consists of a high
performance DTMF receiver with an internal gain setting amplifier and a DTMF
generator. The message that stored microcontroller’s RAM is converted into DTMF code
________________________________________________________________________
www.powerzone.info 8
Wireless Data Transceiver
________________________________________________________________________
by the transmitter in the DTMF Transceiver. The received DTMF code from the other
station through FM is decoded by the DTMF receiver in the transceiver and that decoded
data (actual message) is displayed on the LCD screen.
FM Transmitter:
In this system, for transmitting DTMF data the modulation performed
is FM. The DTMF data from the DTMF Transceiver is transmitted with the help of an
FM transmitter. The transmitter is basically a reactance modulator which varies the
capacitance of a varactor diode and hence the resonant frequency of a tank circuit.
FM Receiver:
Data transmitted through FM is only detected by the FM receiver. The
receiver’s output is given to the DTMF Transceiver. An integrated receiver module is
used. The IC has special features like quadrature discrimination signal strength indication
and automatic AFC.
________________________________________________________________________
www.powerzone.info 9
Wireless Data Transceiver
________________________________________________________________________
________________________________________________________________________
www.powerzone.info 10
Wireless Data Transceiver
________________________________________________________________________
2.1 FM modulation system
The comparatively low cost of equipment for an FM broadcasting
station, resulted in rapid growth in the years following World War II. Within three years
after the close of the war, 600 licensed FM stations were broadcasting in the United
States and by the end of the 1980s there were over 4,000. Similar trends have occurred in
Britain and other countries. Because of crowding in the AM broadcast band and the
inability of standard AM receivers to eliminate noise, the tonal fidelity of standard
stations is purposely limited. FM does not have these drawbacks and therefore can be
used to transmit music reproducing the original performance with a degree of fidelity that
cannot be reached on AM bands. FM stereophonic broadcasting has drawn increasing
numbers of listeners to popular as well as classical music, so that commercial FM stations
draw higher audience ratings than AM stations.
The integrated chip has also played its part in the wide proliferation of
FM receivers, as circuits got smaller it became easier to make a modular electronic
device called the "Walkman", which enables the portability of a tape player and an
AM/FM radio receiver. This has resulted in the portability of a miniature FM receiver,
which is used in our project for reception of FM signal.
________________________________________________________________________
www.powerzone.info 11
Wireless Data Transceiver
________________________________________________________________________
With a bandwidth of 200 KHz for one station, up to 100 stations can be
fitted between 88 & 108Mhz. Station 201 to 300 denotes the stations, from 88.1 MHz to
107.9 MHz. Station 201 to 220 (88Mhz to 91.2) are for non-commercial stations
(educational) which could be a good area to transmit in, but in recent years the band from
88MHz to 103Mhz has been filled by a lot of commercial channels, making the lower
frequencies very congested indeed.
2.2 FM equations
Where A is the amplitude of the carrier and f (t) is the angle of the
carrier, which constitutes the frequency ( fc ) and the phase (a) of the carrier. Angle
modulation varies the angle of the carrier by an amount proportional to the information
signal. Angle modulation can be broken into 2 distinct categories, frequency modulation
and phase modulation. Formal definitions are given below:
________________________________________________________________________
www.powerzone.info 12
Wireless Data Transceiver
________________________________________________________________________
Phase Modulation (PM): angle modulation in which the phase of a carrier is caused to
depart from its reference value by an amount proportional to the modulating signal
amplitude.
________________________________________________________________________
www.powerzone.info 13
Wireless Data Transceiver
________________________________________________________________________
D7 D6 D5 D4 D3 D2 D1 D0
1 0 1 1 0 1 1 0
* 6
________________________________________________________________________
www.powerzone.info 14
Wireless Data Transceiver
________________________________________________________________________
Signaling information
I character II character
________________________________________________________________________
www.powerzone.info 15
Wireless Data Transceiver
________________________________________________________________________
________________________________________________________________________
www.powerzone.info 16
Wireless Data Transceiver
________________________________________________________________________
3.1 Hardware section
Power Supply
FM Transmitter
________________________________________________________________________
www.powerzone.info 17
Wireless Data Transceiver
________________________________________________________________________
FM Receiver
DTMF Transceiver
________________________________________________________________________
www.powerzone.info 18
Wireless Data Transceiver
________________________________________________________________________
Microcontroller interface
________________________________________________________________________
www.powerzone.info 19
Wireless Data Transceiver
________________________________________________________________________
3.1.1 Design
________________________________________________________________________
www.powerzone.info 20
Wireless Data Transceiver
________________________________________________________________________
is rectified using a bridge rectifier. This is filtered using a capacitor. Then it is given to
the input of the regulators. We connect a capacitor between the input of the regulator and
ground. This is to minimize lead inductance. At the output also we put capacitors to
improve transient response.
We know that the minimum input voltage required by the Ic regulator Vi(min) = 7.3V.
In order to maintain Vi (min) >= 7.3V
Vr (peak) <= 12-7.3
<= 4.7 V
Vr (rms) <= 4.7/1.732
<= 2.71V
Take Vr (rms) = 1V
We have Vr(rms) = Idc/4√3 f C
Take Idc = 750 mA
Substituting the above values, we have C=1080 mfd
Take C= 1500micro F
As both KBD data and KBD clk are open collector I/O pins, two pull
up resistors of 10K each are connected. In lcd module in order to adjust the contrast a
10k preset is used
Design of steering circuit for DTMF transceiver
Threshold voltage Vtst = 2.5v
Guard time tone present Tgtp = R1c1 ln Vdd/(Vdd-Vtst)
Take Tgtp = 20ms
Take R1= 470kohm
Substituting the values, we have C1=0.1micro F
Design of FM transmitter circuit
Self made inductance L= N2 ( d2 / 18d+40b)
Where L inductance in micro Henry
D diameter of coil in inches
________________________________________________________________________
www.powerzone.info 21
Wireless Data Transceiver
________________________________________________________________________
________________________________________________________________________
www.powerzone.info 22
Wireless Data Transceiver
________________________________________________________________________
caps lock and the scroll lock. When the caps lock is pressed for example, the keyboard
will send the scan code for caps lock. There are 101 keys and 8-bits make 256 different
combinations, thus we need to send one byte per key.
Scan codes
Whenever the power is turned on keyboard enters a BAT (Basic
Assurance Test) and set the default scan code. The diagram below shows the scan
assigned to individual keys. The scan cod is shown on bottom of the key. Example scan
code for ESC is 76H
The scan code assignments are quiet random. In many cases the easiest
way to convert scan code to ASCII code would be to use a lookup table. Below are the
scan codes for extended keyboard and numeric keypad.
The keyboards connector
The keyboard is connected to external equipment using 4 wires. These
wires are shown below for five pin din male plug and ps/2 plug. A fifth wire sometimes
can be found. This was once upon a time implemented as keyboard reset, but today is left
disconnected. Both KBD clock and KBD data are open collector bi-directional I/O lines.
If desired, the host can talk to keyboard using these lines.
________________________________________________________________________
www.powerzone.info 23
Wireless Data Transceiver
________________________________________________________________________
The keyboard is free to send data to host when both the KBD data and
KBD clock lines are high. The transmission of data from keyboard to the host
Is done with a frame of 11 bits. The first bit is a start bit (logic 0) followed by 8 data bits
(LSB first) , one parity bit (odd parity) and a stop bit ( logic 1). Each bit should be read
on the falling edge of clock.
The LCD module is a dot matrix liquid crystal display that displays
alpha numeric, characters and symbols. The built in controller HD44780 and driver LSI’s
provide convenient connectivity between the dot matrix and most of the microcontrollers.
All the functions required for the dot matrix display are internally provided. Internal
refresh is provided by the display module. The CMOS technology makes the device ideal
For applications in hand held, portable and other battery powered instruments with low
power consumptions
Features of CRYSTALLONICS CDM16216 LCD module
v Easy interface with a 4-bit or an 8-bit MPU
v Built in LCD dot matrix controller
________________________________________________________________________
www.powerzone.info 24
Wireless Data Transceiver
________________________________________________________________________
BLOCK DIAGRAM
C
O COM
E N LCD
R/W T
RS R 8
D0 O SEG40
To D7 L
VDD L
VL E
VSS R 4
DRIVER
The display module does not have conventional chip select terminal.
When the display module is correctly connected the data bus of a MCU, the enable has to
b derived from the CS or I/O.
When connecting the display module through a parallel I/O device, the
burden of ensuring proper operation falls on the software. Incorrect combination of data
________________________________________________________________________
www.powerzone.info 25
Wireless Data Transceiver
________________________________________________________________________
bus direction and R/W pin logic can cause irreversible damage to display module as well
as the PIO.
DB0 to DB7 has the capacity of driving one TTL or capacitance of 130
pf. The data bus terminals have 3 state constructions. When the enable level is at low
level, these data bus terminals will remain in high impedance states. The data bus
terminals have pull-up MOS, so when the data bus is open, it produces high output
voltages.
At the interface of LCD module, there are 3 power supply terminals
VDD, GND, V0. The LCD is driven by the voltage which is determined by VDD-V0.
Since the optimum voltage for power supply for LCD shifts according to temperature
change, voltages at V0 terminal need to be adjusted. V0 also need to be adjusted for
optimum contrast at the angle at which the ODM is viewed.
LCD initialization
o The display module is automatically initialized (reset) when the power is turned
on using the internal reset circuit. The Busy Flag (BF) holds ‘high’ and does not
accept instructions until initialization ends. The following procedure should be
carried out, to initialize the module by instruction.
v Turn on the power
v Wait for more than 15 ms after VDD rises to 4.5 volts
v Set interface as 8-bits long (function set)
v Wait for more than 100µs
v Set interface as 8-bit long (function set)
v Busy Flag (BF) can be checked now. When BF is not checked the waiting time
between instructions should be longer than the instruction execution time (about
2ms on an average)
v Set interface as 4-bits / 8-bits, number of display lines and character font (function
set). The number of display lines and character font cannot be changed after this
point
v Check the Busy Flag or give a time delay of 2ms
v Set display off (display on or off control)
v Check the Busy Flag or give a time delay of 2ms
________________________________________________________________________
www.powerzone.info 26
Wireless Data Transceiver
________________________________________________________________________
The display data RAM (DD RAM) stores display data represented in
8-bit character codes. Its capacity is 80 x 8 bits, or 80 characters. On displays with fewer
than 80 characters, any DD RAM that is not used for display can be used as a general
data RAM. The DD RAM address is set in the Address Counter (AC) and is expressed in
hexadecimal.
________________________________________________________________________
www.powerzone.info 27
Wireless Data Transceiver
________________________________________________________________________
The Character Generator RAM is RAM with which the user can
redefine character patterns in software. With 5 x 7 dots, 8 user-defined character patterns
can be stored and with 5 x 10 dots, 4 user-defined character patterns can be stored
CG RAM Programming
Underline/Blinking Cursor
the address counter (AC).The cursor is displayed randomly in any position when AC
selects CG RAM address through it is meaningless
Timing Generation Circuit
Instruction code
The instruction code is a command set through which the display module
is controlled by the MCU.Prior to internal execution of the instruction code, control
information is temporarily stored in the internal registers of the display module, to allow the
interface from the display module internal operations to various types of MCU’s which
operates at different speeds or to allow interface to peripheral control ICs.The display module
begins operation at the receipt of instruction code input from the MCU.
There are four types of instructions, those that:
1. Designate the display module functions such as display format, data length, etc.
2. Define internal RAM address.
3. Perform data transfer with internal RAM.
4. Others.
Clear Display
display. Space code ‘20h’is written into all DD RAM address. Sets DD RAM address ‘0’
in the address counter. Sets I/D=’1’of the entry modes of the entry mode does not change.
Return Home
Code 0 0 0 0 0 0 0 0 1 0
Higher Order Bits Lower Order Bits
The cursor or blink goes to the left edge of the display. The display
returns to its original status if it was shifted .DD RAM contents do not change .Sets the
DD RAM address ‘0’ in the address counter.
Entry Mode Set
Code 0 0 0 0 0 0 0 1 I/D S
Higher Order Bits Lower Order Bits
When the I/D is set, the 8-bit character code is written or read to and
from the DD RAM, the cursor shifts to the right by 1 character position or to the left by 1
character position. The address counter is incremented or decremented by ‘1’ this time
.Even after the character pattern code is written or read to and from the CG RAM, the
address counter is incremented or decremented by ‘1’.
S shifts the entire display either to the right or to the left when S is
‘1’, to the left when I/D are ‘1’ and to the right when I/D is ‘0’. Thus it looks as if the
cursor stands still and the display moves. The display does not shift when reading from
the DD RAM or when writing into or reading out from the CG RAM when S=0.
Display ON/OFF control
Code 0 0 0 0 0 0 1 D C B
Higher Order Bits Lower Order Bits
________________________________________________________________________
www.powerzone.info 30
Wireless Data Transceiver
________________________________________________________________________
The display is ON when D=1 and OFF when D=0. When OFF due to
D=0, display data remains in DD RAM. It can be displayed immediately by setting D=1.
The cursor is displayed when C=1 and goes OFF when C=0. Even if the cursor
disappears, the function of I/D, etc. does not change during display data write. The cursor
is displayed using 5 dots in the 8th line when the 5X7 dot character font is selected and 5
dots in the 11th line when 5X10 dot character font is selected. The character indicated by
the cursor blinks when B=1. The blink is displayed by switching between all black dots
and display characters at 406.6ms. Interval when fcp or fosc=250 kHz. The cursor and
the blink can be set to display simultaneously. (The blink interval changes according to
the reciprocal of fcp of fosc 409.6*250/270=379.2ms when fcp= 270 kHz.)
Cursor or Display Shift
S/C R/L
0 0 Shifts the cursor position to the left
0 1 Shifts the cursor position to the right
1 0 Shifts the entire display to the left
1 1 Shifts the entire display to the right
________________________________________________________________________
www.powerzone.info 31
Wireless Data Transceiver
________________________________________________________________________
Function Set
Code 0 0 0 0 1 DL N F 0 0
Higher Order Bits Lower Order Bits
When DL=’1’, the data I/O to and from the MCU is carried out by the means of
8-bits from DB7 to DB0. When DL=0, the data I/O to and from the MCU is carried out in
two steps through the 4-bits DB7 to DB4. The ‘N’ sets the number of display lines. The
two line display mode of the LCD is selected when N=’1’, while the one line display
mode of the LCD is selected when N=’0’. The ‘F’ sets the character font. The 5X7 dots
character font is selected when F=’0’, while 5X10 dots character font is selected when
F=’1’. This instruction is executed at the start of the program. From this point the
function set instruction cannot be executed unless the interface data length is changed i.e.
software reset is performed.
Set CG RAM address
Sets the CG RAM address into the address counter in binary A5 to A0. In the
5X10 font mode A5 and A4 define the CG RAM block number while A3-A0 defines the
row within the block. In the 5X7 font mode A5-A3 define the CG RAM block number
while A2-A0 defines the row within the block.
Set the DD RAM Address
________________________________________________________________________
www.powerzone.info 32
Wireless Data Transceiver
________________________________________________________________________
Sets the DD RAM address into the address counter in binary B6 to B0.
Data then written or read from the ODM pertains to the DD RAM. However, when N=’0’
B6 to B0 is ‘00’ to ‘4F’, when N=’1’ B6 to B0 is ‘00’ to 27H for the first line, and
40~67H for the 2nd line.
Read Busy Flag and Address
Reads the busy flag that indicates the system is now internally
executing a previously received instruction. BF=1 indicates that internal operation is in
progress. The next instruction will not be accepted until BF goes ‘0’. Check the BF status
before the next write operation.
At the same time, the value of the address counter expressed in binary
C6 to C0 is read. The address counter is used by both CG and DD RAM addresses, and
its value is determined by the previous instruction.
Write Data to CG or DD RAM
Code 1 0 D D D D D D D D
Higher Order Bits Lower Order Bits
Code 1 1 D D D D D D D D
Higher Order Bits Lower Order Bits
________________________________________________________________________
www.powerzone.info 33
Wireless Data Transceiver
________________________________________________________________________
________________________________________________________________________
www.powerzone.info 34
Wireless Data Transceiver
________________________________________________________________________
In DTMF there are 16 distinct tones. Each tone is the sum of two
frequencies: one from a low and one from a high frequency group. There are four
different frequencies in each group.
Your phone only uses 12 of the possible 16 tones. If you look at your
phone, there are only 4 rows (R1, R2, R3 and R4) and 3 columns (C1, C2 and C3). The
rows and columns select frequencies from the low and high frequency group respectively.
The exact value of the frequencies is listed in Table 3 below:
________________________________________________________________________
www.powerzone.info 35
Wireless Data Transceiver
________________________________________________________________________
You can see that the DTMF generated signal is very distinct and clear.
The horizontal axis is in samples. The frequency of the tone is about 1900 Hz - close to
the 1906 Hz predicted by Table 3 (697+1209).
________________________________________________________________________
www.powerzone.info 36
Wireless Data Transceiver
________________________________________________________________________
3.1.5 FM Transmitter
Introduction
Exciter/modulator
· Carrier Oscillator generates a stable sine wave for the carrier wave. Linear
frequency even when modulated with little or No amplitude change
· Buffer amplifier acts as a high impedance load on oscillator to help stabilise
frequency.
· The Modulator deviates the audio input about the carrier frequency. The peak + of
audio will give a decreased frequency & the peak - of the audio will give an
increase of frequency
________________________________________________________________________
www.powerzone.info 37
Wireless Data Transceiver
________________________________________________________________________
Frequency multiplier
Power output
Pre-emphasis
The Oscillator
require that the loop gain be unity and that the total phase shift through the system is
360o. I that way an impulse or noise applied to the LC circuit is fed back and is amplified
(due to the fact that in practice the loop gain is slightly greater than unity) and sustains a
The Barkhausen criteria for sine-wave oscillation maybe deduced from the following
block diagram
xo+ yo = 0o or 360o
i.e. the total phase shift produced by the amplifier and the feed back network should be
00 in order to produce sustained oscillation
A1 * A2 = 1
________________________________________________________________________
www.powerzone.info 39
Wireless Data Transceiver
________________________________________________________________________
order for oscillation to Kick off and be sustained the frequency of the
Reactance modulator
The nature of FM as described before is that when the base band signal
is Zero the carrier is at it's "carrier" frequency, when it peaks the carrier deviation is at a
maximum and when it troughs the deviation is at its minimum. This deviation is simply a
quickening or slowing down of frequency around the carrier frequency by an amount
proportional to the base band signal. In order to convey the characteristic of FM on the
carrier wave the inductance or capacitance (of the tank) must be varied by the base band.
Normally the capacitance of the tank is varied by a varactor diode. The varactor diode
(seen below) when in reverse bias has a capacitance across it proportional to the
________________________________________________________________________
www.powerzone.info 40
Wireless Data Transceiver
________________________________________________________________________
magnitude of the reverse bias applied to it. The formula for working out the instantaneous
capacitance is shows that as the reverse bias is increased the capacitance is decreased.
________________________________________________________________________
www.powerzone.info 41
Wireless Data Transceiver
________________________________________________________________________
With peak negative base band influence. With peak positive base band influence.
Buffer Amplifier
The buffer amplifier acts as a high input impedance with a low gain
and low output impedance associated with it. The high input impedance prevents loading
effects from the oscillator section, this high input impedance maybe looked upon as RL
in the analysis of the Colpitts Oscillator. The High impedance RL helped to stabilize the
oscillator frequency.
Frequency Multipliers
________________________________________________________________________
www.powerzone.info 43
Wireless Data Transceiver
________________________________________________________________________
The circuit above is good for low multiplying factors (i.e. *2 ), for
triplers and especially quadruplers, current idlers are used to improve efficiency. These
series resonant LC's help in the output filtering of the input, but more importantly they
aid in the circulation of harmonic currents to enhance the transistor's non-linearity. The
idlers can be tuned to fi, 2fi , N-1(fi), the final output tank is tuned to fo = N(fi).
Driver Amplifier
The driver amplifier can be seen to do the same function as the buffer
amplifier, i.e. a high input impedance, low gain (close to unity) and low output
impedance between the frequency multiplier and power output stages of the transmitter.
The circuitry is the same as discussed in the Buffer amplifier description.
________________________________________________________________________
www.powerzone.info 44
Wireless Data Transceiver
________________________________________________________________________
The power amplifier takes the energy drawn from the DC power supply
and converts it to the AC signal power that is to be radiated. The efficiency or lack of it in
most amplifiers is affected by heat being dissipated in the transistor and surrounding
circuitry. For this reason, the final power amplifier is usually a Class-C amplifier for high
powered modulation systems or just a Class B push-pull amplifier for use in a low-level
power modulated transmitter. Therefore the choice of amplifier type depends greatly on
the output power and intended range of the transmitter.
Antenna
The final stage of any transmitter is the Antenna, this is where the
electronic FM signal is converted to electromagnetic waves, which are radiated into the
atmosphere. Antennas can be Vertically or Horizontally polarized, which is determined
by their relative position with the earth's surface (i.e. antenna parallel with the ground is
Horizontally polarized). A transmitting antenna that is horizontally polarized transmits
better to a receiving antenna that is also horizontally polarized; this is also true for
vertically polarized antennas. One of the intended uses for the transmitter is as a tour
guiding aid, where a walkman shall be used as the receiver, for a walkman the receiving
________________________________________________________________________
www.powerzone.info 45
Wireless Data Transceiver
________________________________________________________________________
antenna is the co-axial shielding around the earphone wire. The earphone wire is
normally left vertical; therefore a vertically polarized whip antenna will be the chosen
antenna for this particular application.
Radiation Resistance
Where dl is the length of the antenna, l is the wavelength and n is an exponent value that
can be found by using (dl/l) on the y-axis and then n can be found on the x-axis.
________________________________________________________________________
www.powerzone.info 46
Wireless Data Transceiver
________________________________________________________________________
exponent to give n = -1.6 which results in the radiation resistance equal to 789.5 * (0.5 *
.975)-1.6 = 2492 » 2.5KW
Power transfer
Reciprocity
Hertz Dipole
________________________________________________________________________
www.powerzone.info 47
Wireless Data Transceiver
________________________________________________________________________
Placing the + and - terminals in the middle of the antenna and ensuring
that the impedance at the terminals is high (typically 2500W ) and the impedance at the
open ends is low (73W ). This will ensure that the voltage will be at a minimum at the
terminal and at a maximum at the ends, which will efficiently accept electrical energy
and radiate it into space as electromagnetic waves. The gap at the centre of the antenna is
negligible for frequencies above 14 MHz.
When considering an antenna type and size for this project 2 things
have to be taken into account, the frequency of transmission and the portability of the
antenna.
The above analysis concludes that the use of an adjustable end fed
whip antenna with an affective length of 30 to 75 cm could be used with considerable
affect.
________________________________________________________________________
www.powerzone.info 48
Wireless Data Transceiver
________________________________________________________________________
Impedance matching
Between the final power amplifier of the transmitter and the antenna,
an impedance matching network may be considered. One of the possible surprises in
power amplifiers is the realization that output impedance matching is not based on the
maximum power criteria. One reason for this is the fact that matching the load to the
device output impedance results in power transfer at 50% efficiency.
Here are a few equations that determine the inductance and capacitor values from the
above figure, when RL (Rantenna) and Ro (the output impedance of the amplifier) are
known.
Quality factor : determines the bandwidth
________________________________________________________________________
www.powerzone.info 49
Wireless Data Transceiver
________________________________________________________________________
The use of this matching network is predicted on the fact that Ro < RL
according to the equation for calculating the inductance XL. This method of matching is
similar to the so called quarter wave transformer for transmission lines.
3.1.6 FM receivers
RF
Amplifier
________________________________________________________________________
www.powerzone.info 50
Wireless Data Transceiver
________________________________________________________________________
________________________________________________________________________
www.powerzone.info 51
Wireless Data Transceiver
________________________________________________________________________
instruction set and pin out. The on-chip Flash allows the program memory to be quickly
reprogrammed using a nonvolatile memory programmer.
~ 8 Kbytes of Flash
~ 256 bytes of RAM
~ 32 I/O lines
~ three 16-bit timer/counters
~ six vector, two-level interrupt architecture
~ full duplex serial port
~ on chip oscillator and clock circuitry
________________________________________________________________________
www.powerzone.info 52
Wireless Data Transceiver
________________________________________________________________________
In addition, the 8952 is designed with static logic for operation down to
zero frequency and supports two software selectable power saving modes. The Idle Mode
stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system
to continue functioning. The Power Down Mode saves the RAM contents but freezes the
oscillator disabling all other chip functions until the next hardware reset.
________________________________________________________________________
www.powerzone.info 53
Wireless Data Transceiver
________________________________________________________________________
Port 0
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port,
each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be
used as high impedance inputs. Port 0 can also be configured to be the multiplexed low
order address/data bus during accesses to external program and data memory. In this
mode, P0 has internal pullups.Port 0 also receives the code bytes during Flash
programming and outputs the code bytes during program verification. External pull-ups
are required during program verification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1
output buffers an sink/source four TTL inputs. When 1s are written to Port 1 pins, they
are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins
that are externally being pulled low will source current (IIL) because of the internal
pullups.In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external
count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as
shown in the following table. Port 1 also receives the low-order address bytes during
Flash programming and verification.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port 2
output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they
are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins
that are externally being pulled low will source current (IIL) because of the internal
pullups.Port 2 emits the high-order address byte during fetches from external program
memory and during accesses to external data memory that use 16-bit addresses (MOVX
@ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s.
During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2
emits the contents of the P2 Special Function Register. Port 2 also receives the high-order
address bits and some control signals during Flash programming and verification.
Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3
output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they
________________________________________________________________________
www.powerzone.info 54
Wireless Data Transceiver
________________________________________________________________________
are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins
that are externally being pulled low will source current (IIL) because of the pullups.Port 3
also serves the functions of various special features of the AT89C51, as shown in the
following table.
Port 3 also receives some control signals for Flash programming and
verification.
Interrupts
________________________________________________________________________
www.powerzone.info 55
Wireless Data Transceiver
________________________________________________________________________
historically,PCBs used to be laid out by drawing or using stick on paper shapes on Mylar
film,- that really was manual routing!.
The CAD PCB layout consists of several layers, for illustration
purposes the holes, outline and the component identification layers can be combined into
one diagram. When we produce PCBs for clients, we use an actual size check plot and
placing it in the enclosure; you can see how it will be positioned in relation to other parts.
We can also place components up against the pad markings as a quick double check of
sizing.
When we put a bit of effort in to the PCB designing –it is somewhere
where quality of the design can make a difference. These days most circuit boards are
automatically assembled and tested – but you will still have people working on your
circuit boards, and having a quality design can make all the difference between a product
that is pleasant to work and that you will hate.
We put a complete silk screen identification overlay on most of the
boards, and quality of this is another way we can make a better product. The silk screen
contains important information that assists people to service and install the product.
Aside from functionality the overlay is the chief distinguishing feature between purpose-
built products.
For dense surface mounts, we often need to leave off component
values, and sometimes need to omit the component designators. The silk screen is a
primary method for labeling connectors, replaceable parts, orientation, and even
installation notes. The PCB layouts also need to take account of EMI and ESD
compliance.
________________________________________________________________________
www.powerzone.info 56
Wireless Data Transceiver
________________________________________________________________________
________________________________________________________________________
www.powerzone.info 57
Wireless Data Transceiver
________________________________________________________________________
Programmer
Card
9 Pin D Type Female 9 Pin D Type 9 Pin D Type Female
Programming Steps
1. You can prepare your program in notepad and save that program in extension with .asm for
example (blink.asm) note: save the program in ASSEMBLER folder only
________________________________________________________________________
www.powerzone.info 58
Wireless Data Transceiver
________________________________________________________________________
2. To assemble the program click the asm51 .exe to execute, then type program name
3. After assembled, hex file will be created
4. To upload the hex file to the programmer just click the up loader which is supplied in your CD
5. click on send and select the hex file extension then the program file is downloaded
C PROGRAMMING
[If you want to write in C programming follow the steps given in SDCC in Compiler]
NOTE:
________________________________________________________________________
www.powerzone.info 59
Wireless Data Transceiver
________________________________________________________________________
Main Program
START
Delay 100 ms
Initialize LCD A
Display the
message” C
wireless data
transceiver”
Delay 100 ms
Display on LCD
“F1-compose”
“F2-sent message” C
“F3-read”
Write function A
Set (38h)
Wait 5ms
Wait 100µs
Is busy
Flag =1?
YES
NO
Set display ON A
Command
Is busy
Flag =1?
YES
NO
________________________________________________________________________
www.powerzone.info 61
Wireless Data Transceiver
________________________________________________________________________
Is busy
Flag =1?
YES
NO
Is busy
Flag =1?
YES
NO
Retn
________________________________________________________________________
www.powerzone.info 62
Wireless Data Transceiver
________________________________________________________________________
Initialization Subroutine Of DTMF
Transceiver
Delay ms
Set write = 1
Delay ms
Set write = 1
Retn
________________________________________________________________________
www.powerzone.info 63
Wireless Data Transceiver
________________________________________________________________________
Wait a ms
Set R/W = 1
Retn
________________________________________________________________________
www.powerzone.info 64
Wireless Data Transceiver
________________________________________________________________________
Interrupt Routine-int 0(Keyboard)
Int 0
Read keyboard
NO
Retn Is it a valid
Interrupt Scan code?
YES
YES
Is it a
Command? (COMPOSE)
YES
NO
Is Clear
Search the look up table for Key=’f1’ Screen
Corresponding ASCII
NO
(SEND)
Display the letter on LCD Is
Screen
I2
Key=’f2’
YES
NO
Store the ASCII in the
Scratchpad RAM I1 (READ)
Retn
Interrupt
________________________________________________________________________
www.powerzone.info 65
Wireless Data Transceiver
________________________________________________________________________
Transmit Subroutine
I1
YES
Is it
‘EOS’
NO Ret i
Write to dtmf I3
Transceiver
Wait 50 ms
Write to dtmf I3
Transceiver
Wait 50 ms
________________________________________________________________________
www.powerzone.info 66
Wireless Data Transceiver
________________________________________________________________________
Receive Data Interrupt Routine
(int1)
Int 1
Delay 50 ms
Ret i
________________________________________________________________________
www.powerzone.info 67
Wireless Data Transceiver
________________________________________________________________________
Delay Loop
Delay
ms
Dec Acc.
Is
Acc=0
NO
YES
Retn
________________________________________________________________________
www.powerzone.info 68
Wireless Data Transceiver
________________________________________________________________________
3.2.3 Program
;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
; Assembly language program for Wireless data transceiver
;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
; FILE: WDT.ASM
; Created on 10.04.2004
ORG 0000H
ajmp start
;////////// INT 0 ----- keyboard interrupt.
ORG 0003H
mov ie,#080H
mov r0,#009H
mov b,#000H
mov p3,#0ffh
mov p2,#0ffh
mov a,#000H
jmp x
;///////////// INT1 ------ receive subroutine
ORG 0013h
mov ie,#080h
mov r5,#0h
ajmp recive
________________________________________________________________________
www.powerzone.info 69
Wireless Data Transceiver
________________________________________________________________________
X:
lcall kbdelay
mov a,b
rl a
mov b,a
mov a,#000h
mov p2,#0ffh
jnb p2.0,skp
setb acc.0
jmp k
skp:clr acc.0
k: orl a,b
mov b,a
djnz r0,X
lcall clear_lcd
mov a,b
K: orl a,b
mov b,a
djnz r0,X
lcall clear_lcd
mov a,b
mov r0,#array
mov r0,#(scancode-getscan)
mov r1,b
mov r2,#0h
initloop1:
mov a,r0
inc r0
inc r2
cjne r2,#02bh,lost
lost:jnc esc
movc a,@a+pc
getscan:xrl a,r1
jnz initloop1
mov r0,#(ascii-getascii)
mov a,r0
add a,r2
subb a,#001h
movc a,@a+pc
________________________________________________________________________
www.powerzone.info 70
Wireless Data Transceiver
________________________________________________________________________
getascii:
nop
lcall write_text
escmov r0,#0h
lcall delayhs
mov ie,#081H
reti
;/////////////////////////////////////// lookup table starts here…
scancode:
db 070h
db 098h
db 00dh
db 089h
db 04ch
db 0a9h
db 058h
db 099h
db 083h
db 087h
db 0b9h
db 082h
db 0a7h
db 0a5h
db 0b8h
db 019h
db 042h
db 067h
db 065h
db 051h
db 069h
db 0b1h
db 068h
db 078h
db 0a8h
db 071h
db 08ch
db 059h
db 0b0h
db 0d0h
db 0f0h
db 0c8h
db 049h
db 0e8h
db 0d8h
db 0d9h
db 079h
________________________________________________________________________
www.powerzone.info 71
Wireless Data Transceiver
________________________________________________________________________
db 0f8h
db 0c6h
db 0c2h
db 047h
db 029h
db 0e4h
db 055h
db 0a6h
db 027h
db 003h
ascii:
db 061h
db 062h
db 063h
db 064h
db 065h
db 066h
db 067h
db 068h
db 069h
db 069h
db 06ah
db 06bh
db 06ch
db 06ch
db 06dh
db 06eh
db 06fh
db 070h
db 070h
db 071h
db 072h
db 073h
db 074h
db 075h
db 076h
db 077h
db 078h
db 079h
db 07ah
db 031h
db 032h
db 033h
db 034h
________________________________________________________________________
www.powerzone.info 72
Wireless Data Transceiver
________________________________________________________________________
db 035h
db 036h
db 036h
db 037h
db 038h
db 039h
db 039h
db 030h
db 020h
db 0b0h
db 02eh
db 02fh
db 0a5h
db 02ch
lcall delayhs
mov ie,#081h
reti
START:
mov sp,#030h
mov tcon,#00h
mov r3,#0h
mov p3,#0ffh
lcall init_lcd
lcall clear_lcd
mov a,#' '
lcall write_text
mov a,#' '
lcall write_text
mov a,#' '
lcall write_text
mov a,#' '
lcall write_text
mov a,#'W'
lcall write_text
mov a,#'I'
lcall write_text
mov a,#'R'
lcall write_text
mov a,#'E'
lcall write_text
mov a,#'L'
lcall write_text
mov a,#'E'
________________________________________________________________________
www.powerzone.info 73
Wireless Data Transceiver
________________________________________________________________________
lcall write_text
mov a,#'S'
lcall write_text
mov a,#'S'
lcall write_text
mov a,#' '
lcall write_text
mov a,#' '
lcall write_text
mov a,#' '
lcall write_text
mov a,#' '
lcall write_text
lcall linetwo
mov a,#' D'
lcall write_text
mov a,#'A '
lcall write_text
mov a,#'T '
lcall write_text
mov a,#'A '
lcall write_text
mov a,#' '
lcall write_text
mov a,#' T'
lcall write_text
mov a,#' R'
lcall write_text
mov a,#'A '
lcall write_text
mov a,#'N '
lcall write_text
mov a,#' S'
lcall write_text
mov a,#'C '
lcall write_text
mov a,#'E '
lcall write_text
mov a,#'I '
lcall write_text
mov a,#'V '
lcall write_text
mov a,#' E'
lcall write_text
mov a,#' R'
lcall write_text
________________________________________________________________________
www.powerzone.info 74
Wireless Data Transceiver
________________________________________________________________________
lcall delayhs
lcall delayhs
lp: lcall clear_lcd
mov a,#'F '
lcall write_text
mov a,#'1 '
lcall write_text
mov a,#' '
lcall write_text
mov a,#'C '
lcall write_text
mov a,#'O '
lcall write_text
mov a,#'M '
lcall write_text
mov a,#'P '
lcall write_text
mov a,#'O '
lcall write_text
mov a,#'S '
lcall write_text
mov a,#'E '
lcall write_text
mov a,#' '
lcall write_text
mov a,#'F '
lcall write_text
mov a,#'2 '
lcall write_text
mov a,#' '
lcall write_text
mov a,#'S '
lcall write_text
mov a,#'E '
lcall write_text
mov a,#'N '
lcall write_text
mov a,#'D '
lcall write_text
mov a,#' '
lcall write_text
lcall linetwo
mov a,#'F '
lcall write_text
mov a,#'3 '
lcall write_text
________________________________________________________________________
www.powerzone.info 75
Wireless Data Transceiver
________________________________________________________________________
mov a,#' '
lcall write_text
mov a,#'R '
lcall write_text
mov a,#'E '
lcall write_text
mov a,#'A '
lcall write_text
mov a,#'D '
lcall write_text
mov a,#' '
lcall write_text
mov a,#'S '
lcall write_text
mov a,#'E '
lcall write_text
mov ie,#081h
lcall delayhs
jmp lp
end
________________________________________________________________________
www.powerzone.info 76
Wireless Data Transceiver
________________________________________________________________________
clr rs
setb en
acall delayms
acall delayms
acall delayms
clr en
setb rs
acall wait
mov dat,#038h
clr rs
setb en
acall delayms
clr en
setb rs
acall wait
mov dat,#00eh
clr rs
setb en
acall delayms
clr en
setb rs
acall wait
mov dat,#001h
clr rs
setb en
acall delayms
clr en
setb rs
acall wait
mov dat,#006h
clr rs
setb en
acall delayms
clr en
setb rs
acall wait
ret
;///////////// wait loop
wait:
clr rs
setb rw
setb en
mov dat,#0ff h
mov a,dat
jb acc.7,wait
________________________________________________________________________
www.powerzone.info 77
Wireless Data Transceiver
________________________________________________________________________
clr en
clr rw
ret
;/////////// ms delay
delayms:
mov r7,#0h
loop:
inc r7
mov a,r7
nop
cjne a,#0ffh,loop
ret
delayhs:
mov r6,#000h
mov r5,#002h
loopb:
inc r6
acall delayms
mov a,r6
jnz loopb
dec r5
mov a,r5
jnz loopb
ret
;//////////// lcd clear command
clear_lcd:
clr rw
clr rs
mov dat,#001h
setb en
acall delayms
clr en
lcall wait
setb rs
ret
;/////////// display text command
write_text:
setb rs
mov dat,a
setb en
acall delayms
clr en
lcall wait
ret
;/////////// next line command
linetwo:
________________________________________________________________________
www.powerzone.info 78
Wireless Data Transceiver
________________________________________________________________________
clr rs
mov dat,#0bfh
setb en
acall delayms
clr en
lcall wait
ret
;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
;//////// Assembled in ASM51
;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
________________________________________________________________________
www.powerzone.info 79