Professional Documents
Culture Documents
Microid 125 KHZ Rfid System Design Guide: 2004 Microchip Technology Inc. Ds51115F
Microid 125 KHZ Rfid System Design Guide: 2004 Microchip Technology Inc. Ds51115F
DS51115F
Marking
Description
Advance Information
The information is on products in the design phase. Your designs should not be finalized
with this information as revised information will be published when the product becomes
available.
Preliminary
This is preliminary information on new products in production but not yet fully characterized.
The specifications in these data sheets are subject to change without notice. Before you
finalize your design, please ensure that you have the most current revision of the data sheet
by contacting your Microchip sales office.
No Marking
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart, rfPIC, and SmartShunt are
registered trademarks of Microchip Technology Incorporated
in the U.S.A. and other countries.
AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB,
PICMASTER, SEEVAL, SmartSensor and The Embedded
Control Solutions Company are registered trademarks of
Microchip Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, dsPICDEM,
dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR,
FanSense, FlexROM, fuzzyLAB, In-Circuit Serial
Programming, ICSP, ICEPIC, MPASM, MPLIB, MPLINK,
MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail,
PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB,
rfPICDEM, Select Mode, Smart Serial, SmartTel and Total
Endurance are trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
2004, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
DS51115F-page ii
M
Table of Contents
PAGE
AN680 PASSIVE RFID BASICS
Introduction........................................................................................................................................
Definitions..........................................................................................................................................
System Handshake ...........................................................................................................................
Backscatter Modulation .....................................................................................................................
Data Encoding...................................................................................................................................
Data Modulation for 125 kHz devices (MCRF2XX) ...........................................................................
Anti-Collision .....................................................................................................................................
1
2
4
4
4
6
7
29
30
30
31
32
32
34
34
34
35
37
38
40
40
40
41
41
DS51115F-page iii
M
Table of Contents (Continued)
PAGE
TB023 CONTACT PROGRAMMING SUPPORT
Introduction...................................................................................................................................... 47
Definitions......................................................................................................................................... 47
File Specifications ............................................................................................................................ 47
DS51115F-page iv
M
Table of Contents
PAGE
FSK ANTI-COLLISION READER REFERENCE DESIGN
1.0
2.0
3.0
4.0
5.0
Introduction............................................................................................................................. 153
Reader Circuits....................................................................................................................... 154
Anti-Collision Reader Schematic............................................................................................ 156
Anti-collision Reader Bill of Materials ..................................................................................... 157
FSK Anti-Collision Source Code for the PICmicro MCU ....................................................... 159
DS51115F-page v
M
Table of Contents
DS51115F-page vi
AN680
Passive RFID Basics
Author:
INTRODUCTION
Radio Frequency Identification (RFID) systems use
radio frequency to identify, locate and track people,
assets and animals. Passive RFID systems are
composed of three components a reader (interrogator), passive tag and host computer. The tag is composed of an antenna coil and a silicon chip that
includes basic modulation circuitry and non-volatile
memory. The tag is energized by a time-varying
electromagnetic radio frequency (RF) wave that is
transmitted by the reader. This RF signal is called a
carrier signal. When the RF field passes through an
antenna coil, there is an AC voltage generated across
the coil. This voltage is rectified to result in a DC voltage for the device operation. The device becomes
functional when the DC voltage reaches a certain level.
The information stored in the device is transmitted back
to the reader. This is often called backscattering. By
detecting the backscattering signal, the information
stored in the device can be fully identified.
There are two classes of RFID device depending on
type of memory cell : (a) read only device and (b) read
and write device. The memory cell can be made of
EEPROM or FRAM. EEPROM is based on CMOS silicon and FRAM is based on ferroelectric memory.
Since CMOS process technology has been matured,
the EEPROM can be produced relatively at lower cost
than the FRAM device. However, FRAM based RFID
device consumes less power which is desirable for low
power device. Therefore, it is known as a good candidate for the future RFID device, if its manufacturing
cost becomes compatible to that of the CMOS technology.
Because of its simplicity for use, the passive RFID
system has been used for many years in various RF
remote sensing applications. Specifically in access
control and animal tracking applications.
FIGURE 1:
SIMPLE CONFIGURATION OF
RFID SYSTEMS
RF
Energizing/Command
Signal
Reader
(Interrogator)
Backscattering
Data Signal
Passive
RFID
Tag
RS-232
Host
Computer
DS00680C-page 1
TAG
Tag consists of a silicon device and antenna circuit.
The purpose of the antenna circuit is to induce an energizing signal and to send a modulated RF signal. The
read range of tag largely depends upon the antenna
circuit and size.
The antenna circuit of tag is made of LC resonant
circuit or E-field dipole antenna, depending on the
carrier frequency. The LC resonant circuit is used for
the frequency of less than 100 MHz. In this frequency
band, the communication between the reader and tag
takes place with magnetic coupling between the two
antennas through the magnetic field. The antenna
utilizing the inductive coupling is often called magnetic
dipole antenna.
The antenna circuit must be designed such a way to
maximize the magnetic coupling between them. This
can be achieved with the following parameters:
a)
b)
c)
When the frequency goes above 100 MHz, the requirement of LC values for its resonant frequency becomes
too small to realize with discrete L and C components.
As frequency increases, the wavelength is getting
shorter. In this case, a true E-field antenna can be
made of a simple conductor that has linear dimension
less than or equivalent to half () the wavelength of the
signal. The antenna that is made of a simple conductor
is called electric dipole antenna. The electric dipole
antenna utilizes surface current that is generated by an
electric field (E-Field). The surface current on the
conductor produces voltage at load. This voltage is
used to energize the silicon device. Relatively simple
antenna structure is formed for the higher frequency
compared to the lower frequency.
DS00680C-page 2
AN680
READ/WRITE RANGE
MODULATION PROTOCOL
CARRIER
The electromagnetic coupling of reader and tag antennas increases using similar size of antenna with higher
Q in both sides. The read range is improved by increasing the carrier frequency. This is due to the gain in the
radiation efficiency of the antenna as the frequency
increases. However, the disadvantage of high
frequency (900 MHz-2.4 GHz) application are shallow
skin depth and narrower antenna beam width. These
cause less penetration and more directional problem,
respectively. Low frequency application, on the other
hand, has advantage in the penetration and directional,
but a disadvantage in the antenna performance.
TABLE 1:
Frequency Bands
Antenna
Components
Read
Range
(typical)
Low Frequency
(125 - 400) kHz
Proximity
(8)
Best
Least
Possible
Proximity
Medium
(15)
Good
Not much
Possible
Long
( > 1 m)
Poor
Very high
Difficult
Line of sight
with long
range
High Frequency
(>900 MHz)
E-field dipole
(a piece of
conductor)
Usability in
Penertration
Orientation
Applications
metal or humid
(skin depth) (Directionality)
(typical)
environment
DS00680C-page 3
9.
BACKSCATTER MODULATION
2.
3.
4.
DATA ENCODING
5.
1.
2.
3.
4.
5.
6.
7.
8.
DS00680C-page 4
2.
AN680
3.
FIGURE 2:
Data
DESCRIPTION
WAVEFORM
SIGNAL
Bit Rate
CLK
Digital Data
Clock Signal
NRZ_L
(Direct)
Biphase_L
(Manchester)
Differential
Biphase_S
DS00680C-page 5
2.
FIGURE 3:
8 cycles = 0
DS00680C-page 6
3.
8 cycles = 0
10 cycles = 1
10 cycles = 1
8 cycles = 0
AN680
FIGURE 4:
Phase
Shift
Phase
Shift
Phase
Shift
Phase
Shift
ANTI-COLLISION
In many existing applications, a single-read RFID tag is
sufficient and even necessary: animal tagging and
access control are examples. However, in a growing
number of new applications, the simultaneous reading
of several tags in the same RF field is absolutely critical: library books, airline baggage, garment and retail
applications are a few.
In order to read multiple tags simultaneously, the tag
and reader must be designed to detect the condition
that more than one tag is active. Otherwise, the tags
will all backscatter the carrier at the same time and the
amplitude-modulated waveforms shown in Figure 3
and Figure 4 would be garbled. This is referred to as a
collision. No data would be transferred to the reader.
The tag/reader interface is similar to a serial bus, even
though the bus travels through the air. In a wired
serial bus application, arbitration is necessary to prevent bus contention. The RFID interface also requires
arbitration so that only one tag transmits data over the
bus at one time.
A number of different methods are in use and in
development today for preventing collisions; most are
patented or patent pending. Yet, all are related to
making sure that only one tag talks (backscatters) at
any one time. See the
MCRF250 (DS21267),
MCRF355/360 (DS21287) and MCRF45X (DS40232)
data sheets for various anti-collision algorithms.
DS00680C-page 7
DS00680C-page 8
MCRF200
125 kHz microID Passive RFID Device
Features:
Package Type
Application:
Low-cost alternative for existing low-frequency
RFID devices
Access control and time attendance
Security systems
Animal tagging
Product identification
Industrial tagging
Inventory control
RF
Signal
Reader
PDIP/SOIC
VA
VB
NC
NC
I/O
VSS
RESET
VCC
Description:
The microID 125 kHz Design Guide is a passive Radio
Frequency Identification (RFID) device for low-frequency applications (100 kHz-400 kHz). The device is
powered by rectifying an incoming RF signal from the
reader. The device requires an external LC resonant
circuit to receive the incoming RF signal and to send
data. The device develops a sufficient DC voltage for
operation when its external coil voltage reaches
approximately 10 VPP.
This device has a total of 128 bits of user programmable
memory and an additional 12 bits in its configuration
register. The user can manually program the 128 bits of
user memory by using a contactless programmer in a
microID developer kit such as DV103001 or PG103001.
However, in production volume the MCRF200 is
programmed at the factory (Microchip SQTP see
Technical Bulletin TB023). The device is a One-Time
Programmable (OTP) integrated circuit and operates as
a read-only device after programming.
MCRF200
Data
DS21219H-page 9
Coil
Connections
Modulation
Circuit
Modulation
Control
Clock
Generator
VCC
Row
Decode
Memory
Array
Rectifier
VSS
Counter
The configuration register includes options for communication protocol (ASK, FSK, PSK), data encoding
method, data rate, and data length.These options are
specified by customer and factory programmed during
assembly. Because of its many choices of configuration
options, the device can be easily used as an alternative
or second source for most of the existing low frequency
passive RFID devices available today.
The device has a modulation transistor between the
two antenna connections (VA and VB). The modulation
transistor damps or undamps the coil voltage when it
sends data. The variation of coil voltage controlled by
the modulation transistor results in a perturbation of
voltage in reader antenna coil. By monitoring the
changes in reader coil voltage, the data transmitted
from the device can be reconstructed.
DS21219H-page 10
Column
Decode
MCRF200
1.0
ELECTRICAL CHARACTERISTICS
NOTICE: Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to
the device. This is a stress rating only and functional operation of the device at those or any other conditions
above those indicated in the operational listings of this specification is not implied. Exposure to maximum rating
conditions for extended periods may affect device reliability.
TABLE 1-1:
AC AND DC CHARACTERISTICS
Sym
Min
Typ
Max
Units
Clock frequency
FCLK
100
400
kHz
TWC
sec
200
Years
50
Data retention
Coil current (Dynamic)
Operating current
Turn-on-voltage (Dynamic) for
modulation
Input Capacitance
ICD
Conditions
For all 128-bit array
at 25C
A
A
IDD
VAVB
10
VPP
VCC
VDC
CIN
pF
VCC = 2V
Between VA and VB
DS21219H-page 11
FUNCTION DESCRIPTION
2.1.2
2.1
2.1.3
RF Front-End
RECTIFIER AC CLAMP
FIGURE 2-1:
CLOCK GENERATOR
2.1.4
2.1.1
POWER-ON RESET
MODULATION CIRCUIT
Modulation
Transistor
VB
Amplitude
Modulation Signal
Modulated RF Signal
(across VA and VB)
DS21219H-page 12
MCRF200
2.2
2.2.1
2.2.2
This logic acts upon the serial data being read from the
EEPROM. The logic encodes the data according to the
configuration bits CB6 and CB7. CB6 and CB7
determine the data encoding method. The available
choices are:
2.2.3
MODULATION OPTION
ASK
FSK
PSK_1
PSK_2
b)
FIGURE 2-2:
Encoded Data 1
5 cycles (HI)
5 cycles (LO)
40 RF cycles
Encoded Data 0
4 cycles (HI)
4 cycles (LO)
40 RF cycles
DS21219H-page 13
Encoded Data
(NRZ_L)
PP
PP
PSK_ 1
Change on Data
PP
P
P
2.2.4
PP
2.3
Memory Section
2.3.1
PSK _2
Change on 1
PP
EXAMPLE 2-2:
00A CONFIGURATION
CB11=0
CB10=0
CB9=0
CB8=0
CB7=0
CB6=0
CB5=0
CB4=1
CB3=0
CB2=1
CB1=0
EXAMPLE 2-3:
MCRF200
CONFIGURATION FOR
FDX-B ISO ANIMAL
STANDARD PROTOCOL
(ASP)
2.4
Examples of Configuration
Settings
EXAMPLE 2-1:
08D CONFIGURATION
Modulation = ASK
Data encoding = Differential biphase
Baud rate = rf/32 = 4 Kbits/sec for 128 kHz
Memory size = 128 bits
Referring to Table 2-4, the equivalent MCRF200
configuration is: 14D.
08D 0000-1000-1101
Referring to Table 2-4, the 08D configuration
represents:
Modulation = PSK_1
PSK rate = rf/2
Data encoding = NRZ_L (direct)
Baud rate = rf/32 = MOD32
Memory size 128 bits
DS21219H-page 14
MCRF200
TABLE 2-4:
CONFIGURATION REGISTER
CB12 CB11 CB10 CB9 CB8 CB7 CB6 CB5 CB4 CB3 CB2 CB1
MEMORY SIZE
CB1 = 1 128-bit user memory array
CB1 = 0 96-bit user memory array
BAUD RATE
CB2
CB3
CB4
Rate
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
MOD128
MOD100
MOD80
MOD32
MOD64
MOD50
MOD40
MOD16
SYNC WORD
CB5 = 0 (Always)
DATA ENCODING
CB6 = 0; CB7 = 0 NRZ_L (Direct)
CB6 = 0; CB7 = 1 Biphase_S (Differential)
CB6 = 1; CB7 = 0 Biphase_L (Manchester)
CB6 = 1; CB7 = 1 (Inverted Manchester)
MODULATION OPTIONS
CB8 = 0; CB9 = 0 FSK 0 = Fc/8, 1 = Fc/10
CB8 = 0; CB9 = 1 Direct (ASK)
CB8 = 1; CB9 = 0 PSK_1
(phase change on change of data)
CB8 = 1; CB9 = 1 PSK_2
(phase change at beginning of a one)
DS21219H-page 15
MODES OF OPERATION
3.2
3.1
Native Mode
Read Mode
FIGURE 3-1:
From
Reader
2.5 mH
648 pF
Input capacitance: 2 pF
125 kHz
Pad VA
L
C
Pad VB
To Reader
amplifier/filter
MCRF200
Data
C
1
f res = ------------------- = 125 kHz
2 LC
DS21219H-page 16
MCRF200
4.0
CONTACTLESS
PROGRAMMING
RF power-up signal.
Short gap (absence of RF field).
Verify signal (continuous RF signal).
Programming signal.
Device response with programmed data.
DS21219H-page 17
DS21219H-page 18
~ 50 - 100 s
0V
80 - 180 s
13.5 1 VPP
(R5)
Verify
FSK Signal
13.5 1 VPP
Gap
Note:
Bit 3
128 bits
30 2 VPP
(R7)
High-Power
Signal
Low-Power
Signal
13.5 1 VPP
(R5)
Bit 2
Bit 1
Program
FIGURE 4-1:
Power-up
MCRF200
5.0
MECHANICAL
SPECIFICATIONS FOR DIE
AND WAFER
FIGURE 5-1:
DIE PLOT
Device Test Only
VSS
VCC
RESET
I/O
TABLE 5-1:
Pad
Name
Pad
Width
Pad
Height
Pad
Pad
Center X Center Y
VA
90.0
90.0
427.50
-734.17
VB
90.0
90.0
-408.60
-734.17
TABLE 5-2:
Name
VA
VB
VSS
VCC
RESET
I/O
VB
VA
DS21219H-page 19
Min
Typ
Max
Unit
3.5 x 3.5
89 x 89
mil
m
Note 1, Note 2
7
177.8
mil
m
11
279.4
mil
m
Unsawed wafer
(option = W) Note 3
1
25.4
mil
m
0.9050
Note 4
Die Size:
Die size X*Y before saw (step size)
Die size X*Y after saw
44.15 x 68.44
42.58 x 66.87
mil
mil
Note 1:
2:
3:
4:
5:
Comments
The bond pad size is that of the passivation opening. The metal overlaps the bond pad passivation by at
least 0.1 mil.
Metal Pad Composition is 98.5% Aluminum with 1% Si and 0.5% Cu.
As the die thickness decreases, susceptibility to cracking increases. It is recommended that the die be as
thick as the application will allow.
The Die Passivation thickness (0.905 m) can vary by device depending on the mask set used. The
passivation is formed by:
- Layer 1: Oxide (undoped oxide 0.135 m)
- Layer 2: PSG (doped oxide, 0.43 m)
- Layer 3: Oxynitride (top layer, 0.34 m)
The conversion rate is 25.4 m/mil.
Notice: Extreme care is urged in the handling and assembly of die products since they are susceptible to
mechanical and electrostatic damage.
TABLE 5-4:
Min
Typ
Max
Unit
Wafer Diameter
inch
80
14,000
die
Batch size
24
wafer
DS21219H-page 20
Comments
150 mm
MCRF200
6.0
7.0
WAFER DELIVERY
DOCUMENTATION
8.0
DS21219H-page 21
PACKAGING INFORMATION
9.1
MCRF200
XXXXXNNN
0025
XXXXXXXX
XXXXXNNN
YYWW
Legend:
Note:
XX...X
Y
YY
WW
NNN
Example:
Example:
MCRF200
XXX0025
NNN
In the event the full Microchip part number cannot be marked on one line, it will
be carried over to the next line thus limiting the number of available characters
for customer specific information.
Standard device marking consists of Microchip part number, year code, week code, and traceability
code.
DS21219H-page 22
MCRF200
8-Lead Plastic Dual In-line (P) 300 mil (PDIP)
E1
D
2
n
A2
A1
B1
p
eB
UNITS
DIMENSION LIMITS
Number of Pins
Pitch
Top to Seating Plane
Molded Package Thickness
Base to Seating Plane
Shoulder to Shoulder Width
Molded Package Width
Overall Length
Tip to Seating Plane
Lead Thickness
Upper Lead Width
Lower Lead Width
Overall Row Spacing
MIN
n
p
A
A2
A1
E
E1
D
L
c
B1
B
eB
.140
.115
.015
.300
.240
.360
.125
.008
.045
.014
.310
5
5
INCHES*
NOM
8
.100
.155
.130
.313
.250
.373
.130
.012
.058
.018
.370
10
10
MAX
.170
.145
.325
.260
.385
.135
.015
.070
.022
.430
15
15
MILLIMETERS
NOM
8
2.54
3.56
3.94
2.92
3.30
0.38
7.62
7.94
6.10
6.35
9.14
9.46
3.18
3.30
0.20
0.29
1.14
1.46
0.36
0.46
7.87
9.40
10
5
10
5
MIN
MAX
4.32
3.68
8.26
6.60
9.78
3.43
0.38
1.78
0.56
10.92
15
15
Notes:
Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MS-001
Drawing No. C04-018
DS21219H-page 23
E
E1
D
2
B
45
c
A2
UNITS
DIMENSION LIMITS
Number of Pins
Pitch
Overall Height
Molded Package Thickness
Standoff
Overall Width
Molded Package Width
Overall Length
Chamfer Distance
Foot Length
Foot Angle
Lead Thickness
Lead Width
Mold Draft Angle Top
Mold Draft Angle Bottom
* Controlling Parameter
Significant Characteristic
MIN
n
p
A
A2
A1
E
E1
D
h
L
c
B
.053
.052
.004
.228
.146
.189
.010
.019
0
.008
.013
0
0
A1
INCHES*
NOM
8
.050
.061
.056
.007
.237
.154
.193
.015
.025
4
.009
.017
12
12
MAX
.069
.061
.010
.244
.157
.197
.020
.030
8
.010
.020
15
15
MILLIMETERS
NOM
8
1.27
1.35
1.55
1.32
1.42
.10
.18
5.79
6.02
3.71
3.91
4.80
4.90
.25
.38
.48
.62
0
4
.20
.23
.33
.42
0
12
0
12
MIN
MAX
1.75
1.55
.25
6.20
3.99
5.00
.51
.76
8
.25
.51
15
15
Notes:
Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MS-012
Drawing No. C04-057
DS21219H-page 24
MCRF200
1M/3M COB (IOA2)
MCRF200 COB
8 mm
5 mm
Thickness = 0.4 mm
DS21219H-page 25
/XX
Device
Temperature
Range
Package
XXX
Configuration/SQTP code
Examples:
a)
Device
b)
Temperature Range
= -40C to
+85C
(Industrial)
CB12 CB11 CB10 CB9 CB8 CB7 CB6 CB5 CB4 CB3 CB2 CB1
0
0
0
0
0
0
0
0
1
0
1
0
Package
WF
W
S
P
SN
1M
=
=
=
=
=
=
3M
Configuration
Three-digit HEX value to be programmed into the configuration register. Three HEX characters correspond to 12 binary
bits. These bits are programmed into the configuration
register MSB first (CB12, CB11...CB1). Refer to example.
SQTP Code
Please specify which device, revision of silicon and Data Sheet (include Literature #) you are using.
New Customer Notification System
Register on our web site (www.microchip.com/cn) to receive the most current information on our products.
DS21219H-page 26
MCRF250
125 kHz microID Passive RFID Device with Anti-Collision
Features:
Factory programming
(SQTPSM)
Package Type
and
memory
serialization
Applications:
MCRF250
PDIP/SOIC
VA
VB
NC
NC
I/O
VSS
Reset
VCC
Description:
The MCRF250 is equipped with an anti-collision
feature that allows multiple tags in the same field to be
read simultaneously. This revolutionary feature
eliminates the issue of data corruption due to
simultaneous transmissions from multiple tags.
The microID 125 kHz Design Guide is a passive Radio
Frequency Identification (RFID) device for low frequency applications (100 kHz-400 kHz). The device is
powered by rectifying an incoming RF signal from a
reader interrogator. The device requires an external LC
resonant circuit to receive the incoming energizing
signal and to send data. The device develops a
sufficient DC voltage for operation when its external
coil voltage reaches approximately 10 VPP.
This device has a total of 128 bits of user programmable memory and an additional 12 bits in its configuration
register. The user can manually program the 128 bits of
user memory by using a contactless programmer in a
microID developer kit such as DV103001 or
PG103001. However, in production volume the
MCRF250 is programmed at the factory (Microchip
SQTP see Technical Bulletin TB023).The device is a
One-Time Programmable (OTP) integrated circuit and
operates as a read-only device after programming.
Data
DS21267F-page 27
Coil
Connections
Clock
Generator
Load
VCC
Data
Row
Decode
Memory
Array
Rectifier
VSS
Counter
Column
Decode
The configuration register includes options for communication protocol (ASK, FSK, PSK), data encoding
method, data rate and data length.These options are
specified by customer and are factory programmed
during production.
The device has a modulation transistor between the
two antenna connections (VA and VB). The modulation
transistor damps or undamps the coil voltage when it
sends data. The variation of coil voltage controlled by
the modulation transistor results in a perturbation of
voltage in reader antenna coil. By monitoring the
changes in reader coil voltage, the data transmitted
from the device can be reconstructed.
The device is available in die, wafer, Chip-on-Board
(COB) modules, PDIP or SOIC packages. Factory
programming and memory serialization (SQTP) are
also available upon request. See TB023 for more
information on contact programming support.
The DV103002 Developers Kit includes Contactless
Programmer, MCRF250 Anti-Collision FSK reference
reader, and reference design guide. The reference
design guide includes schematics for readers and
contactless programmer as well as in-depth
documentation for antenna circuit designs.
DS21267F-page 28
MCRF250
1.0
ELECTRICAL CHARACTERISTICS
TABLE 1-1:
AC AND DC CHARACTERISTICS
Sym
Min
Typ
Max
Units
Clock frequency
FCLK
100
400
kHz
TWC
sec
200
Years
50
Data retention
Coil current (Dynamic)
Operating current
Turn-on-voltage (Dynamic) for
modulation
Input Capacitance
ICD
Conditions
For all 128-bit array
at 25C
A
A
IDD
VAVB
10
VPP
VCC
VDC
CIN
pF
VCC = 2V
Between VA and VB
DS21267F-page 29
FUNCTIONAL DESCRIPTION
2.1
2.1.3
2.1.4
RF Front-End
RECTIFIER AC CLAMP
2.1.2
POWER-ON RESET
IRQ DETECTOR
2.1.5
2.1.1
CLOCK GENERATOR
MODULATION CIRCUIT
FIGURE 2-1:
Modulation
Transistor
VB
Amplitude
Modulation Signal
Modulated RF Signal
(across VA and VB)
DS21267F-page 30
MCRF250
2.2
2.2.1
2.2.2
This logic acts upon the serial data being read from the
EEPROM. The logic encodes the data according to the
configuration bits CB6 and CB7. CB6 and CB7
determine the data encoding method. The available
choices are:
2.2.3
MODULATION OPTION
ASK
FSK
PSK_1
PSK_2
b)
FIGURE 2-2:
Encoded Data 1
5 cycles (HI)
5 cycles (LO)
40 RF cycles
Encoded Data 0
4 cycles (HI)
4 cycles (LO)
40 RF cycles
DS21267F-page 31
Encoded Data
(NRZ_L)
PP
PP
PSK_ 1
Change on Data
PP
P
PSK _2
Change on 1
PP
2.2.4
PP
2.3
Memory Section
2.3.1
2.4
Examples of Configuration
Settings
EXAMPLE 2-1:
48D CONFIGURATION
EXAMPLE 2-2:
40A CONFIGURATION
CB11=1
CB10=0
CB9=0
CB8=0
CB7=0
CB6=0
CB5=0
CB4=1
CB3=0
CB2=1
CB1=0
DS21267F-page 32
MCRF250
TABLE 2-1:
CONFIGURATION REGISTER
CB12 CB11 CB10 CB9 CB8 CB7 CB6 CB5 CB4 CB3 CB2 CB1
MEMORY SIZE
CB1 = 1 128-bit user memory array
CB1 = 0 96-bit user memory array
BAUD RATE
CB2
CB3
CB4
Rate
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
MOD128
MOD100
MOD80
MOD32
MOD64
MOD50
MOD40
MOD16
SYNC WORD
CB5 = 0 (Always)
DATA ENCODING
CB6 = 0; CB7 = 0 NRZ_L (Direct)
CB6 = 0; CB7 = 1 Biphase_S (Differential)
CB6 = 1; CB7 = 0 Biphase_L (Manchester)
CB6 = 1; CB7 = 1 (Inverted Manchester)
MODULATION OPTIONS
CB8 = 0; CB9 = 0 FSK 0 = Fc/8, 1 = Fc/10
CB8 = 0; CB9 = 1 Direct (ASK)
CB8 = 1; CB9 = 0 PSK_1
(phase change on change of data)
CB8 = 1; CB9 = 1 PSK_2
(phase change at beginning of a one)
DS21267F-page 33
MODES OF OPERATION
3.2
3.1
Native Mode
Read Mode
FIGURE 3-1:
From
Reader
4.05 mH
390 pF
Input capacitance: 2 pF
125 kHz
Pad VA
L
Pad VB
To Reader
amplifier/filter
MCRF250
Data
C
1
f res = ------------------- = 125 kHz
2 LC
DS21267F-page 34
MCRF250
4.0
CONTACTLESS
PROGRAMMING
RF Power-up signal.
Short gap (absence of RF field).
Verify signal (continuous RF signal).
Programming signal.
Device response with programmed data.
DS21267F-page 35
DS21267F-page 36
~ 50 - 100 s
0V
80 - 180 s
13.5 1 VPP
(R5)
VERIFY
FSK Signal
13.5 1 VPP
GAP
Note:
Bit 3
128 bits
30 2 VPP
(R7)
High-Power
Signal
Low-Power
Signal
13.5 1 VPP
(R5)
Bit 2
Bit 1
PROGRAM
FIGURE 4-1:
POWER-UP
MCRF250
5.0
ANTI-COLLISION
FIGURE 5-1:
ANTI-COLLISION FLOW
CHART
Begin
3.
4.
Provide Gap*
Is
modulation
present?
No
Yes
Is
only one tag
modulating?
No
Yes
Read Tag
Note:
DS21267F-page 37
MECHANICAL
SPECIFICATIONS FOR DIE
AND WAFER
FIGURE 6-1:
DIE PLOT
Device Test Only
Vss
Vcc
Reset
TABLE 6-1:
Passivation
Openings
Pad
Name
Pad
Width
Pad
Height
Pad
Center
X
Pad
Center
Y
VA
90.0
90.0
427.50
-734.17
VB
90.0
90.0
-408.60
-734.17
I/O
Note 1:
2:
TABLE 6-2:
Name
VA
VB
VSS
VCC
Reset
I/O
VB
DS21267F-page 38
VA
MCRF250
TABLE 6-3:
Min
Typ
Max
Unit
3.5 x 3.5
89 x 89
mil
m
Note 1, Note 2
7
177.8
mil
m
11
279.4
mil
m
Unsawed wafer
(option = W) Note 3
1
25.4
mil
m
0.9050
Note 4
Die Size:
Die size X*Y before saw (step size)
Die size X*Y after saw
44.15 x 68.44
42.58 x 66.87
mil
mil
Note 1:
2:
3:
4:
5:
Comments
The bond pad size is that of the passivation opening. The metal overlaps the bond pad passivation by at
least 0.1 mil.
Metal Pad Composition is 98.5% Aluminum with 1% Si and 0.5% Cu.
As the die thickness decreases, susceptibility to cracking increases. It is recommended that the die be as
thick as the application will allow..
The Die Passivation thickness can vary by device depending on the mask set used:
- Layer 1: Oxide (undopped oxide, 0.135 m)
- Layer 2: PSG (dopped oxide, 0.43 m)
- Layer 3: Oxynitride (top layer, 0.34 m)
The conversion rate is 25.4 m/mil.
Notice: Extreme care is urged in the handling and assembly of die products since they are susceptible to
mechanical and electrostatic damage.
TABLE 6-4:
Min
Typ
Max
Unit
Wafer Diameter
inch
80
14,000
die
Batch size
24
wafer
Comments
150 mm
DS21267F-page 39
8.0
WAFER DELIVERY
DOCUMENTATION
DS21267F-page 40
9.0
MCRF250
10.0
PACKAGING INFORMATION
10.1
MCRF250
XXXXXNNN
0025
XXXXXXXX
XXXXXNNN
YYWW
Legend:
Note:
XX...X
Y
YY
WW
NNN
Example:
Example:
MCRF250
XXX0025
NNN
In the event the full Microchip part number cannot be marked on one line, it will
be carried over to the next line thus limiting the number of available characters
for customer specific information.
Standard device marking consists of Microchip part number, year code, week code, and traceability
code.
DS21267F-page 41
E1
D
2
n
A2
A1
B1
p
eB
UNITS
DIMENSION LIMITS
Number of Pins
Pitch
Top to Seating Plane
Molded Package Thickness
Base to Seating Plane
Shoulder to Shoulder Width
Molded Package Width
Overall Length
Tip to Seating Plane
Lead Thickness
Upper Lead Width
Lower Lead Width
Overall Row Spacing
MIN
n
p
A
A2
A1
E
E1
D
L
c
B1
B
eB
.140
.115
.015
.300
.240
.360
.125
.008
.045
.014
.310
5
5
INCHES*
NOM
8
.100
.155
.130
.313
.250
.373
.130
.012
.058
.018
.370
10
10
MAX
.170
.145
.325
.260
.385
.135
.015
.070
.022
.430
15
15
MILLIMETERS
NOM
8
2.54
3.56
3.94
2.92
3.30
0.38
7.62
7.94
6.10
6.35
9.14
9.46
3.18
3.30
0.20
0.29
1.14
1.46
0.36
0.46
7.87
9.40
10
5
10
5
MIN
MAX
4.32
3.68
8.26
6.60
9.78
3.43
0.38
1.78
0.56
10.92
15
15
Notes:
Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MS-001
Drawing No. C04-018
DS21267F-page 42
MCRF250
8-Lead Plastic Small Outline (SN) Narrow, 150 mil (SOIC)
E
E1
D
2
B
45
c
A2
UNITS
DIMENSION LIMITS
Number of Pins
Pitch
Overall Height
Molded Package Thickness
Standoff
Overall Width
Molded Package Width
Overall Length
Chamfer Distance
Foot Length
Foot Angle
Lead Thickness
Lead Width
Mold Draft Angle Top
Mold Draft Angle Bottom
* Controlling Parameter
Significant Characteristic
MIN
n
p
A
A2
A1
E
E1
D
h
L
c
B
.053
.052
.004
.228
.146
.189
.010
.019
0
.008
.013
0
0
A1
INCHES*
NOM
8
.050
.061
.056
.007
.237
.154
.193
.015
.025
4
.009
.017
12
12
MAX
.069
.061
.010
.244
.157
.197
.020
.030
8
.010
.020
15
15
MILLIMETERS
NOM
8
1.27
1.35
1.55
1.32
1.42
.10
.18
5.79
6.02
3.71
3.91
4.80
4.90
.25
.38
.48
.62
0
4
.20
.23
.33
.42
0
12
0
12
MIN
MAX
1.75
1.55
.25
6.20
3.99
5.00
.51
.76
8
.25
.51
15
15
Notes:
Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed
.010 (0.254mm) per side.
JEDEC Equivalent: MS-012
Drawing No. C04-057
DS21267F-page 43
MCRF250 COB
8 mm
5 mm
Thickness = 0.4 mm
DS21267F-page 44
MCRF250
PRODUCT IDENTIFICATION SYSTEM
To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office.
PART NO.
-X
/XXX
Device
Temperature
Range
XXX
Device:
Temperature Range:
Package:
WF
W
S
P
SN
Configuration:
Three-digit hex value to be programmed into the configuration register. Three hex characters correspond to 12 binary
bits. These bits are programmed into the configuration
register MSB first (CB12, CB11...CB1). Refer to example.
SQTP Code:
-40C to +85C
=
=
=
=
=
Examples:
a)
b)
Please specify which device, revision of silicon and Data Sheet (include Literature #) you are using.
New Customer Notification System
Register on our web site (www.microchip.com/cn) to receive the most current information on our products.
DS21267F-page 45
DS21267F-page 46
TB023
Serialized Quick Turn ProgrammingSM (SQTPSM)
INTRODUCTION
DEFINITIONS
First, the configuration register code must be
determined in order to configure the following operation
options of the MCRF200, MCRF202 and MCRF250
(refer to individual data sheets DS21219, DS21308 and
DS21267 respectively):
Bit rate
Modulation
Encoding
NRZ_L
(Direct),
(Manchester),
Biphase_S
Code length
Biphase_L
Differential
FILE SPECIFICATION
FIGURE 1:
FILE0000.TXT
0000001 A34953DBCA001F26
0000002 C4F55308B492A783
0000003 38FAC359981200B7
"
"
1234567 9278256DCAFE8756
ID Code
Series Number
Next Code
FILE0001.TXT
1234568 EA43786937DCFB87
1234569 459724FCA487ED24
"
"
"
"
Code File
Last Code
Carriage Return
Space Necessary
DS91023B-page 47
DS91023B-page 48
AN710
Antenna Circuit Design for RFID Applications
Author:
INTRODUCTION
EQUATION 1:
o I
B = --------- ( cos 2 cos 1 )
4r
where:
I = current
r = distance from the center of wire
0 = permeability of free space and given
as 4 x 10-7 (Henry/meter)
In a special case with an infinitely long wire where:
1 = -180
2 = 0
Equation 1 can be rewritten as:
EQUATION 2:
o I
B = --------2r
( Weber m )
Wire
2
dL
1
0
( Weber m )
P
X
DS00710C-page 49
EQUATION 3:
2
o INa
B z = --------------------------------2
2 32
2(a + r )
coil
o INa
1
------------------ ----3-
2
r
for r >>a
where
R
r
y
I = current
Bz
a = radius of loop
r = distance from the center of loop
0 = permeability of free space and given as
4 x 10-7 (Henry/meter)
The above equation indicates that the magnetic field
strength decays with 1/r3. A graphical demonstration is
shown in Figure 3. It has maximum amplitude in the
plane of the loop and directly proportional to both the
current and the number of turns, N.
P
z
V = Vo sin t
DS00710C-page 50
AN710
INDUCED VOLTAGE IN AN ANTENNA
COIL
Faradays law states that a time-varying magnetic field
through a surface bounded by a closed path induces a
voltage around the loop.
EQUATION 5:
= B dS
where:
B = magnetic field given in Equation 2
Figure 4 shows a simple geometry of an RFID application. When the tag and reader antennas are in close
proximity, the time-varying magnetic field B that is
produced by a reader antenna coil induces a voltage
(called electromotive force or simply EMF) in the closed
tag antenna coil. The induced voltage in the coil causes
a flow of current on the coil. This is called Faradays
law. The induced voltage on the tag antenna coil is
equal to the time rate of change of the magnetic flux .
EQUATION 4:
d
dt
V = N ------where:
Tag Coil
V = V0sin(t)
Tag
B = B0sin(t)
I = I0sin(t)
Reader
Electronics
Tuning Circuit
Reader Coil
DS00710C-page 51
EQUATION 8:
V 0 = 2fNSQBo cos
EQUATION 6:
d 21
d
V = N2 ------------- = N 2 ----- ( B dS )
dt
dt
d
= N 2 ----dt
o i1 N1 a
- dS
--------------------------------2
2 32
2(a + r )
2
o N 1 N2 a ( b )
---------------------------------------2
2 32
2(a + r )
where:
f = frequency of the arrival signal
N = number of turns of coil in the loop
S = area of the loop in square meters (m2)
Q = quality factor of circuit
di 1
------dt
di 1
= M ------dt
where:
V = voltage in the tag coil
i1 = current on the reader coil
a = radius of the reader coil
B-field
a
Tag
EQUATION 7:
2
o N 1 N2 ( ab )
M = ------------------------------------2
2 32
2(a + r )
The above equation is equivalent to a voltage transformation in typical transformer applications. The current
flow in the primary coil produces a magnetic flux that
causes a voltage induction at the secondary coil.
DS00710C-page 52
AN710
EXAMPLE 1:
CALCULATION OF B-FIELD IN
A TAG COIL
EXAMPLE 3:
EQUATION 11:
EQUATION 9:
3
--2 2
(a + r )
NI = K -----------------------2
a
Vo = 2fNSQB o cos = 4
and
4 ( 2)
B o = ----------------------------------- = 0.0449
2fNSQ cos
( wbm )
Q of tag antenna =
coil
40
AC coil voltage to =
turn on the tag
4 VPP
cos =
EXAMPLE 2:
2 12
2 32
2 12
EQUATION 10:
EQUATION 12:
a=
2r
where:
a =
radius of coil
r =
read range.
2 32
2Bz ( a + r )
( NI ) rms = ------------------------------2
a
d ( NI )
3 2 ( a + r ) ( 2a ) 2a ( a + r )
-------------- = K --------------------------------------------------------------------------------------------------4
da
a
( a 2r ) ( a + r )
= K ------------------------------------------------------3
a
13.56 MHz
Number of turns =
2Bz
K = --------o
where:
2 32
DS00710C-page 53
EQUATION 14:
1
= ----------------f
EQUATION 13:
DC Resistance of Wire
l
l
RDC = ------ = ------------2S
a
where:
f = frequency
= permeability (F/m) = r
o = Permeability of air = 4 x 10-7 (h/m)
r = 1 for Copper, Aluminum, Gold, etc
= 4000 for pure Iron
= Conductivity of the material (mho/m)
= 5.8 x 107 (mho/m) for Copper
= 3.82 x 107 (mho/m) for Aluminum
()
where:
a = radius of wire
EXAMPLE 4:
The skin depth for a copper wire at 13.56 MHz and
125 kHz can be calculated as:
EQUATION 15:
For a The resistance must be kept small as possible for
higher Q of antenna circuit. For this reason, a larger
diameter coil as possible must be chosen for the RFID
circuit. Table 5 shows the diameter for bare and
enamel-coated wires, and DC resistance.
AC Resistance of Conductor
At DC, charge carriers are evenly distributed through
the entire cross section of a wire. As the frequency
increases, the magnetic field is increased at the center
of the inductor. Therefore, the reactance near the
center of the wire increases. This results in higher
impedance to the current density in the region. Therefore, the charge moves away from the center of the
wire and towards the edge of the wire. As a result, the
current density decreases in the center of the wire and
increases near the edge of the wire. This is called a
skin effect. The depth into the conductor at which the
current density falls to 1/e, or 37% (= 0.3679) of its
value along the surface, is known as the skin depth and
is a function of the frequency and the permeability and
conductivity of the medium. The net result of skin effect
is an effective decrease in the cross sectional area of
the conductor. Therefore, a net increase in the AC
resistance of the wire. The skin depth is given by:
DS00710C-page 54
1
= -----------------------------------------------------------------------7
7
f ( 4 10 ) ( 5.8 10 )
0.0661
= -----------------f
( m)
= 0.018 ( mm )
= 0.187 ( mm )
AN710
EQUATION 16:
l
l
R ac = -------------------- ----------------A active 2a
l f
= ------ ------2a
()
()
a
= ( R dc ) -----2
EQUATION 18:
( )
Rlow
freq
l
1 a 2
------------2- 1 + ------ ---
48
a
()
EQUATION 17:
l
R ac = ----------------------- ( w + t )
l
f
= ---------------- --------(w + t)
()
DS00710C-page 55
Wire
Size
(AWG)
Dia. in
Mils
(bare)
Dia. in
Mils
(coated)
Ohms/
1000 ft.
289.3
0.126
287.6
0.156
229.4
0.197
204.3
0.249
181.9
0.313
162.0
0.395
166.3
0.498
128.5
131.6
0.628
114.4
116.3
0.793
10
101.9
106.2
0.999
11
90.7
93.5
1.26
12
80.8
83.3
1.59
13
72.0
74.1
2.00
14
64.1
66.7
2.52
15
57.1
59.5
3.18
16
50.8
52.9
4.02
17
45.3
47.2
5.05
18
40.3
42.4
6.39
19
35.9
37.9
8.05
20
32.0
34.0
10.1
21
28.5
30.2
12.8
22
25.3
28.0
16.2
23
22.6
24.2
20.3
24
20.1
21.6
25.7
25
17.9
19.3
32.4
DS00710C-page 56
Wire
Size
(AWG)
Dia. in
Mils
(bare)
Dia. in
Mils
(coated)
Ohms/
1000 ft.
26
15.9
17.2
41.0
27
14.2
15.4
51.4
28
12.6
13.8
65.3
29
11.3
12.3
81.2
30
10.0
11.0
106.0
31
8.9
9.9
131
32
8.0
8.8
162
33
7.1
7.9
206
34
6.3
7.0
261
35
5.6
6.3
331
36
5.0
5.7
415
37
4.5
5.1
512
38
4.0
4.5
648
39
3.5
4.0
847
40
3.1
3.5
1080
41
2.8
3.1
1320
42
2.5
2.8
1660
43
2.2
2.5
2140
44
2.0
2.3
2590
45
1.76
1.9
3350
46
1.57
1.7
4210
47
1.40
1.6
5290
48
1.24
1.4
6750
49
1.11
1.3
8420
50
0.99
1.1
10600
AN710
INDUCTANCE OF VARIOUS
ANTENNA COILS
EQUATION 20:
2l 3
L = 0.002l log ---e a- -4
(Henry)
( H )
where:
l and a = length and radius of wire in cm,
respectively.
EXAMPLE 6:
EQUATION 19:
N
L = -------I
INDUCTANCE CALCULATION
FOR A STRAIGHT WIRE:
EQUATION 21:
where:
N = number of turns
I = current
= the magnetic flux
For a coil with multiple turns, the inductance is greater
as the spacing between turns becomes smaller. Therefore, the tag antenna coil that has to be formed in a
limited space often needs a multilayer winding to
reduce the number of turns.
2 ( 304.8 ) 3
L = 0.002 ( 304.8 ) ln --------------------- 0.1 - --4= 0.60967 ( 7.965 )
= 4.855 ( H )
Calculation of Inductance
Inductance of the coil can be calculated in many
different ways. Some are readily available from
references[1-7]. It must be remembered that for RF
coils the actual resulting inductance may differ from the
calculated true result because of distributed capacitance. For that reason, inductance calculations are
generally used only for a starting point in the final
design.
DS00710C-page 57
N-turns coil
b
a
EQUATION 22:
a
16a
L = 0.01257 ( a ) 2.303log 10 ---------- 2
d
( H )
h
b
where:
a = mean radius of loop in (cm)
Figure 8 shows an N-turn inductor of circular coil with
multilayer. Its inductance is calculated by:
EQUATION 24:
2
0.31 ( aN )
L = -----------------------------------6a + 9h + 10b
( H )
where:
a = average radius of the coil in cm
N = number of turns
b = winding thickness in cm
h = winding height in cm
EQUATION 23:
2
( aN )
L = ----------------------------------22.9a + 25.4l
( H )
where:
N = number of turns
l = length in cm
a = the radius of coil in cm
DS00710C-page 58
AN710
INDUCTANCE OF SPIRAL WOUND COIL WITH
SINGLE LAYER
EQUATION 25:
EQUATION 26:
( 0.3937 ) ( aN )
L = -------------------------------------8a + 11b
( H )
2
a
b+c
L = 0.008aN 2.303log ------------ + 0.2235 ------------ + 0.726 ( H )
10 b + c
a
where:
N = number of turns
a = side of square measured to the center of
the rectangular cross section of winding
b = winding length
c = winding depth as shown in Figure 10
Note:
ri
c
a
ro
where:
a = (ri + ro)/2
b = ro ri
DS00710C-page 59
EQUATION 27:
0.0276 ( CN )
1.908C + 9b + 10h
L = ------------------------------------------------
( H )
where:
N = number of turns
w
C = x + y + 2h
x = width of coil
y = length of coil
b = width of cross section
h = height (coil build up) of cross section
Note:
EQUATION 28:
2l
w + t
L = 0.002l ln ------------ + 0.50049 + ------------
w + t
3l
( H )
where:
w = width in cm
t = thickness in cm
l = length of conductor in cm
h
b
(b) Cross Sectional View
DS00710C-page 60
AN710
INDUCTANCE OF A FLAT SQUARE COIL
Inductance of a flat square coil of rectangular cross
section with N turns is calculated by[2]:
EQUATION 29:
a2
2
2
0.2235
L = 0.0467aN log10 2 ------------ log10 ( 2.414a ) + 0.02032aN 0.914 + ------------------ ( t + w )
a
t + w
where:
L = in H
a = side length in inches
t = thickness in inches
w = width in inches
N = total number of turns
DS00710C-page 61
2a
lb
EQUATION 30:
2A
2A
+ l a ln
+ 2 [a + l c (l a + l b )]
L = 4l b ln
a(l b + l c )
a(l a + l c )
(nH )
where
units are all in cm, and a = radius of wire in cm.
lc =
l a + lb
A = la l b
DS00710C-page 62
AN710
INDUCTANCE OF N-TURN PLANAR SPIRAL
COIL
l1
j
EQUATION 31:
LT = Lo M +
( H)
d
p
q
k
where:
l2
LT = Total Inductance
Lo = Sum of self inductances of all straight
segments
M+ = Sum of positive mutual inductances
M- = Sum of negative mutual inductances
The mutual inductance is the inductance that is
resulted from the magnetic fields produced by adjacent
conductors. The mutual inductance is positive when
the directions of current on conductors are in the same
direction, and negative when the directions of currents
are opposite directions. The mutual inductance
between two parallel conductors is a function of the
length of the conductors and of the geometric mean
distance between them. The mutual inductance of two
conductors is calculated by:
EQUATION 32:
( nH )
M = 2lF
EQUATION 34:
1
M j, k = --- { ( M k + p + M k + q ) ( M p + M q ) }
2
1
= --- { ( M j + M k ) M q }
for p = 0
2
1
= --- { ( M j + M k ) M p }
for q = 0
2
= Mk + p Mp
for p = q
(b)
(c)
(d)
for p = q = 0
= Mk
(a)
EQUATION 33:
l
l 2
F = ln --- + 1 + ---
d
d
1 2
2
l-
1 + -
d
12
d
+ ---
l
EQUATION 35:
M k + p = 2l k + p F k + p
where
l k + p 2 1 2
lk + p
F k + p = ln ------------- + 1 + -------------
d j, k
d j, k
d j, k 2 1 2 d j, k
1 + -------------
+ -------------
l k + p
l k + p
DS00710C-page 63
INDUCTANCE OF
RECTANGULAR PLANAR
SPIRAL INDUCTOR
l1
1
13
w
EQUATION 36:
M
l2
16 12 8
6 10 14
= 2 ( M 1, 5 + M 1, 9 + M 1, 13 )
+2 ( M 5, 9 + M 5, 13 + M 9, 13 )
l4
+2 ( M 3, 7 + M 3, 11 + M 3, 15 )
+2 ( M 7, 11 + M 7, 15 + M 11, 15 )
+2 ( M 2, 6 + M 2, 10 + M 2, 14 )
+2 ( M 6, 10 + M 6, 14 + M 10, 14 )
+2 ( M 4, 8 + M 4, 12 + M 4, 16 )
15
+2 ( M 8, 12 + M 8, 16 + M 12, 16 )
11
7
l3
EQUATION 37:
M = 2 ( M 1, 3 + M 1, 7 + M 1, 11 + M 1, 15 )
+2 ( M 5, 3 + M 5, 7 + M 5, 11 + M 5, 15 )
+2 ( M 9, 3 + M 9, 7 + M 9, 11 + M 9, 15 )
+2 ( M 13, 15 + M 13, 11 + M 13, 7 + M 13, 3 )
+2 ( M 2, 4 + M 2, 8 + M 2, 12 + M 2, 16 )
+2 ( M 6, 4 + M 6, 8 + M 6, 12 + M 6, 16 )
+2 ( M 10, 4 + M 10, 8 + M 10, 12 + M 10, 16 )
+2 ( M 14, 4 + M 14, 8 + M 14, 12 + M 14, 16 )
DS00710C-page 64
AN710
EXAMPLE 8: INDUCTANCE CALCULATION
INCLUDING MUTUAL
INDUCTANCE TERMS FOR A
RECTANGULAR SHAPED ONE
TURN READER ANTENNA
Let us calculate the Inductance of one turn loop
etched antenna on PCB board for reader antenna
(for example, the MCRF450 reader antenna in the
DV103006 development kit) with the following
parameters:
l2 = l4 = 10 = 25.4 cm
EQUATION 38:
where
LT = Lo + M + M
( H )
= Lo M
( H )
M+ = 0 since the direction of current on
each segment is opposite with respect
to the currents on other segments.
L o = L 1 + L 1 + L 2 + L 3 + L 4
By solving the self inductance using Equation (28),
( nH )
L 1 = L 1 = 59.8
L 2 = L 4 = 259.7
l3 = 7.436 = 18.887 cm
l1 = l1 = 3 = 7.62
gap = 1.4536 = 3.692 cm
L 3 = 182
( nH )
L 0 = 821
( nH )
( nH )
M = 2 ( M 1, 3 + M 1, 3 + M 2, 4 )
M 2, 4 = 2l2 F 2, 4
1
M 1, 3 = --- ( M 3 + M 1 M 1+gap )
2
1
M 1, 3 = --- ( M 3 + M 1 M 1+gap )
2
l3
1
1
---
-- l
l2
l2 2 2
d 2, 4 2 2
2
F 2, 4 = ln ------------ + 1 + ------------
1 + ------------
+ -----------
d
d
d
l
2
2, 4
2, 4
2, 4
l4
l2
Gap
l1
l1
1
1
----
2 2
2
2
l
l3
l
d
3
1, 3
F3 = ln ------------ + 1 + -----------
+ --------- 1 + -----------
d
d
l
d
1, 3
3
1, 3
1, 3
1
1
----
2 2
2
2
l
l1
l
d
1
1, 3
F1 = ln ------------ + 1 + -----------
+ --------- 1 + -----------
d
d
l
d
1, 3
1
1, 3
1, 3
1
1
---
-- l
l 1
l 1 2 2
d 1, 3 2 2
1
F 1 = ln -------------- + 1 + --------------
1
-------------
+
+ -------------
d 1, 3
d 1, 3
l 1
d 1, 3
M 1 = 2l 1 F 1
M 1 = 2l1 F 1
M 1 + gap = 2l 1 + gap F 1 + gap
1
--
2 2
l
l1
l
1 + gap
1 + gap
F1 + gap = ln ---------------------------- + 1 + ---------------------------
+ -----------d
d
1 + gap, 3
d 1 + gap, 3
1, 3
1
--2
2
d 1 + gap, 3
1 + --------------------------
l 1 + gap
DS00710C-page 65
DS00710C-page 66
AN710
CONFIGURATION OF ANTENNA
CIRCUITS
4.
L
C
C
(secondary coil)
C2
(primary coil)
C1
To reader electronics
(c) Transformer Loop Antenna
DS00710C-page 67
EQUATION 40:
The external circuit must be tuned to the resonant frequency of the reader antenna. In a detuned condition,
a circuit element between the antenna B and VSS pads
is shorted. The frequency difference (delta frequency)
between tuned and detuned frequencies must be
adjusted properly for optimum operation. It has been
found that maximum modulation index and maximum
read range occur when the tuned and detuned frequencies are separated by 3 to 6 MHz.
The tuned frequency is formed from the circuit
elements between the antenna A and VSS pads without
shorting the antenna B pad. The detuned frequency is
found when the antenna B pad is shorted. This detuned
frequency is calculated from the circuit between
antenna A and VSS pads excluding the circuit element
between antenna B and VSS pads.
In Figure 17 (a), the tuned resonant frequency is:
EQUATION 39:
1
fo = ---------------------2 L T C
where:
LT = L1 + L2 + 2LM = Total inductance
between antenna A and VSS pads
1
fdetuned = ---------------------2 L 1 C
In this case, fdetuned is higher than f tuned .
Figure 17(b) shows another example of the external
circuit arrangement. This configuration controls C2 for
tuned and detuned frequencies. The tuned and
untuned frequencies are:
EQUATION 41:
1
ftuned = ----------------------------------------C
1 C2
2 -------------------- L
C 1 + C 2
and
EQUATION 42:
1
fdetuned = ---------------------2 LC 1
A typical inductance of the coil is about a few
microhenry with a few turns. Once the inductance is
determined, the resonant capacitance is calculated
from the above equations. For example, if a coil has an
inductance of 1.3 H, then it needs a 106 pF of
capacitance to resonate at 13.56 MHz.
k L1 L
2
DS00710C-page 68
AN710
CONSIDERATION ON QUALITY
FACTOR Q AND BANDWIDTH OF
TUNING CIRCUIT
EQUATION 43:
fo
Q = ---B
MCRF355
Ant. Pad A
L1
tuned
C
L2
Ant. Pad B
VSS
L1 > L2
= L + L + 2L
1
2
m
where:
Lm
K
mutual inductance
K L1 L2
MCRF355
Ant. Pad A
C1
tuned
f detuned
L
Ant. Pad B
C2
VSS
C1 > C2
1
= ---------------------2 LCT
1
= ---------------------2 LC
1
C1 C2
C T = -------------------C +C
1
2
L1
L2
Ant. Pad A
1
f tuned = ---------------------2 L T C
C = 100 pF
1
f detuned = ---------------------2 L 1 C
Ant. Pad B
VSS
L T = L 1 + L 2 + 2L m
L1 > L2
(c) Two inductors with one internal capacitor
DS00710C-page 69
EQUATION 47:
jL
Z ( j ) = --------------------------------------------- ( )
2
L
( 1 LC ) + j ------R
EQUATION 44:
Bminimum = 140 kHz
The maximum impedance occurs when the denominator in the above equation is minimized. This condition
occurs when:
EQUATION 45:
EQUATION 48:
fo
Qmax = ---- = 96.8
B
In a practical LC resonant circuit, the range of Q for
13.56 MHz band is about 40. However, the Q can be
significantly increased with a ferrite core inductor. The
system designer must consider the above limits for
optimum operation.
LC = 1
This is called a resonance condition, and the
resonance frequency is given by:
EQUATION 49:
1
f 0 = ------------------2 LC
RESONANT CIRCUITS
Once the frequency and the inductance of the coil are
determined, the resonant capacitance can be
calculated from:
By applying Equation 48 into Equation 47, the impedance at the resonance frequency becomes:
EQUATION 50:
EQUATION 46:
1
C = ----------------------2
L ( 2f o )
In practical applications, parasitic (distributed)
capacitance is present between turns. The parasitic
capacitance in a typical tag antenna coil is a few (pF).
This parasitic capacitance increases with operating
frequency of the device.
There are two different resonant circuits: parallel and
series. The parallel resonant circuit has maximum
impedance at the resonance frequency. It has a minimum current and maximum voltage at the resonance
frequency. Although the current in the circuit is minimum at the resonant frequency, there are a circulation
current that is proportional to Q of the circuit. The
parallel resonant circuit is used in both the tag and the
high power reader antenna circuit.
On the other hand, the series resonant circuit has a
minimum impedance at the resonance frequency. As a
result, maximum current is available in the circuit.
Because of its simplicity and the availability of the high
current into the antenna element, the series resonant
circuit is often used for a simple proximity reader.
DS00710C-page 70
Z = R
where R is the load resistance.
EQUATION 51:
1
B = --------------2RC
( Hz )
AN710
EQUATION 52:
EQUATION 54:
V o = 2f o NQSB o cos
C
= 2f0 N R ---- SB0 cos
L
The above equation indicates that the induced voltage
in the tag coil is inversely proportional to the square
root of the coil inductance, but proportional to the
number of turns and surface area of the coil.
resis tan ce
L
= ------r
For inductance
1
= --------cr
For capacitance
EQUATION 55:
f0
= ---B
Z ( j ) = r + j ( XL XC )
()
where:
where:
=
2f = angular frequency
fo = resonant frequency
B = bandwidth
r = ohmic losses
EQUATION 56:
By applying Equation 49 and Equation 51 into
Equation 52, the Q in the parallel resonant circuit is:
EQUATION 53:
X L = 2fo L
()
EQUATION 57:
C
Q = R ---L
1
Xc = --------------2f o C
()
DS00710C-page 71
Eo
Ein
jXL
V o = -------- Vin
r
13.56 MHz
= jQVin
EQUATION 58:
r
B = ---------2L
( Hz )
EXAMPLE 9:
CIRCUIT PARAMETERS
EQUATION 61:
X L = Qr s = 200
XL
200
L = --------- = --------------------------------------- = 2.347
2f
2 ( 13.56MHz )
( H )
1
1
C = --------------- = -------------------------------------------------------- = 58.7 (pF)
2fX L 2 ( 13.56 MHz ) ( 200 )
EQUATION 59:
jX L
Vo = ------------------------------- Vin
r + jX L jX c
DS00710C-page 72
AN710
TUNING METHOD
fo
S11
fo
(a)
f
fo
f
fo
(b)
(c)
Note 1: (a) S11 Response, (b) Impedance Response for a Parallel Resonant Circuit, and
(c) Impedance Response for a Series Resonant Circuit.
2: In (a), the null at the resonance frequency represents a minimum input reflection at
the resonance frequency. This means the circuit absorbs the signal at the frequency
while other frequencies are reflected back. In (b), the impedance curve has a peak
at the resonance frequency. This is because the parallel resonant circuit has a
maximum impedance at the resonance frequency. (c) shows a response for the
series resonant circuit. Since the series resonant circuit has a minimum impedance
at the resonance frequency, a minimum peak occurs at the resonance frequency.
DS00710C-page 73
FIGURE 22: READ RANGE VS. TAG SIZE FOR TYPICAL PROXIMITY APPLICATIONS*
Tag
s
che
n
i
.5
~1
1-inch diameter
Tag
4 inches
3 x 6 inch
Reader Antenna
Q tag 40
0.5-inch diameter
2-inch diameter
5 ~ 6 inches
Tag
6 ~ 7 inc
hes
2-inch x 3.5-inch
Tag (Credit Card Type)
FIGURE 23: READ RANGE VS. TAG SIZE FOR TYPICAL LONG RANGE APPLICATIONS*
0.5-inch diameter
Q tag 40
Tag
7~
n
9i
es
ch
1-inch diameter
2
14 ~
20 x 55 inch
Long Range
Reader
hes
1 inc
Tag
2-inch diameter
25 ~ 30 inches
35 ~ 4
0 inch
Tag
es
Tag
Note:
2-inch x 3.5-inch
(Credit Card Type)
Actual results may be shorter or longer than the range shown, depending upon factors discussed above.
DS00710C-page 74
AN710
APPENDIX A: CALCULATION OF MUTUAL INDUCTANCE TERMS IN EQUATIONS
36 AND 37
Positive Mutual Inductance Terms:
1, 9
1, 9
1, 9
1 1, 9
M 1, 9 = --- M 9 + 2 + M 9 + M 2 + M
2
1, 5
1, 5
1 1, 5
M 1, 5 = --- M 1 + M5 M
where:
where:
1, 9
1, 9
M9 + 2 = 2 l 9 + 2 F 9 + 2
1, 5
1, 5
M1
= 2l F
1 1
1, 9
1, 9
M 9 + = 2 l 9 + F9 +
1, 5
1, 5
M5
= 2 l5 F 5
1, 9
1, 9
M2 = 2 d 1, 9 F 2
1, 5
1, 5
= 2 d 1, 5 F
M
l1 2 1 2
d 1, 5 2 1 2 d 1, 5
l1
1, 5
= ln ------------ + 1 + ------------
+ ------------
F1
1 + -----------d
d
1, 5
l1
l1
1, 5
l5 2 1 2
d 1, 5 2 1 2 d 1, 5
l5
1, 5
= ln ------------ + 1 + ------------
1 + ------------
+ ------------
F5
d 1, 5
l5
l5
d 1, 5
1, 9
1, 9
M
= 2 d 1, 9 F
l 9 + 2 2 1 2
d 1, 9 2 1 2
l 9 + 2
1, 9
-
F 9 + 2 = ln ------------------ + 1 + ------------------
1 + ----------------d
d
l 9 + 2
1, 9
1, 9
d 1, 9
+ ------------------
l 9 + 2
l 9 + 2 1 2
d 1, 9 2 1 2
l9 +
1, 9
-
F 9 + = ln -------------- + 1 + --------------
1 + ------------d
d
1, 9
l 9 +
1, 9
l 2 1 2
d 1, 5 2 1 2 d 1, 5
l
1, 5
= ln ------------ + 1 + ------------
1 + ------------
+ ------------
F
d 1, 5
l
l
d 1, 5
d 1, 9
+ --------------
l 9 +
= w+s
l =
F
l 2 2 1 2
d 1, 9 2 1 2 d 1, 9
l 2
1, 9
= ln ------------ + 1 + ------------
+ ------------
1 + -----------2
d
d
1, 9
l 2
l 2
1, 9
l 2 1 2
d 1, 9 2 1 2 d 1, 9
l
1, 9
= ln ------------ + 1 + ------------
1 + ------------
+ ------------
F
d 1, 9
l
l
d 1, 9
DS00710C-page 75
1, 13
1, 13
1, 13
1 1, 13
M1, 13 = --- M 13 + 3 + M 13 + 2 M 3 + M2
2
where:
where:
1, 13
1, 13
M 13 + 3 = 2 l13 + 3 F 13 + 3
5, 13
5, 13
M 13 + 2 = 2 l 13 + 2 F13 + 2
1, 13
1, 13
= 2l
F
13 + 2
13 + 2 13 +
1, 13
1, 13
M 3
= 2d
F
1, 13 3
1, 13
1, 13
M 2
= 2d
F
1, 13 2
l 13 + 3 2 1 2
l 13 + 3
1, 13
F13 + 3 = ln --------------------- + 1 + ---------------------
d
d 1, 13
1, 13
d 1, 13 2 1 2 d 1, 13
1 + ---------------------
+ ---------------------
l 13 + 3
l 13 + 3
l 13 + 2 1 2
d 1, 13 2 1 2
l 13 +
1, 13
F 13 + = ln ----------------- + 1 + -----------------
1 + ----------------d
d
1, 13
l 13 +
1, 13
d 1, 13
+ -----------------
l 13 +
d 5, 13 2 1 2
l 13 + 2 2 1 2
l 13 + 2
5, 13
-
F 13 + 2 = ln --------------------- + 1 + ---------------------
1 + ------------------- l 13 + 2
d 5, 13
d 5, 13
d 5, 13
+ ---------------------
l 13 + 2
l 2 2 1 2
d 5, 13 2 1 2
l 2
5, 13
= ln ---------------- + 1 + ----------------
-
F2
1 + --------------d
d
l 2
5, 13
5, 13
d 5, 13
+ ----------------
l 2
l 3 2 1 2
d 1, 13 2 1 2
l 3
1, 13
= ln ---------------- + 1 + ----------------
-
F 3
1 + --------------d
d
l 3
1, 13
1, 13
d 1, 13
+ ----------------
l 3
5, 9
5, 9
M9 + = 2 l1 F9 +
9, 13
9, 13
M
13 +
9, 13
9, 13
= 2 l F
M
where:
= M
9, 13
9, 13
M13 + = 2 l13 + F 13 +
d 1, 13
+ ----------------
l 2
5, 9
5, 9
M 5, 9 = M 9 + M
9, 13
where:
l 2 2 1 2
d 1, 13 2 1 2
l 2
1, 13
= ln ---------------- + 1 + ----------------
-
F2
1 + --------------d
d
1, 13
l 2
1, 13
5, 13
5, 13
= 2l F
2
2 2
l 13 + 2 1 2
d 9, 13 2 1 2
l 13 +
9, 13
= ln ----------------- + 1 + -----------------
1 + l-----------------
13 +
d
d
13 +
9, 13
9, 13
d 9, 13
+ -----------------
l 13 +
l 2 1 2
d 9, 13 2 1 2
l
9, 13
= ln ----------------- + 1 + -----------------
-
1 + ---------------
d9, 13
l
d 9, 13
d 9, 13
+ ----------------
l
5, 9
5, 9
M
= 2 l 1 F
l 9 + 2 1 2
d 5, 9 2 1 2
l9 +
5, 9
F 9 + = ln -------------- + 1 + --------------
1 + l--------------
d
d
9 +
5, 9
5, 9
d
5, 9
+ --------------
l 9 +
l 2 1 2
d 5, 9 2 1 2
l
5, 9
= ln ------------ + 1 + ------------
F
1 + ----------- d 5, 9
l
d 5, 9
d 5, 9
+ ------------
l
DS00710C-page 76
AN710
EQUATION A.7 Mutual inductance
between conductors 3
and 7
3, 7
3, 7
M 3, 7 = M 7 + M
where:
3, 15
3, 15
M3, 15 = M 15 + 3 M 3
where:
3, 7
3, 7
M7 + = 2 l7 + F7 +
3, 7
3, 7
M
= 2l F
l 7 + 2 1 2
d 3, 7 2 1 2
l7 +
3, 7
F7 + = ln -------------- + 1 + --------------
1 + l--------------
d
d
3, 7
7 +
3, 7
d 3, 7
+ --------------
l 7 +
l 2 1 2
d 3, 7 2 1 2
l
3, 7
= ln ------------ + 1 + ------------
1 + -----------
d 3, 7
l
d 3, 7
d 9, 13
+ ----------------
l
3, 15
3, 15
= 2l
F
15 + 3
15 + 3 15 + 3
3, 15
3, 15
M 3
= 2l F
3 3
d 3, 15 2 1 2
l 15 + 3 2 1 2
l 15 + 3
3, 15
-
F 3 + 3 = ln --------------------- + 1 + ---------------------
1 + -------------------d
d
l 15 + 3
3, 15
3, 15
d 3, 15
+ ---------------------
l 15 + 3
l 3 2 1 2
d 3, 15 2 1 2
l 3
3, 15
= ln ---------------- + 1 + ----------------
1 + ----------------
F 3
d 3, 15
l 3
d 3, 15
d 3, 15
+ ----------------
l 3
= w+s
where:
3, 11
3, 11
M 11 + 2 = 2 l11 + 2 F 11 + 2
3, 11
3, 11
M 2
= 2 l 2 F 2
d 3, 11 2 1 2
l 11 + 2 2 1 2
l 11 + 2
3, 11
-
F 11 + 2 = ln --------------------- + 1 + ---------------------
1 + ------------------- l 11 + 2
d 3, 11
d 3, 11
d 3, 11
+ ---------------------
l 11 + 2
l 2 2 1 2
d 3, 11 2 1 2
l 2
3, 11
= ln ---------------- + 1 + ----------------
-
F 2
1 + --------------d
d
3, 11
l 2
3, 11
d 3, 11
+ ----------------
l 2
7, 11
7, 11
M7, 11 = M11 + M
where:
7, 11
7, 11
M 11 + = 2 l 11 + F 11 +
7, 11
7, 11
= 2 l F
M
d 7, 11 2 1 2
l 11 + 2 1 2
l 11 +
7, 11
F11 + = ln ----------------- + 1 + -----------------
1 + ---------------- l 11 +
d 7, 11
d7, 11
d 7, 11
+ -----------------
l 11 +
l 2 1 2
d 7, 11 2 1 2
l
7, 11
= ln ---------------- + 1 + ----------------
-
F
1 + --------------d
d
7, 11
l
7, 11
d 7, 11
+ ----------------
l
DS00710C-page 77
2, 6
M 2, 6 = M 6 + M
7, 15
7, 15
M 7, 15 = M 15 + 2 M 2
where:
where:
2, 6
2, 6
7, 15
7, 15
M15 + 2 = 2 l15 + 2 F 15 + 2
M 6 + = 2l 6 + F 6 +
7, 15
7, 15
M 2
= 2l F
2 2
2, 6
d 7, 15 2 1 2
l 15 + 2 2 1 2
l 15 + 2
7, 15
-
F 15 + 2 = ln --------------------- + 1 + ---------------------
1 + ------------------- l 15 + 2
d 7, 15
d 7, 15
d 7, 15
+ ---------------------
l 15 + 2
11, 15
= M
d 2, 6
+ -------------
l
11, 15
11, 15
M
15 +
where:
2, 10
2, 10
M 10 + 2 = 2 l10 + 2 F 10 + 2
where:
2, 10
2, 10
M 2
= 2 l 2 F2
11, 15
11, 15
M 15 + = 2 l15 + F 15 +
11, 15
11, 15
= 2 l F
M
d 11, 15 2 1 2
l 15 + 2 1 2
l 15 +
11, 15
-
F 15 + = ln ------------------- + 1 + -------------------
1 + -----------------d
d
l 15 +
11, 15
11, 15
d 11, 15
+ -------------------
l 15 +
d 11, 15 2 1 2
l 2 1 2
l
11, 15
= ln ------------------- + 1 + -------------------
-
F
1 + -----------------d
d
l
11, 15
11, 15
d 11, 15
+ -------------------
l
DS00710C-page 78
2, 6 2 1 2
l 6 + 2 1 2
l6 +
2, 6
= ln -------------- + 1 + --------------
-
1 + ------------6+
l 6 +
2, 6
d 2, 6
2, 6
+ --------------
l 6 +
l 2 1 2
d2, 6 2 1 2
l
2, 6
= ln ------------ + 1 + -------------
F
1 + ------------
d
l
2, 6
2, 6
l 2 2 1 2
d 7, 15 2 1 2
l 2
7, 15
= ln ---------------- + 1 + ----------------
-
F 2
1 + --------------d
d
7, 15
l 2
7, 15
d 7, 15
+ ----------------
l 2
2, 6
= 2l F
d 2, 10 2 1 2
l 10 + 2 2 1 2
l 10 + 2
2, 10
= ln --------------------- + 1 + ---------------------
-
1 + -------------------10 + 2
l 10 + 2
d 2, 10
d 2, 10
d 2, 10
+ ---------------------
l 10 + 2
l 2 2 1 2
d 2, 10 2 1 2
l 2
2, 10
= ln ---------------- + 1 + ----------------
1 + ----------------
F 2
d 2, 10
l 2
d 2, 10
d 2, 10
+ ----------------
l 2
AN710
EQUATION A.15 Mutual inductance
between conductors 2
and 14
2, 14
2, 14
M 2, 14 = M 14 + 3 M3
where:
where:
2, 14
2, 14
M 14 + 3 = 2 l 14 + 3 F 14 + 3
6, 14
6, 14
M 14 + 2 = 2 l 14 + 2 F14 + 2
2, 14
2, 14
M 3
= 2l F
3 3
6, 14
6, 14
M2
= 2l F
2 2
d 2, 14 2 1 2
l 14 + 3 2 1 2
l 14 + 3
2, 14
-
F 14 + 3 = ln --------------------- + 1 + ---------------------
1 + -------------------d
d
l 14 + 3
2, 14
2, 14
d 6, 14 2 1 2
l 14 + 2 2 1 2
l 14 + 2
6, 14
-
F 14 + 2 = ln --------------------- + 1 + ---------------------
1 + ------------------- l 14 + 2
d 6, 14
d 6, 14
d 6, 14
+ ---------------------
l 14 + 2
d 2, 14
+ ---------------------
l 14 + 3
l 3 2 1 2
d 2, 14 2 1 2
l 3
2, 14
= ln ---------------- + 1 + ----------------
-
F 3
1 + --------------d
d
2, 14
l 3
2, 14
l 2 2 1 2
d 6, 14 2 1 2
l 2
6, 14
= ln ---------------- + 1 + ----------------
-
F 2
1 + --------------d
d
6, 14
l 2
6, 14
d 2, 14
+ ----------------
l 3
d 6, 14
+ ----------------
l 2
where:
where:
6, 10
6, 10
M 10 + = 2 l 10 + F 10 +
6, 10
6, 10
= 2 l F
M
l 10 + 2 1 2
d 6, 10 2 1 2
l 10 +
6, 10
F10 + = ln ----------------- + 1 + -----------------
1 + l-----------------
d 6, 10
10 +
d 6, 10
d 6, 10
+ -----------------
l 10 +
l 2 1 2
d 6, 10 2 1 2
l
6, 10
= ln ---------------- + 1 + ----------------
F
-
1 + --------------d
d
6, 10
l
6, 10
d 6, 10
+ ----------------
l
10, 14
10, 14
= 2l
F
14 +
10 + 10 +
10, 14
10, 14
= 2l F
d 10, 14 2 1 2
l 14 + 2 1 2
l 14 +
10, 14
-
F 14 + = ln ------------------- + 1 + -------------------
1 + -----------------d
d
l 14 +
10, 14
10, 14
d 10, 14
+ -------------------
l 14 +
d 10, 14 2 1 2
l 2 1 2
l
10, 14
= ln ------------------- + 1 + -------------------
-
F
1 + ----------------- l
d 10, 14
d 10, 14
d 10, 14
+ -------------------
l
DS00710C-page 79
where:
4, 16
4, 16
M 4, 16 = M 16 + 3 M3
where:
4, 8
4, 8
M8 + = 2 l8 + F8 +
4, 8
4, 8
= 2l F
l 8 + 2 1 2
d 4, 8 2 1 2
l8 +
4, 8
= ln -------------- + 1 + --------------
1 + l--------------
8+
d
d
4, 8
8 +
4, 8
4, 16
4, 16
M16 + 3 = 2 l16 + 3 F 16 + 3
4, 16
4, 16
M 3
= 2l F
3 3
d 4, 16 2 1 2
l 16 + 3 2 1 2
l 16 + 3
4, 16
-
F 16 + 3 = ln --------------------- + 1 + ---------------------
1 + -------------------d
d
l 16 + 3
4, 16
4, 16
d 4, 16
+ ---------------------
l 16 + 3
d 4, 8
+ --------------
l 8 +
l 2 1 2
d 4, 8 2 1 2
l
4, 8
= ln ------------ + 1 + ------------
F
1 + -----------d
d
l
4, 8
4, 8
l 3 2 1 2
d 4, 16 2 1 2
l 3
4, 16
= ln ---------------- + 1 + ----------------
-
F 3
1 + --------------d
d
l 3
4, 16
4, 16
d 4, 8
+ ------------
l
where:
4, 12
4, 12
M12 + 2 = 2 l12 + 2 F 12 + 2
4, 12
4, 12
= 2 l 2 F 2
M 2
d 4, 12 2 1 2
l 12 + 2 2 1 2
l 12 + 2
4, 12
-
F 12 + 2 = ln --------------------- + 1 + ---------------------
1 + -------------------d
d
l 12 + 2
4, 12
4, 12
d 4, 12
+ ---------------------
l 12 + 2
l 2 2 1 2
d 4, 12 2 1 2
l 2
4, 12
= ln ---------------- + 1 + ----------------
-
F 2
1 + --------------d
d
l 2
4, 12
4, 12
d 4, 12
+ ----------------
l 2
DS00710C-page 80
d 4, 16
+ ----------------
l 3
where:
M
8, 12
8, 12
= 2l
F
12 +
10 + 12 +
8, 12
8, 12
= 2 l F
M
d8, 12 2 1 2
l 12 + 2 1 2
l 12 +
8, 12
F 12 + = ln ----------------- + 1 + -----------------
1 + l-----------------
12 +
d 8, 12
d 8, 12
d 8, 12
+ -----------------
l 12 +
l 2 1 2
d 8, 12 2 1 2
l
8, 12
= ln ---------------- + 1 + ----------------
-
F
1 + --------------d
d
8, 12
l
8, 12
d 8, 12
+ ----------------
l
AN710
EQUATION A.23 Mutual inductance
between conductors 8
and 16
8, 16
8, 16
M 8, 16 = M 14 + 2 M 2
1, 3
= 2l F
1 1
where:
where:
8, 16
8, 16
M16 + 2 = 2 l16 + 2 F 16 + 2
8, 16
8, 16
M 2
= 2l F
2 2
d 8, 16 2 1 2
l 16 + 2 2 1 2
l 16 + 2
8, 16
-
F 16 + 2 = ln --------------------- + 1 + ---------------------
1 + ------------------- l 16 + 2
d 8, 16
d 8, 16
d 8, 16
+ ---------------------
l 16 + 2
l1 2 1 2
d 1, 3 2 1 2 d
l1
1, 3
1, 3
= ln ------------ + 1 + ------------
1 + ------------
+ ------------
1
d 1, 3
l1
d 1, 3
l1
l 2 2 1 2
d 8, 16 2 1 2
l 2
8, 16
= ln ---------------- + 1 + ----------------
-
F 2
1 + -------------- d 8, 16
l 2
d 8, 16
d 8, 16
+ ----------------
l 2
where:
12, 16
12, 16
M16 + = 2 l 16 + F 16 +
12, 16
12, 16
M
= 2 l F
1, 7
1, 7
M 1, 7 = M7 + M
where:
1, 7
1, 7
M7 + = 2 l7 + F7 +
1, 7
1, 7
M
= 2 l F
l 7 + 2 1 2
d 1, 7 2 1 2
l7 +
1, 7
F7 + = ln -------------- + 1 + --------------
-
1 + ------------d
d
1, 7
l 7 +
1, 7
d 1, 7
+ --------------
l 7 +
l 2 1 2
d 1, 7 2 1 2
l
1, 7
= ln ------------ + 1 + ------------
1 + -----------
d 1, 7
l
d 1, 7
d 1, 7
+ ------------
l
d 12, 16 2 1 2
l 16 + 2 1 2
l 16 +
12, 16
-
F 16 + = ln ------------------- + 1 + -------------------
1 + ----------------- l 16 +
d 12, 16
d 12, 16
d 12, 16
+ -------------------
l 16 +
d 12, 16 2 1 2
l 2 1 2
l
12, 16
= ln ------------------- + 1 + -------------------
-
F
1 + -----------------d
d
l
12, 16
12, 16
d 12, 16
+ -------------------
l
DS00710C-page 81
1, 11
1, 11
M 1, 11 = M 11 + 2 M 2
where:
where:
1, 11
1, 11
M 11 + 2 = 2 l11 + 2 F 11 + 2
5, 3
5, 3
M5
= 2l F
5 5
1, 11
1, 11
M 2
= 2l F
2 2
d 1, 11 2 1 2
l 11 + 2 2 1 2
l 11 + 2
1, 11
-
F 11 + 2 = ln --------------------- + 1 + ---------------------
1 + -------------------d
d
l 11 + 2
1, 11
1, 11
d 1, 11
+ ---------------------
l 11 + 2
l 2 2 1 2
d 1, 11 2 1 2
l 2
1, 11
= ln ---------------- + 1 + ----------------
-
F 2
1 + -------------- d 1, 11
l 2
d 1, 11
d 1, 11
+ ----------------
l 2
5, 3
5, 3
M5
= 2l F
5 5
l5 2 1 2
d 5, 3 2 1 2 d 5, 3
l5
5, 3
= ln ------------ + 1 + ------------
+ ------------
F5
1 + -----------d
d
5, 3
l5
l5
5, 3
l3 2 1 2
d 5, 3 2 1 2 d 5, 3
l3
5, 3
= ln ------------ + 1 + ------------
1 + ------------
+ ------------
F3
d 5, 3
l3
l3
d 5, 3
5, 7
5, 7
1 5, 7
M 5, 7 = --- M 5 + M 7 M
2
1, 15
1, 15
M15 + 3 = 2 l15 + 3 F 15 + 3
where:
5, 7
5, 7
M5
= 2 l5 F5
1, 15
1, 15
= 2 l 3 F 3
M 3
5, 7
5, 7
M7
= 2 l7 F 7
5, 7
5, 7
M
= 2 l F
d 1, 15 2 1 2
l 15 + 3 2 1 2
l 15 + 3
1, 15
-
F 15 + 3 = ln --------------------- + 1 + ---------------------
1 + -------------------d
d
l 15 + 3
1, 15
1, 15
l 3 2 1 2
d 1, 15 2 1 2
l 3
1, 15
= ln ---------------- + 1 + ----------------
-
F 3
1 + -------------- d 1, 15
l 3
d 1, 15
d 1, 15
+ ----------------
l 3
DS00710C-page 82
l 2 1 2
d 5, 3 2 1 2 d 5, 3
l
5, 3
= ln ------------ + 1 + ------------
+ ------------
1 + -----------
d
d
5, 3
l
l
5, 3
where:
d 1, 15
+ ---------------------
l 15 + 3
5, 3
5, 3
= 2l F
l5 2 1 2
d 5, 7 2 1 2 d 5, 7
l5
5, 7
= ln ------------ + 1 + ------------
+ ------------
F5
1 + -----------d
d
5, 7
l5
l5
5, 7
l7 2 1 2
d 5, 7 2 1 2 d 5, 7
l7
5, 7
= ln ------------ + 1 + ------------
+ ------------
1 + -----------7
d
d
5, 7
l7
l7
5, 7
l 2 1 2
d 5, 7 2 1 2 d 5, 7
l
5, 7
= ln ------------ + 1 + ------------
+ ------------
F
1 + ----------- d 5, 7
l
l
d 5, 7
AN710
EQUATION A.31 Mutual inductance
between conductors 5
and 11
5, 11
5, 11
5, 11
1 5, 11
M 5, 11 = --- M11 + 2 + M11 + M 2 + M
where:
5, 11
5, 11
M11 + 2 = 2 l11 + 2 F 11 + 2
5, 11
5, 11
M 11 + = 2 l 11 + F11 +
5, 11
5, 11
= 2l F
2
2 2
5, 11
5, 11
M
= 2l F
l 11 + 2 2 1 2
l 11 + 2
5, 11
F 11 + 2 = ln --------------------- + 1 + ---------------------
d
d 5, 11
5, 11
d 5, 11 2 1 2 d 5, 11
1 + ---------------------
+ ---------------------
l 11 + 2
l 11 + 2
l 11 + 2 1 2
l 11 +
5, 11
= ln ----------------- + 1 + -----------------
11 +
d
d 5, 11
5, 11
d 5, 11 2 1 2 d 5, 11
1 + -----------------
+ -----------------
l 11 +
l 11 +
1 2
2
5, 11
2 2
= ln ---------------- + 1 + ----------------
F 2
d 5, 11
5, 11
where:
2, 4
2, 4
2, 4
2, 4
= 2l F
M4
= 2l F
2
2 2
4 4
2, 4
2, 4
M
= 2l F
l2 2 1 2
l2
2, 4
= ln ------------ + 1 + ------------
F2
d 2, 4
d 2, 4
d 2, 4 2 1 2 d 2, 4
1 + ------------
+ ------------
l2
l2
l4 2 1 2
l4
2, 4
= ln ------------ + 1 + ------------
F4
d 2, 4
d 2, 4
d 2, 4 2 1 2 d 2, 4
1 + ------------
+ ------------
l4
l4
l 2 1 2
l
2, 4
= ln ------------ + 1 + ------------
F
d 2, 4
d 2, 4
d 2, 4 2 1 2 d 2, 4
1 + ------------
+ ------------
l
l
d 5, 11 2 1 2 d 5, 11
1 + ----------------
+ ----------------
l 2
l 2
2 1 2
5, 11
= ln ---------------- + 1 + ----------------
F
d
5, 11
5, 11
d 5, 11 2 1 2
d 5, 11
1 + ----------------
+ ----------------
DS00710C-page 83
9, 3
9, 3
9, 3
1 9, 3
M9, 3 = --- M 9 + 2 + M9 + M2 + M
2
where:
where:
9, 3
9, 3
M 9 + 2 = 2 l9 + 2 F 9 + 2
5, 15
5, 15
M 15 + 3 = 2 l15 + 3 F 15 + 3
5, 15
5, 15
M15 + 2 = 2 l15 + 2 F 15 + 2
5, 15
5, 15
= 2l F
3
3 3
9, 3
9, 3
M 2 = 2 l2 F2
5, 15
5, 15
M 2
= 2l F
2
l 15 + 3 2 1 2
l 15 + 3
5, 15
F 15 + 3 = ln --------------------- + 1 + ---------------------
d 5, 15
d 5, 15
d 5, 15 2 1 2 d 5, 15
1 + ---------------------
+ ---------------------
l 15 + 3
l 15 + 3
l 15 + 2 2 1 2
l 15 + 2
5, 15
= ln --------------------- + 1 + ---------------------
F
15 + 2
d
d 5, 15
5, 15
d 5, 15 2 1 2 d 5, 15
1 + ---------------------
+ ---------------------
l 15 + 2
l 15 + 2
1 2
2
5, 15
2 2
F
= ln ---------------- + 1 + ----------------
d 5, 15
d 5, 15
d 5, 15 2 1 2 d 5, 15
1 + ----------------
+ ----------------
l 2
l 2
2 1 2
5, 15
= ln ---------------- + 1 + ----------------
F
d
5, 15
5, 15
1
d 5, 15 2 2
d 5, 15
1 + ----------------
+ ----------------
where:
9, 7
9, 7
9, 7
9, 7
= 2l F
M7
= 2 l7 F 7
9
9 9
9, 7
9, 7
M
= 2 l F
l9 2 1 2
l9
9, 7
= ln ------------ + 1 + ------------
F9
d
d 9, 7
9, 7
d 9, 7 2 1 2 d 9, 7
1 + ------------
+ ------------
l9
l9
l7 2 1 2
l7
9, 7
= ln ------------ + 1 + ------------
F7
d 9, 7
d 9, 7
d 9, 7 2 1 2 d 9, 7
1 + ------------
+ ------------
l7
l7
l 2 1 2
l
9, 7
= ln ------------ + 1 + ------------
F
d 9, 7
d 9, 7
d 9, 7 2 1 2 d 9, 7
1 + ------------
+ ------------
l
l
DS00710C-page 84
,
,
9, 3
9, 3
M9 + = 2 l 9 + F 9 +
9, 3
9, 3
= 2l F
l 9 + 2 2 1 2
l 9 + 2
9, 3
F 9 + 2 = ln ------------------ + 1 + ------------------
d
d 9, 3
9, 3
d 9, 3 2 1 2 d 9, 3
1 + ------------------
+ ------------------
l 9 + 2
l 9 + 2
l 9 + 2 1 2
l9 +
9, 3
F 9 + = ln -------------- + 1 + --------------
d
d 9, 3
9, 3
2
1
2 d
d 9, 3
9, 3
1 + --------------
+ --------------
l 9 +
l 9 +
1 2
2
9, 3
2 2
F 2 = ln ------------ + 1 + ------------
d
d
9, 3
9, 3
d 9, 3 2 1 2 d 9, 3
1 + ------------
+ ------------
l 2
l 2
1 2
9, 3
2
= ln ------------ + 1 + ------------
F
d 9, 3
9, 3
1
2
2
d 9, 3
d 9, 3
1 + ------------
+ ------------
where:
9, 11
9, 11
9, 11
9, 11
M9
= 2 l9 F 9
= 2 l7 F 7
M7
9, 11
9, 11
M
= 2 l F
l9 2 1 2
l9
9, 11
= ln ---------------- + 1 + ----------------
F9
d 9, 11
d 9, 11
d 9, 11 2 1 2 d 9, 11
1 + ----------------
+ ----------------
l9
l9
l 11 2 1 2
l 11
9, 11
= ln ---------------- + 1 + ----------------
F 11
d 9, 11
d 9, 11
d 9, 11 2 1 2 d 9, 11
1 + ----------------
+ ----------------
l 11
l 11
l 2 1 2
l
9, 11
= ln ---------------- + 1 + ----------------
F
d 9, 11
d 9, 11
d 9, 11 2 1 2 d 9, 11
1 + ----------------
+ ----------------
l
l
AN710
EQUATION A.37 Mutual inductance
between conductors 9
and 15
M
9, 15
9, 15 9, 15
9, 15
1 9, 15
= --- M
+M
M
+M
15 + 2
2 15 + 2
where:
13, 11
13, 11
1 13, 11
M 13, 11 = --- M 13
+M
M
11
where:
9, 15
9, 15
M15 + 2 = 2 l15 + 2 F 15 + 2
9, 15
9, 15
M 2
= 2l F
2 2
,
,
9, 15
9, 15
M 15 + = 2 l15 + F 15 +
9, 15
9, 15
M
= 2l F
l 9 + 2 2 1 2
l 9 + 2
9, 15
F 9 + 2 = ln ------------------ + 1 + ------------------
d
d 9, 15
9, 15
d 9, 15 2 1 2 d 9, 15
1 + ------------------
+ ------------------
l 9 + 2
l 9 + 2
l9 + 2 1 2
l9 +
9, 15
F 9 + = ln ---------------- + 1 + ----------------
d
d 9, 15
9, 15
2
1
2
d 9, 15
d 9, 15
1 + ----------------
+ ----------------
l9 +
l9 +
1 2
2
9, 15
2 2
= ln ---------------- + 1 + ----------------
F 2
d
9, 15
9, 15
d 9, 15 2 1 2 d 9, 15
1 + ----------------
+ ----------------
l 2
l 2
2 1 2
9, 15
= ln ---------------- + 1 + ----------------
F
d 9, 15
9, 15
d 9, 15
1 + ----------------
2 12
d 9, 15
+ ----------------
13, 11
13, 11
13, 11
13, 11
M 13
= 2l F
M 11
= 2l F
13 13
11 11
13, 11
13, 11
= 2l F
M
l 13 2 1 2
l 13
13, 11
= ln ------------------- + 1 + -------------------
F 13
d 13, 11
d 13, 11
d 13, 11 2 1 2 d 13, 11
1 + -------------------
+ -------------------
l 13
l 13
l 11 2 1 2
l 11
13, 11
= ln ------------------- + 1 + -------------------
F 11
d 13, 11
d 13, 11
d 13, 11 2 1 2 d 13, 11
1 + -------------------
+ -------------------
l 11
l 11
l 2 1 2
l
13, 11
= ln ------------------- + 1 + -------------------
F
d 13, 11
d 13, 11
d 13, 11 2 1 2 d 13, 11
1 + -------------------
+ -------------------
l
l
where:
where:
13, 15
13, 15
13, 15
13, 15
= 2 l 13 F 13
M 13
= 2 l 15 F 15
M15
13, 15
13, 15
M
= 2 l F
l 13 2 1 2
l 13
13, 15
= ln ------------------- + 1 + -------------------
F 13
d 13, 15
d 13, 15
d 13, 15 2 1 2 d 13, 15
1 + -------------------
+ -------------------
l 13
l 13
l 15 2 1 2
l 15
13, 15
= ln ------------------- + 1 + -------------------
F 13
d 13, 15
d 13, 15
d 13, 15 2 1 2 d 13, 15
1 + -------------------
+ -------------------
l 15
l 15
l 2 1 2
l
13, 15
= ln ------------------- + 1 + -------------------
F
d 13, 15
d 13, 15
d 13, 15 2 1 2 d 13, 15
1 + -------------------
+ -------------------
l
l
13, 7
13, 7
= 2l
F
13 + 2
13 + 2 13 + 2 ,
13, 7
13, 7
M 2
= 2 l 2 F2
13, 7
13, 7
M 13 + = 2 l 13 + F13 +
13, 7
13, 7
M
= 2 l F
l 13 + 2 2 1 2
l 13 + 2
13, 7
F 13 + 2 = ln --------------------- + 1 + ---------------------
d
d 13, 7
13, 7
d 13, 7 2 1 2 d 13, 7
1 + ---------------------
+ ---------------------
l 13 + 2
l 13 + 2
l 13 + 2 1 2
l 13 +
13, 7
= ln ----------------- + 1 + -----------------
13 +
d
d 13, 7
13, 7
d 13, 7 2 1 2 d 13, 7
1 + -----------------
+ -----------------
l 13 +
l 13 +
1 2
2
13, 7
2 2
= ln ---------------- + 1 + ----------------
F 2
d
13, 7
13, 7
d 13, 7 2 1 2 d 13, 7
1 + ----------------
+ ----------------
l 2
l 2
2 1 2
13, 7
= ln ---------------- + 1 + ----------------
F
d
d
13, 7
13, 7
2 12
d
d
13, 7
13, 7
1 + ----------------
+ ----------------
DS00710C-page 85
2, 8
2, 8
2, 8
1 2, 8
M 2, 8 = --- M 8 + 2 + M 8 + M 2 + M
2
where:
where:
2, 8
2, 8
M 8 + 2 = 2 l8 + 2 F 8 + 2
13, 3
13, 3
M 13 + 3 = 2 l13 + 3 F 13 + 3
13, 3
13, 3
M13 + 2 = 2 l13 + 2 F 13 + 2
13, 3
13, 3
= 2l F
3
3 3
2, 8
2, 8
M 2 = 2 l2 F2
13, 3
13, 3
M 2
= 2l F
2
l 13 + 3 2 1 2
l 13 + 3
13, 3
F 13 + 3 = ln --------------------- + 1 + ---------------------
d 13, 3
d 13, 3
d 13, 3 2 1 2 d 13, 3
1 + ---------------------
+ ---------------------
l 13 + 3
l 13 + 3
l 13 + 2 2 1 2
l 13 + 2
13, 3
= ln --------------------- + 1 + ---------------------
F
13 + 2
d
d 13, 3
13, 3
d 13, 3 2 1 2 d 13, 3
1 + ---------------------
+ ---------------------
l 13 + 2
l 13 + 2
1 2
2
13, 3
2 2
F
= ln ---------------- + 1 + ----------------
d 13, 3
d 13, 3
d 13, 3 2 1 2 d 13, 3
1 + ----------------
+ ----------------
l 2
l 2
2 1 2
13, 3
= ln ---------------- + 1 + ----------------
F
d
13, 3
13, 3
d 13, 3 2 1 2
d 13, 3
1 + ----------------
+ ----------------
2, 8
2, 8
M 8 + = 2 l 8 + F8 +
2, 8
2, 8
M
= 2l F
,
,
l 8 + 2 2 1 2
l 8 + 2
2, 8
F 8 + 2 = ln ------------------ + 1 + ------------------
d
d 2, 8
2, 8
d 2, 8 2 1 2 d 2, 8
1 + ------------------
+ ------------------
l 8 + 2
l 8 + 2
l 8 + 2 1 2
l8 +
2, 8
F 8 + = ln -------------- + 1 + --------------
d
d 2, 8
2, 8
2
1
2 d
d 2, 8
2, 8
1 + --------------
+ --------------
l 8 +
l 8 +
1 2
2
2, 8
2 2
F 2 = ln ------------ + 1 + ------------
d
d
2, 8
2, 8
d 2, 8 2 1 2 d 2, 8
1 + ------------
+ ------------
l 2
l 2
1 2
2, 8
2
= ln ------------ + 1 + ------------
F
d 2, 8
2, 8
1
2
2
d 2, 8
d 2, 8
1 + ------------
+ ------------
M
2
where:
6, 4
6, 4
1 6, 4
= --- M
+M
M
M
6, 4
4
2 6
where:
6, 4
6, 4
M6
= 2 l 6 F6
6, 4
6, 4
M4
= 2 l4 F 4
6, 4
6, 4
M
= 2 l F
l6 2 1 2
d 6, 4 2 1 2 d 6, 4
l6
6, 4
1 + ------------
F6
= ln ------------ + 1 + ------------
+ ------------
d 6, 4
l6
l6
d 6, 4
l4 2 1 2
d 6, 4 2 1 2 d 6, 4
l4
6, 4
= ln ------------ + 1 + ------------
+ ------------
F4
1 + -----------d
d
l4
l4
6, 4
6, 4
l 2 1 2
d 6, 4 2 1 2 d 6, 4
l
6, 4
= ln ------------ + 1 + ------------
+ ------------
1 + -----------
d
d
6, 4
l
l
6, 4
DS00710C-page 86
10, 8
10, 8
= 2l F
6
6 6
10, 8
10, 8
= 2l F
8
8 8
10, 8
10, 8
M
= 2 l F
l6 2 1 2
l6
10, 8
= ln ---------------- + 1 + ----------------
6
d
d 10, 8
10, 8
d 10, 8 2 1 2 d 10, 8
1 + ----------------
+ ----------------
l6
l6
l8 2 1 2
l8
10, 8
= ln ---------------- + 1 + ----------------
F8
d 10, 8
d 10, 8
d 10, 8 2 1 2 d 10, 8
1 + ----------------
+ ----------------
l8
l8
l 2 1 2
l
10, 8
= ln ---------------- + 1 + ----------------
F
d 10, 8
d 10, 8
d 10, 8 2 1 2 d 10, 8
1 + ----------------
+ ----------------
l
l
AN710
EQUATION A.45 Mutual inductance
between conductors 2
and 12
2, 12
2, 12
2, 12
1 2, 12
M 2, 12 = --- M 12 + 3 + M12 + 2 M 3 + M 2
2
6, 8
6, 8
1 6, 8
M 6, 8 = --- M 6 + M 4 M
where:
where:
2, 12
2, 12
M 12 + 3 = 2 l12 + 3 F 12 + 3
6, 8
6, 8
= 2l F
M6
6 6
2, 12
2, 12
M12 + 2 = 2 l15 + 2 F 12 + 2
2, 12
2, 12
= 2l F
M
3
3 3
2, 12
2, 12
M 2
= 2l F
2 2
l 12 + 3 2 1 2
l 12 + 3
2, 12
F 12 + 3 = ln --------------------- + 1 + ---------------------
d 2, 12
d 2, 12
d 2, 12 2 1 2 d 2, 12
1 + ---------------------
+ ---------------------
l 12 + 3
l 12 + 3
l 12 + 2 2 1 2
l 12 + 2
2, 12
= ln --------------------- + 1 + ---------------------
12 + 2
d
d 2, 12
2, 12
d 2, 12 2 1 2 d 2, 12
1 + ---------------------
+ ---------------------
l 12 + 2
l 12 + 2
6, 8
6, 8
= 2l F
M8
8 8
6, 8
6, 8
= 2l F
l6 2 1 2
d 6, 8 2 1 2 d 6, 8
l6
6, 8
= ln ------------ + 1 + ------------
+ ------------
F6
1 + -----------d
d
6, 8
l6
l6
6, 8
l8 2 1 2
d 6, 8 2 1 2 d 6, 8
l8
6, 8
1 + ------------
= ln ------------ + 1 + ------------
+ ------------
8
d 6, 8
l8
l8
d 6, 8
l 2 1 2
d 6, 8 2 1 2 d 6, 8
l
6, 8
= ln ------------ + 1 + ------------
+ ------------
F
1 + -----------d
d
6, 8
l
l
6, 8
1 2
2
2, 12
2 2
= ln ---------------- + 1 + ----------------
d 2, 12
d 2, 12
d 2, 12 2 1 2 d 2, 12
1 + ----------------
+ ----------------
l 2
l 2
2 1 2
2, 12
= ln ---------------- + 1 + ----------------
F2
d
2, 12
2, 12
1
d 2, 12 2 2
d 2, 12
1 + ----------------
+ ----------------
where:
2, 16
2, 16
M 16 + 3 = 2 l16 + 3 F 16 + 3
2, 16
2, 16
M 16 + 4 = 2 l16 + 4 F 16 + 4
2, 16
2, 16
M3
= 2 l 3 F 3
2, 16
2, 16
M 4
= 2 l 4 F4
l 16 + 3 2 1 2
l 16 + 3
2, 16
F 16 + 3 = ln --------------------- + 1 + ---------------------
d
d 2, 16
2, 16
d 2, 16 2 1 2 d 2, 16
1 + ---------------------
+ ---------------------
l 16 + 3
l 16 + 3
l 16 + 4 2 1 2
l 16 + 4
2, 16
F 16 + 4 = ln --------------------- + 1 + ---------------------
d 2, 16
d 2, 16
d 2, 16 2 1 2 d 2, 16
1 + ---------------------
+ ---------------------
l 16 + 4
l 16 + 4
1 2
2
2, 16
2 2
= ln ---------------- + 1 + ----------------
F2
d
d
2, 16
2, 16
d 2, 16 2 1 2 d 2, 16
1 + ----------------
+ ----------------
l 2
l 2
2 1 2
2, 16
= ln ---------------- + 1 + ----------------
d
2, 16
2, 16
d 2, 16 2 1 2
d 2, 16
1 + ----------------
+ ----------------
DS00710C-page 87
12
where:
10, 12
10, 12
1 10, 12
M 10, 12 = --- M 10
+M
M
12
where:
14, 16
14, 16
= 2l F
M
14
14 14
14, 16
14, 16
= 2l F
M
12
12 12
14, 16
14, 16
M
= 2l F
10, 12
10, 12
= 2l F
M 10
10 10
10, 12
10, 12
M 12
= 2l F
12 12
10, 8
10, 12
M
= 2l F
l 14 2 1 2
l 14
14, 16
= ln ------------------- + 1 + -------------------
14
d 14, 16
d 14, 16
d 14, 16 2 1 2 d 14, 16
1 + -------------------
+ -------------------
l 14
l 14
l 16 2 1 2
l 16
14, 16
= ln ------------------- + 1 + -------------------
F 16
d
d 14, 16
14, 16
d 14, 16 2 1 2 d 14, 16
1 + -------------------
+ -------------------
l 16
l 16
l 2 1 2
l
14, 16
= ln ------------------- + 1 + -------------------
F
d
d 14, 16
14, 16
d 14, 16 2 1 2 d 14, 16
1 + -------------------
+ -------------------
l
l
l 10 2 1 2
l 10
10, 12
= ln ------------------- + 1 + -------------------
F 10
d 10, 12
d 10, 12
d 10, 12 2 1 2 d 10, 12
1 + -------------------
+ -------------------
l 10
l 10
l 12 2 1 2
l 12
10, 12
= ln ------------------- + 1 + -------------------
F 12
d 10, 12
d 10, 12
d 10, 12 2 1 2 d 10, 12
1 + -------------------
+ -------------------
l 12
l 12
l 2 1 2
l
10, 12
= ln ------------------- + 1 + -------------------
F
d 10, 12
d 10, 12
d 10, 12 2 1 2 d 10, 12
1 + -------------------
+ -------------------
l
l
6, 12
6, 12 6, 12
6, 12
1 6, 12
= --- M
+M
M
+M
12 + 2
2 12 + 2
where:
6, 12
6, 12
M12 + 2 = 2 l12 + 2 F 12 + 2
6, 12
6, 12
= 2 l 2 F 2
M 2
,
,
6, 12
6, 12
M 12 + = 2 l 12 + F12 +
6, 12
6, 12
= 2l F
l 12 + 2 2 1 2
l 12 + 2
6, 12
F 12 + 2 = ln --------------------- + 1 + ---------------------
d 6, 12
d 6, 12
d 6, 12 2 1 2 d 6, 12
1 + ---------------------
+ ---------------------
l 12 + 2
l 12 + 2
l 12 + 2 1 2
l 12 +
6, 12
F 12 + = ln ----------------- + 1 + -----------------
d
d 6, 12
6, 12
2
1
2
d
6, 12
d 6, 12
1 + -----------------
+ -----------------
l
12 +
l 12 +
1 2
2
6, 12
2 2
= ln ---------------- + 1 + ----------------
F 2
d
d
6, 12
6, 12
d 6, 12 2 1 2 d 6, 12
1 + ----------------
+ ----------------
l 2
l 2
2 1 2
6, 12
F
= ln ---------------- + 1 + ----------------
d
d 6, 12
6, 12
d 6, 12 2 1 2
d 6, 12
1 + ----------------
+ ----------------
DS00710C-page 88
AN710
EQUATION A.51 Mutual inductance
between conductors 6
and 16
6, 16
6, 16
6, 16
1 6, 16
M 6, 16 = --- M 16 + 3 + M16 + 2 M 3 + M 2
2
where:
10, 4
10, 4
10, 4
1 10, 4
M 10, 4 = --- M 12 + 2 + M 12 + M2 + M
where:
6, 16
6, 16
M 16 + 3 = 2 l16 + 3 F 16 + 3
10, 4
10, 4
M 10 + 2 = 2 l10 + 2 F 10 + 2
6, 16
6, 16
M16 + 2 = 2 l16 + 2 F 16 + 2
6, 16
6, 16
= 2l F
M
3
3 3
6, 16
6, 16
M 2
= 2l F
2 2
l 16 + 3 2 1 2
l 16 + 3
6, 16
F 16 + 3 = ln --------------------- + 1 + ---------------------
d 6, 16
d 6, 16
d 6, 16 2 1 2 d 6, 16
1 + ---------------------
+ ---------------------
l 16 + 3
l 16 + 3
l 16 + 2 2 1 2
l 16 + 2
6, 16
= ln --------------------- + 1 + ---------------------
16 + 2
d
d 6, 16
6, 16
d 6, 16 2 1 2 d 6, 16
1 + ---------------------
+ ---------------------
l 16 + 2
l 16 + 2
2
1
2
l
l
3
3
6, 16
= ln ---------------- + 1 + ----------------
F
3
d 6, 16
d 6, 16
d 6, 16 2 1 2 d 6, 16
1 + ----------------
+ ----------------
l 3
l 3
l 2 2 1 2
l 2
6, 16
= ln ---------------- + 1 + ----------------
F2
d
d 6, 16
6, 16
d 6, 16 2 1 2 d 6, 16
1 + ----------------
+ ----------------
l 2
l 2
10, 4
10, 4
= 2l F
M 2
2 2
,
,
10, 4
10, 4
M
= 2l F
10, 4
10, 4
M10 + = 2 l10 + F 10 +
l 10 + 2 2 1 2
l 10 + 2
10, 4
F 10 + 2 = ln --------------------- + 1 + ---------------------
d 10, 4
d 10, 4
d 10, 4 2 1 2
1 + ---------------------
l 10 + 2
d 10, 4
+ --------------------
l 10 + 2
l 10 + 2 1 2
l 10 +
10, 4
= ln ----------------- + 1 + -----------------
10 +
d 10, 4
d 10, 4
d 10, 4 2 1 2 d 10, 4
1 + -----------------
+ -----------------
l 10 +
l 10 +
2 2 1 2
2
10, 4
= ln ----------------- + 1 + -----------------
F2
d 10, 4
d 10, 4
d 10, 4 2 1 2 d 10, 4
1 + -----------------
+ -----------------
l 2
l 2
2 1 2
10, 4
= ln ----------------- + 1 + -----------------
F
d
d 10, 4
10, 4
2 12
d 10, 4
d 10, 4
1 + -----------------
+ -----------------
DS00710C-page 89
12
where:
10, 16
10, 16
10, 16
1 10, 16
M 10, 16 = --- M 16 + 2 + M 16 + M 2
+M
where:
14, 12
14, 12
= 2l F
M
14
14 14
14, 12
14, 12
= 2l F
M
12
12 12
14, 12
14, 12
M
= 2l F
l 14 2 1 2
l 14
14, 12
= ln ------------------- + 1 + -------------------
14
d 14, 12
d 14, 12
10, 16
10, 16
M16 + 2 = 2 l16 + 2 F 16 + 2
10, 16
10, 16
= 2l F
M 2
2 2
10, 16
10, 16
M
= 2l F
d 10, 16 2 1 2 d 10, 16
1 + ---------------------
+ ---------------------
l 16 + 2
l 16 + 2
l 16 + 2 1 2
l 16 +
10, 16
F 16 + = ln ------------------- + 1 + -------------------
d 10, 16
d 10, 16
d 14, 12 2 1 2 d 14, 12
1 + -------------------
+ -------------------
l 12
l 12
l 2 1 2
l
14, 12
= ln ------------------- + 1 + -------------------
F
d
d 14, 12
14, 12
d 14, 12 2 1 2 d 14, 12
1 + -------------------
+ -------------------
l
l
l 16 + 2 2 1 2
l 16 + 2
10, 16
F 16 + 2 = ln --------------------- + 1 + ---------------------
d
d 10, 16
10, 16
d 14, 12 2 1 2 d 14, 12
1 + -------------------
+ -------------------
l 14
l 14
l 12 2 1 2
l 12
14, 12
= ln ---------------- + 1 + -------------------
F 12
d
d 14, 12
10, 8
10, 16
10, 16
= 2l
F
16 +
16 + 16 +
d 10, 16 2 1 2 d 10, 16
1 + -------------------
+ -------------------
l 16 +
l 16 +
l 2 2 1 2
l 2
10, 16
= ln ------------------- + 1 + -------------------
2
d 10, 16
d 10, 16
d 10, 16 2 1 2 d 10, 16
1 + -------------------
+ -------------------
l 2
l 2
2 1 2
10, 16
= ln ------------------- + 1 + -------------------
F
d 10, 16
d 10, 16
2
d 10, 16 2
d 10, 16
1 + -------------------
+ -------------------
M 1, 3 = M 1
1, 3
1, 3
= 2l 1 F1
= M3
1, 5
1, 5
1
1, 5
M 1, 5 = --- { ( M 1 + M 5 ) M d }
2
1, 7
1, 7
M 1, 7 = M 7 + d M d
1, 9
1, 9
1
1, 9
1, 9
M 1, 9 = --- { ( M 9 + 2 d + M 9 + d ) ( M 2 d + M d ) }
2
1, 11
1, 11
M 1, 11 = M 11 + 2 d M 2 d
1, 13
1, 13
1
1, 13
1, 13
M 1, 13 = --- { ( M 13 + 3 d + M 13 + 2 d ) ( M 3 d + M 2 d ) }
2
1, 15
1, 15
M 1, 15 = M 15 + 3 d M 3 d
DS00710C-page 90
AN710
EQUATION A.56 Mutual inductance
between conductors 14
and 4
14, 4
14, 4
14, 4
1 14, 4
M 14, 4 = --- M 14 + 3 + M14 + 2 M 3 + M 2
2
14, 8
14, 8
14, 8
1 14, 8
M 14, 8 = --- M14 + 2 + M14 + M 2 + M
where:
where:
14, 8
14, 8
M14 + 2 = 2 l14 + 2 F 14 + 2
14, 4
14, 4
M 16 + 3 = 2 l16 + 3 F 16 + 3
14, 8
14, 8
M 2
= 2l F
2 2
14, 4
14, 4
M16 + 2 = 2 l16 + 2 F 16 + 2
14, 4
14, 4
= 2l F
3
3 3
14, 4
14, 4
M 2
= 2l F
2 2
l 14 + 3 2 1 2
l 14 + 3
14, 4
F 14 + 3 = ln --------------------- + 1 + ---------------------
d 14, 4
d 14, 4
d 14, 4 2 1 2
1 + ---------------------
l 14 + 3
l 14 + 3
14, 4
-
+ --------------------
l 14 + 2 2 1 2
l 14 + 2
14, 4
= ln --------------------- + 1 + ---------------------
14 + 2
d
d 14, 4
14, 4
d 14, 4 2 1 2
1 + ---------------------
l 14 + 2
l
l 2 2 1 2
2
14, 4
= ln ---------------- + 1 + ----------------
F
2
d 14, 4
d 14, 4
l 14 + 2
14, 4
-
+ --------------------
d 14, 4 2 1 2 d 14, 4
1 + ----------------
+ ----------------
l 2
l 2
l 2 2 1 2
l 2
14, 4
= ln ---------------- + 1 + ----------------
F 2
d
d 14, 4
14, 4
d 14, 4 2 1 2 d 14, 4
1 + ----------------
+ ----------------
l 2
l 2
2, 6
M6 + d
2, 6
Md
2, 4
2, 4
1
2, 4
= --- { ( M 2 + M 4 ) M d }
2
2, 10
2, 10
M 2, 10 = M 10 + 2 d M 2 d
2, 12
2, 12
1
2, 12
2, 12
M 2, 12 = --- { ( M 12 + 2 d + M 12 + 3 d ) ( M 2 d + M 3 d ) }
2
2, 14
2, 14
,
,
14, 8
14, 8
M 14 + = 2 l 14 + F14 +
14, 8
14, 8
M
= 2l F
l 14 + 2 2 1 2
l 14 + 2
14, 8
F 14 + 2 = ln --------------------- + 1 + ---------------------
d
d 14, 8
14, 8
d 14, 8 2 1 2 d 14, 8
1 + ---------------------
+ ---------------------
l 14 + 2
l 14 + 2
l 14 + 2 1 2
l 14 +
14, 8
F14 + = ln ----------------- + 1 + -----------------
d 14, 8
d 14, 8
2
1
2
d 14, 8
d 14, 8
1 + -----------------
+ -----------------
l 14 +
l 14 +
l 2 2 1 2
l 2
14, 8
= ln ---------------- + 1 + ----------------
2
d 14, 8
d 14, 8
d 14, 8 2 1 2 d 14, 8
1 + ----------------
+ ----------------
l 2
l 2
l 2 1 2
l
14, 8
= ln ---------------- + 1 + ----------------
F
d 14, 8
d 14, 8
d 14, 8 2 1 2 d 14, 8
1 + ----------------
+ ----------------
l
l
5, 9
M 5, 9 = M 9 + d M d
5, 7
5, 7
1
5, 7
M 5, 7 = --- { ( M 5 + M 7 ) M d }
2
5, 3
5, 3
1
5, 3
M 5, 3 = --- { ( M 5 + M 3 ) M d }
2
5, 11
5, 11
1
5, 11
5, 11
+ M2 d ) }
M 5, 11 = --- { ( M 11 + d + M 11 + 2 d ) ( M d
2
5, 13
5, 13
M 2, 14 = M 14 + 3 d M 3 d
M 5, 13 = M 13 + 2 d M 2 d
2, 16
2, 16
1
2, 16
2, 16
M 2, 16 = --- { ( M 16 + 3 d + M 16 + 4 d ) ( M 3 d + M 2 d ) }
2
2, 8
2, 8
2, 8
2, 8
1
M 2, 8 = --- { ( M 8 + 2 + M 8 + ) ( M 2 + M ) }
2
5, 15
5, 15
1
5, 15
5, 15
M 5, 15 = --- { ( M 15 + 2 d + M 15 + 3 d ) ( M 3 d + M 2 d ) }
2
DS00710C-page 91
9, 13
M 9, 13 = M 13 + d M d
M 13, 15
13, 15
13, 15
1
13, 15
= --- { ( M 13
+ M 15 ) M d
}
2
15, 11
6, 10
M 6, 10 = M 10 + d M d
6, 14
6, 14
M 6, 14 = M 14 + 2 d M 2 d
6, 16
6, 16
6, 16
6, 16
1
M 6, 16 = --- { ( M 16 + 2 d + M 16 + 3 d ) ( M 2 d + M 3 d ) }
2
6, 12
6, 12
6, 12
6, 12
1
M 6, 12 = --- { ( M 12 + 2 + M 12 + ) ( M 2 + M ) }
2
6, 8
6, 8
1
6, 8
M 6, 8 = --- { ( M 6 + M 8 ) M d }
2
6, 4
6, 4
1
6, 4
M 6, 4 = --- { ( M 6 + M 4 ) M d }
2
10, 14
M 10, 14 = M 14 + d M d
10, 16
10, 16
1
10, 16
10, 16
M 10, 16 = --- { ( M 16 + 2 d + M 16 + d ) ( M 2 d + M d
)}
2
10, 12
10, 12
1
10, 12
M 10, 12 = --- { ( M 10
+ M 12 ) M d
}
2
10, 8
10, 8
1
10, 8
M 10, 8 = --- { ( M 10 + M 8 ) M d }
2
10, 4
10, 4
1
10, 4
10, 4
M 10, 4 = --- { ( M 10 + d + M 10 + 2 d ) ( M d
+ M2 d ) }
2
M 15, 11 = M 15 + d M d
15, 7
15, 7
15, 3
15, 3
M 15, 7 = M 15 + 2 d M 2 d
M 15, 3 = M 15 + 3 d M 3 d
11, 7
11, 7
M 11, 7 = M 11 + d M d
11, 3
11, 3
M 11, 3 = M 11 + 2 d M 2 d
M 7, 3 =
7, 3
M7 + d
7, 3
Md
16, 12
M 16, 12 = M 16 + d M d
16, 8
16, 8
16, 4
16, 4
M 16, 8 = M 16 + 2 d M 2 d
M 16, 4 = M 16 + 3 d M 3 d
12, 8
12, 8
M 12, 8 = M 12 + d M d
12, 4
12, 4
M 12, 4 = M 12 + 2 d M 2 d
8, 4
8, 4
M 8, 4 = M 8 + d M d
DS00710C-page 92
AN710
APPENDIX B:
% One_turn.m
% Inductance calculation with mutual inductance terms
% for 1 turn rectangular shape.
% Inductor type = Etched MCRF450 reader antenna
%
% Youbok Lee
%
% Microchip Technology Inc.
%-----------------------------------------% L_T = L_o + M_+ M_- (nH)
% unit = cm
% where
% L_o = L1 + L2 + L3+ L4 = (self inductance)
% M_- = Negative mutual inductance
% M_+ = positive mutual inductance = 0 for 1 turn coil
%
%------------- Length of each conductor ------------------% l_1a = l_1b = 3" = 7.62 Cm
% l_2 = l_4 = 10" = 25.4 Cm
% l_4 = 7.436 = 18.887 Cm
% gap = 3.692 cm
%-------Define segment length (cm) --------------------w = 0.508
t = 0.0001
gap = 3.692
l_1A = 7.62 - w/2.
l_1B = 7.62 - w/2.
l_2 = 25.4 - w
l_3 = 18.887 - w
l_4 = 25.4 - w
%---------- distance between branches (cm) ------d13 = l_2
d24 = l_3
%----------calculate self inductance --------L1A = 2*l_1A*(log((2*l_1A)/(w+t)) + 0.50049 + (w+t)/(3*l_1A))
L1B = 2*l_1B*(log((2*l_1B)/(w+t)) + 0.50049 + (w+t)/(3*l_1B))
L2 = 2*l_2*(log((2*l_2)/(w+t)) + 0.50049 + (w+t)/(3*l_2))
L3 = 2*l_3*(log((2*l_3)/(w+t)) + 0.50049 + (w+t)/(3*l_3))
L4 = 2*l_4*(log((2*l_4)/(w+t)) + 0.50049 + (w+t)/(3*l_4))
DS00710C-page 93
Q3 =log((l_3/d13)+(1+(l_3/d13)^2)^0.5)-(1+(d13/l_3)^2)^0.5 + (d13/l_3)
Q2_4 =log((l_2/d24)+(1+(l_2/d24)^2)^0.5)-(1+(d24/l_2)^2)^0.5 + (d24/l_2)
%--------- calculate negative mutual inductance -------%
M1A = 2*l_1A*Q1A_3
M1B = 2*l_1B*Q1B_3
M1A_gap = 2*(l_1A+gap)*Q_1A_gap
M1B_gap = 2*(l_1B+gap)*Q_1B_gap
M3 = 2*l_3*Q3
M1A_3 = (M1A+M3 - M1B_gap)/2.
M1B_3 = (M1B+M3 - M1A_gap)/2.
M2_4 = 2* (l_2*Q2_4)
M_T = 2* (M1A_3 + M1B_3 + M2_4)
%--------- Total Inductance (nH) ----------L_T = L_o - M_T
DS00710C-page 94
AN710
REFERENCES
[1] V. G. Welsby, The Theory and Design of Inductance Coils, John Wiley and Sons, Inc., 1960.
[2] Frederick W. Grover, Inductance Calculations
Working Formulas and Tables, Dover Publications,
Inc., New York, NY., 1946.
[3] Keith Henry, Editor, Radio Engineering Handbook,
McGraw-Hill Book Company, New York, NY., 1963.
[4] H.M. Greenhouse, IEEE Transaction on Parts,
Hybrid, and Packaging, Vol. PHP-10, No. 2, June
1974.
[5] K. Fujimoto, A. Henderson, K. Hirasawa, and J.R.
James, Small Antennas, John Wiley & Sons Inc.,
ISBN 0471 914134, 1987
[6] James K. Hardy, High Frequency Circuit Design,
Reston Publishing Company, Inc.Reston, Virginia,
1975.
[7] Simon Ramo, Fields and Waves in Communication Electronics, John Wiley, 1984.
DS00710C-page 95
DS00710C-page 96
INTRODUCTION
2.0
FIGURE 2-1:
READER CIRCUITS
BLOCK DIAGRAM OF TYPICAL RFID READER FOR FSK SIGNAL (125 kHz)
Transmitting Section
32
Antenna Coil
125 kHz
CLK
Microcontroller
Data Decoding
Interface with
Host Computer
Filter, Amplifier,
and Pulse Shaping
Envelope Detector
Receiving Section
To Host Computer
DS51137B-page 97
Transmitting Section
2.2
Receiving Section
DS51137B-page 98
DS51137B-page 99
2 3 4 5 6
7 8 9 10
cd e f g hi j
1 2 3 4 5 6 7 8 9 10
cde fg hi j
(1)
(0)
1 2 3
Transmitting Signal
Fc/8 =
15.625 kHz
(0)
Data Signal
80 sec
64 sec
80 sec
64 sec
Backscattering
Signal
Signal in Receiver
Coil
Output Signal of
Envelop Detector
Detected Signal
after Pulse Shaping
Circuit
DS51137B-page 100
PIC16C84
4.0
DS51137B-page 101
Manufacturer
Vendor
Vendor Part #
MILL-MAX
DIGIKEY
ED3318-ND
PHILIPS
DIGIKEY
1330PH-ND
CAP, 0.001 uF
POLYPROPYLENE
630V
PHILIPS
DIGIKEY
P3497-ND
C15, C17
PHILIPS
DIGIKEY
3001PH-ND
ECU-S2A182JCB
C9
CAP, 1800 pF
MONOLITH CERM,
5%, RAD, 100V
PHILIPS
DIGIKEY
P4864-ND
C19
PHILIPS
DIGIKEY
3003PH-ND
10
ECU-S1H682JCB
C12
PANASONIC
DIGIKEY
P4946-ND
11
ECQ-E1104KF
C4, C11
PANASONIC
DIGIKEY
EF1104-ND
12
ECS-F1CE106K
PANASONIC
DIGIKEY
P2038-ND
13
ECS-F1AE107
C1
PANASONIC
DIGIKEY
P2032-ND
14
1N4148
D1-D6
DIODE, GENERAL
PURPOSE, 1N4148
(DO-35)
DIODES INC.
DIGIKEY
1N4148DITRND
15
1N4936
D7
DIODE, 1A 400V
FAST-RECOVERY
RECTIFIER
DIODES INC
DIGIKEY
1N4936CT-ND
16
-SPARE-
LED1
-SPARE- LOCATION
DO NOT INSTALL
17
78F102J
L1
INDUCTOR, 1000 H,
COATED
JW MILLER
DIGIKEY
M7849-ND
18
MCT0003-001
L2
INDUCTOR, 1.62 mH
CORNELL DUBILIER
19
2N2907A
Q1, Q3, Q4
TRANSISTOR, PNP,
2N2907A, TO-92
MOTOROLA
20
2N2222A
Q2
TRANSISTOR, NPN,
2N2222A, TO-92
MOTOROLA
ALLIED
2N2222A
21
5043CX10R0J
R10, R13
RES, CF 10 OHM
1/4W 5%
PHILLIPS
22
82E CR-1/4W-B 5%
R11
RES, CF 82 OHM
1/4W 5%
YAGEO
DIGIKEY
82QBK-ND
23
5043CX100R0J
R18, R21
PHILLIPS
Part #
Part Description
Item #
Qty
110-93-318-41-001
xU5
DE9S-FRS
P2
CONN, D-SUB 9P
RECPT RT ANGLE
SPC
TECHNOLOGY
DJ005B
P1
JACK, POWER,
2.5 mm DC
PC MOUNT
LZR
ELECTRONICS
PKM22EPP-4001
SP1
BUZZER, PIEZO,
4kHz, 3-20V
MURATA
D220J20COGHAAAC C2, C3
ECQ-P6102JU
DS51137B-page 102
Reference
Designator
Item #
Qty
Vendor
Vendor Part #
24
5043CX330R0J
PHILLIPS
25
5043CX470R0J
R7
PHILLIPS
26
1K8 CR-1/4W-B 5%
R3
YAGEO
DIGIKEY
1.8KQBK-ND
27
YAGEO
DIGIKEY
1.82KXBK-ND
28
YAGEO
DIGIKEY
2.67KXBK-ND
29
3K3 CR-1/4W-B 5%
R2
YAGEO
DIGIKEY
3.3KQBK-ND
30
10K CR-1/4W-B 5%
YAGEO
DIGIKEY
10KQBK-ND
31
5043ED10K00F
R16, R29,
R30
RES, MF 10K
1/4W 1%
32
12K CR-1/4W-B 5%
R20, R25
YAGEO
DIGIKEY
12KQBK-ND
33
YAGEO
DIGIKEY
16.5KXBK-ND
34
22K CR-1/4W-B 5%
YAGEO
DIGIKEY
22KQBK-ND
35
YAGEO
DIGIKEY
47.5KXBK-ND
36
YAGEO
DIGIKEY
82.5KXBK-ND
37
5043CX100K0J
R9
RES, CF 100K
5% 1/4W
38
1M0 CR-1/4W-B 5%
R5, R24
YAGEO
DIGIKEY
1.0MQBK-ND
39
YAGEO
DIGIKEY
390KQBK-ND
40
LM78M12Ct
U1
NATIONAL
DIGIKEY
LM78M12CTND
41
LM78L05ACZ
U2
NATIONAL
DIGIKEY
LM78L05ACZND
42
MM74HC04N
U3
FAIRCHILD
SEMICONDUCTOR
DIGIKEY
MM74HC04NND
43
MM74HC4060N
U4
IC, 14 STAGE
BINARY COUNTER,
16P DIP
FAIRCHILD
SEMICONDUCTOR
DIGIKEY
MM74HC4060N
-ND
44
PIC16C84/P
U5
IC, PIC16C84
PLASTIC, 14P DIP
MICROCHIP
45
CD4017BCN
U6
IC, DECADE
COUNTER
FAIRCHILD
DIGIKEY
CD4017BCNND
46
MM74HC74AN
U7
FAIRCHILD
DIGIKEY
MM74HC74ANND
47
TL084CN
U8
SGS THOMPSON
MOUSER
511-TL084CN
48
EFO-EC4004A4
Y1
RESONATOR,
4.00MHZ CERAMIC
W/CAP
PANASONIC
DIGIKEY
PX400-ND
R6
Part Description
Manufacturer
PHILLIPS
PHILLIPS
DS51137B-page 103
6.0
The following source code is for the PIC16C84 microcontroller used in the FSK reader electronics.
; #=#=#=#=#=#=#=#=#=#=#= PROJECT Microchip FSK Reader =#=#=#=#=#=#=#=#=#=#=#
;
; PIC16C84 running at 4MHz, Ti=1us
;
;
;
;
;
;
;
;
;
;
;
;
;
;
///////////////////////////////////////////////////////////////////////////
Revision history
///////////////////////////////////////////////////////////////////////////
Ver
Date
Comment
0.01
0.03
29 Dec 97
28 Jan 98
20 Aug 98
Tbit=50Tcy=400Ti
Ttag=96Tbit
Header=h802A
processor pic16c84
#include p16c84.inc
__config b11111111101001
; Code Protect on, power-up timer on, WDT off, XT oscillator
#define
#define
#define
#define
_CARRY
_ZERO
_TO
_RP0
STATUS,0
STATUS,2
STATUS,4
STATUS,5
#define _BUZZ1
#define _BUZZ2
#define _RS232TX
#define _RS232RX
#define _T0CKI
StartPORTA
=
StartTRISA
=
BeepPort
=
Beep0
=
Beep1
=
Beep2
=
PORTA,0
PORTA,1
PORTA,2
PORTA,3
PORTA,4
b01100
b11000
PORTA
StartPORTA
StartPORTA | b00001
StartPORTA | b00010
#define _DATA_IN
PORTB,0
#define _UNUSED1
PORTB,1
#define _LED1
PORTB,2
#define _LED2
PORTB,3
#define _UNUSED2
PORTB,4
#define _UNUSED3
PORTB,5
#define _UNUSED4
PORTB,6
#define _UNUSED5
PORTB,7
StartPORTB
= b00000000
StartTRISB
= b00000001
StartOPTION
= b00001111
BO3
DelayReg
BitCtr
BeepCtrHi
TxByte
BeepCtrLo
=
=
=
=
=
=
DS51137B-page 104
h0C
h0C
h0D
h0D
h0E
h0E
=
=
=
=
=
=
=
=
=
=
=
=
SKIP macro
BTFSC
endm
PCLATH,7
org h0000
CLRF
PCLATH
CLRF
INTCON
CLRF
STATUS
GOTO
RESET_A
org h0004
CLRF
PCLATH
CLRF
INTCON
CLRF
STATUS
GOTO
RESET_A
RS232CR
MOVLW
GOTO
RS232TxDigit
ANDLW
d13
RS232TxW
h0F
;[0]
; |
;[0]
; |
;[0]
; |
;[0]
; |
Delay 7Ti
Delay 6Ti
Delay 5Ti
Delay 4Ti
DS51137B-page 105
TxByte
h0A
TxByte,W
_CARRY
DigitLT10
A-0-h0A
TxByte,f
0
TxByte,W
TxByte
_RS232TX
d35
DelayReg
DelayReg,f
RS232TxD1
_RS232TX
d32
DelayReg
DelayReg,f
RS232TxD2
BitCtr
BitCtr,3
TxByte,0
RS232TxBit1
_RS232TX
_CARRY
RS232TxBitDone
_RS232TX
_CARRY
RS232TxBitDone
TxByte,f
d30
DelayReg
RS232TxD3
DelayReg,f
RS232TxD3
BitCtr,f
RS232TxL1
Delay04
_RS232TX
0
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
;[1] Transmit W on RS232 at 9615 baud
; | TxByte=W
;[1] Transmit TxByte - 104us = 9615.4 baud
; | Stop bit
; | |
; | |
; | |
; | |
; | |
; | Start bit
; | |
; | |
; | |
; | |
; | |
; | |
; | BitCtr=#8
; | |
; | {% -4Ti
; |
Transmit TxByte.0, RR TxByte
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|% 4Ti
; |
delay 1 bit
; |
|
; |
|
; |
|
; |
|
; |
|
; |
DEC BitCtr
; | } until (BitCtr==#0)
; | delay
; | stop bit
; end
DS51137B-page 106
STATUS
FSR
StartPORTA
PORTA
StartPORTB
PORTB
;
;
;
;
;
;
;
Initialise registers
| Access register page 0
| FSR=#0
| Initialise PORT and TRIS registers
| |
| |
| |
_RP0
StartTRISA
TRISA
StartTRISB
TRISB
StartOPTION
OPTION_REG
_RP0
Old0
Old1
Old2
Old3
Old4
Old5
Old6
Old7
Old8
Old9
OldA
OldB
;^|
;^|
;^|
;^|
;^|
;^|
;^|
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
_LED1
Delay07
_LED2
h09
RS232TxW
d96
BitCtr
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
_DATA_IN
PreSync_H
_DATA_IN
PreSync_H
_DATA_IN
PreSync_H
_DATA_IN
DoSync_L
_DATA_IN
DoSync_L
Sync_Done
PreSync_H
BTFSS
_DATA_IN
GOTO
PreSync_L
BTFSS
_DATA_IN
GOTO
PreSync_L
DoSync_H
CLRWDT
BTFSC
_DATA_IN
GOTO
DoSync_H
BTFSC
_DATA_IN
GOTO
DoSync_H
GOTO
Sync_Done
Sync_Done
;% -192Ti from sample
MOVLW
d62
MOVWF
DelayReg
;% -190Ti from sample
ReadBit
|
|
|
|
|
Initialise OPTION register
|
|
Clear Old buffer
|
|
|
|
|
|
|
|
|
|
|
LEDs reading
|
|
Transmit TAB regularly
|
set BitCtr
|
Get an edge on _DATA_IN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|% 6 to (+4) from edge, say 8 from edge
DS51137B-page 107
delay
|
DelayReg,f
|
ReadBitD1
|
BO3
BO3.1=_DATA_IN
_DATA_IN
|
BO3,f
|% effective sample time
_DATA_IN
|
BO3,f
|
_DATA_IN
|
BO3,f
|
_CARRY
_CARRY=BO3.1
BO3,1
|
_CARRY
|
Buffer0,f
roll in _CARRY
Buffer1,f
|
Buffer2,f
|
Buffer3,f
|
Buffer4,f
|
Buffer5,f
|
Buffer6,f
|
Buffer7,f
|
Buffer8,f
|
Buffer9,f
|
BufferA,f
|
BufferB,f
|
% 19Ti from sample = -381Ti from sample
MOVLW
d124
set bit delay
MOVWF
DelayReg
|% -379Ti from sample
;% -7-DelayReg*3 Ti from sample
DECFSZ BitCtr,f
;
DEC BitCtr
GOTO
ReadBit
; } until (BitCtr==#0)
HeadSearch
MOVLW
MOVWF
HeadSearchL1
MOVLW
XORWF
BTFSS
GOTO
MOVLW
XORWF
BTFSS
GOTO
GOTO
NotHead0
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
BCF
BTFSC
BSF
DECFSZ
GOTO
GOTO
DS51137B-page 108
ReadBitD1
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
d96
BitCtr
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
h80
BufferB,W
_ZERO
NotHead0
h2A
BufferA,W
_ZERO
NotHead0
HeadFound
Buffer0,f
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Buffer8,f
Buffer9,f
BufferA,f
BufferB,f
Buffer0,0
_CARRY
Buffer0,0
BitCtr,f
HeadSearchL1
BigLoop1
set BitCtr
|
{
if (header found)
|
|
|
|
|
|
{
goto HeadFound
}
ROL Buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEC BitCtr
} until (BitCtr==#0)
goto BigLoop1
Buffer0,W
Old0,W
_ZERO
NotSame
Buffer1,W
Old1,W
_ZERO
NotSame
Buffer2,W
Old2,W
_ZERO
NotSame
Buffer3,W
Old3,W
_ZERO
NotSame
Buffer4,W
Old4,W
_ZERO
NotSame
Buffer5,W
Old5,W
_ZERO
NotSame
Buffer6,W
Old6,W
_ZERO
NotSame
Buffer7,W
Old7,W
_ZERO
NotSame
Buffer8,W
Old8,W
_ZERO
NotSame
Buffer9,W
Old9,W
_ZERO
NotSame
BufferA,W
OldA,W
_ZERO
NotSame
BufferB,W
OldB,W
_ZERO
NotSame
Same
Buffer0,W
Old0
Buffer1,W
Old1
Buffer2,W
Old2
Buffer3,W
Old3
Buffer4,W
Old4
Buffer5,W
Old5
DS51137B-page 109
Buffer6,W
Old6
Buffer7,W
Old7
Buffer8,W
Old8
Buffer9,W
Old9
BufferA,W
OldA
BufferB,W
OldB
BigLoop1
Same
TxTag
BSF
CALL
BCF
MOVLW
MOVWF
MOVLW
MOVWF
BeepLoopJ1
GOTO
BeepLoopJ2
MOVLW
MOVWF
MOVLW
MOVWF
BeepD1
CLRWDT
DECFSZ
GOTO
MOVLW
MOVWF
MOVLW
MOVWF
NOP
GOTO
BeepD2
CLRWDT
DECFSZ
GOTO
DECFSZ
GOTO
DECFSZ
GOTO
NOP
MOVLW
MOVWF
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
DS51137B-page 110
Beep0
BeepPort
;- Transmit tag
; LEDs Found tag
; |
; |
; Beep at 3597Hz for 1024 cycles
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
RS232CR
F
RS232TxW
S
RS232TxW
K
RS232TxW
RS232TxW
/
RS232TxW
8
RS232TxW
-
;
;
;
;
;
;
;
;
;
;
;
;
;
;
_LED2
Delay07
_LED1
d4
BeepCtrHi
d0
BeepCtrLo
BeepLoopJ2
Beep1
BeepPort
d34
DelayReg
DelayReg,f
BeepD1
Beep2
BeepPort
d32
DelayReg
BeepD2
DelayReg,f
BeepD2
BeepCtrLo,f
BeepLoopJ1
BeepCtrHi,f
BeepLoopJ2
RS232TxW
/
RS232TxW
1
RS232TxW
0
RS232TxW
RS232CR
T
RS232TxW
b
RS232TxW
i
RS232TxW
t
RS232TxW
=
RS232TxW
5
RS232TxW
0
RS232TxW
T
RS232TxW
c
RS232TxW
y
RS232TxW
RS232CR
C
RS232TxW
o
RS232TxW
n
RS232TxW
s
RS232TxW
t
RS232TxW
a
RS232TxW
n
RS232TxW
t
RS232TxW
RS232CR
T
RS232TxW
t
RS232TxW
a
RS232TxW
g
RS232TxW
=
RS232TxW
9
RS232TxW
6
RS232TxW
T
RS232TxW
b
RS232TxW
i
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DS51137B-page 111
RS232TxW
t
RS232TxW
RS232CR
P
RS232TxW
o
RS232TxW
l
RS232TxW
a
RS232TxW
r
RS232TxW
i
RS232TxW
t
RS232TxW
y
RS232TxW
RS232TxW
0
RS232TxW
RS232CR
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MOVLW
MOVWF
BufferB
FSR
SWAPF
CALL
MOVF
CALL
DECF
BTFSC
GOTO
CALL
INDF,W
RS232TxDigit
INDF,W
RS232TxDigit
FSR,f
FSR,4
TxLoop1
RS232CR
;
;
;
;
;
;
;
;
;
;
;
Transmit tag ID
|
|
|
|
|
|
|
|
|
|
GOTO
BigLoop1
; goto BigLoop1
TxLoop1
end
DS51137B-page 112
INTRODUCTION
2.0
FIGURE 2-1:
READER CIRCUITS
BLOCK DIAGRAM OF TYPICAL RFID READER FOR PSK SIGNAL (125 kHz)
Transmitting Section
32
Antenna Coil
125 kHz
CLK
Microcontroller
Data Decoding
Interface with
Host Computer
Filter, Amplifier
Pulse Shaping,
and
Phase Comparator
Circuits
Envelope Detector
Receiving Section
To Host Computer
DS51138B-page 113
Transmitting Section
2.2
Receiving Section
DS51138B-page 114
ance at the resonance frequency. This results in maximizing the antenna current, and therefore, the
magnetic field strength is maximized.
The reader circuit uses a single coil for both transmitting and receiving signals. An antenna coil
(L2: 1.62 mH) and a resonant capacitor (C21: 1000 pF)
forms a series resonant circuit for 125 kHz resonance
frequency. Since the C21 is grounded, the carrier signal (125 kHz) is filtered out to the ground after passing
the antenna coil. The circuit provides minimum imped-
FIGURE 3-1:
These pulses are fed to the set and reset lines of U5:A
and result in a 125 kHz output at Q whose duty cycle is
proportional to the phase difference between the two
pulse signals. If the duty cycle is near 50%, then the
transitions of the 62.5 kHz signals are approximately 90
degrees different which is ideal for PSK demodulation.
PP
EE Data
PP
PSK 1
Change on Data
PP
P
PSK 2
Change on 1
PP
P
PP
DS51138B-page 115
DS51138B-page 116
PIC16C84
4.0
DS51138B-page 117
Part Description
Manufacturer
Vendor
Vendor Part #
xU6
MILL-MAX
DIGIKEY
ED3314-ND
DE9S-FRS
P2
CONN, D-SUB 9P
RECPT RT ANGLE
DJ005B
P1
PKM22EPP-4001
SP1
BUZZER, PIEZO,
4KHz, 3-20V
MURATA
D100D20U2MHAAAC
C7, C15
PHILIPS
DIGIKEY
1301PH-ND
D220J20COGHAAAC
C2, C3
PHILIPS
DIGIKEY
1330PH-ND
ECU-S1H221JCA
C13, C14,
C23-C25,
C29, C31
PANASONIC
DIGIKEY
P4929-ND
ECQ-P6102JU
C21
CAP, 0.001 F
POLYPROPYLENE
630V
PHILIPS
DIGIKEY
P3497-ND
C26, C27
PHILIPS
DIGIKEY
3001PH-ND
10
ECU-S2A152JCB
C22
PHILIPS
DIGIKEY
P4863-ND
11
ECU-S2A182JCB
PHILIPS
DIGIKEY
P4864-ND
12
ECU-S1H682JCB
C12
PANASONIC
DIGIKEY
P4946-ND
13
ECK-F1H103ZF
C8, C10
PHILIPS
DIGIKEY
P4066A-ND
14
ECQ-V1103JM
C16
PANASONIC
DIGIKEY
P4713-ND
15
ECQ-E1104KF
PANASONIC
DIGIKEY
EF1104-ND
16
ECU-S1H121JCA
C28
PANASONIC
DIGIKEY
P4926-ND
17
ECE-A16Z10
CAP, 10 F, ELECTRO,
RAD, 16V, 20%
PANASONIC
DIGIKEY
P6616-ND
18
ECE-A25Z100
C1
PANASONIC
DIGIKEY
P6616-ND
19
1N4148
D1-D6
DIODE, GENERAL
PURPOSE, 1N4148
(DO-35)
DIODES INC.
DIGIKEY
1N4148DITRND
20
1N4936
D7, D8
DIODES INC
DIGIKEY
1N4936CT-ND
21
-SPARE-
LED1, C17
-SPARE- LOCATION
DO NOT INSTALL
22
78F102J
L1, L3
INDUCTOR, 1000 H,
COATED
JW MILLER
DIGIKEY
M7849-ND
23
MCT0003-001
L2
INDUCTOR, 1.62 mH
CORNELL
DUBILIER
Item #
Qty
Part #
110-93-314-41-001
DS51138B-page 118
SPC
TECHNOLOGY
Reference
Designator
Item #
Qty
Vendor
Vendor Part #
24
2N2907A
Q1, Q3, Q4
TRANSISTOR, PNP,
2N2907A, TO-92
MOTOROLA
25
2N2222A
Q2
TRANSISTOR, NPN,
2N2222A, TO-92
MOTOROLA
ALLIED
2N2222A
26
5043CX10R0J
R10, R13
PHILLIPS
27
82E CR-1/4W-B 5%
R11
YAGEO
DIGIKEY
82QBK-ND
28
5043CX100R0J
R18
PHILLIPS
29
5043CX220R0J
R40
PHILLIPS
30
5043CX330R0J
PHILLIPS
31
5043CX470R0J
R7
PHILLIPS
32
1K21 MF-1/4W-B 1%
R27
YAGEO
DIGIKEY
1.21KXBK-ND
33
1K8 CR-1/4W-B 5%
R3
YAGEO
DIGIKEY
1.8KQBK-ND
34
1K82 MF-1/4W-B 1%
R24
YAGEO
DIGIKEY
1.82KXBK-ND
35
3K3 CR-1/4W-B 5%
R2
YAGEO
DIGIKEY
3.3KQBK-ND
36
5043CX4K700J
R29
RES, CF 4.7K 5%
1/4W, AXIAL
37
10K CR-1/4W-B 5%
DIGIKEY
10KQBK-ND
38
5043ED10K00F
R31, R43,
R44
39
12K CR-1/4W-B 5%
R20, R38
YAGEO
DIGIKEY
12KQBK-ND
40
16K5 MF-1/4W-B 1%
R34
YAGEO
DIGIKEY
16.5KXBK-ND
41
22K CR-1/4W-B 5%
R6, R8
YAGEO
DIGIKEY
22KQBK-ND
42
47K5 MF-1/4W-B 1%
R37
YAGEO
DIGIKEY
47.5KXBK-ND
43
56K CR-1/4W-B 5%
R32
YAGEO
DIGIKEY
56KQBK-ND
44
5043CX100K0J
45
180K CR-1/4W-B 5%
R26
YAGEO
DIGIKEY
180KQBK-ND
46
270K CR-1/4W-B 5%
R15
YAGEO
DIGIKEY
270KQBK-ND
47
1M0 CR-1/4W-B 5%
YAGEO
DIGIKEY
1.0MQBK-ND
48
LM78M12CT
U1
NATIONAL
DIGIKEY
LM78M12CTND
49
LM78L05ACZ
U2
NATIONAL
DIGIKEY
LM78L05ACZND
Part Description
Manufacturer
PHILLIPS
YAGEO
PHILLIPS
PHILLIPS
DS51138B-page 119
Manufacturer
Vendor
Vendor Part #
FAIRCHILD
SEMICONDUCTOR
DIGIKEY
MM74HC04NND
U4
DIGIKEY
CD4030CNND
CD4013BCN
U5, U6
DIGIKEY
CD4013BCNND
PIC16C84/P
U7
54
MM74HC4060N
U8
FAIRCHILD
SEMICONDUCTOR
DIGIKEY
MM74HC4060
N-ND
55
CD4001BCN
U9
FAIRCHILD
SEMICONDUCTOR
DIGIKEY
CD4001BCNND
56
TLC3702CP
U10
TEXAS
INSTRUMENTS
MOUSER
TLC3702CP
57
TL084CN
U11
SGS THOMPSON
MOUSER
511-TL084CN
58
EFO-EC4004A4
Y1
RESONATOR,
4.00MHZ CERAMIC
W/CAP
PANASONIC
DIGIKEY
PX400-ND
Part #
Part Description
Item #
Qty
50
MM74HC04N
U3
51
CD4030CN
52
53
DS51138B-page 120
MICROCHIP
6.0
The following source code is for the PIC16C84 microcontroller used in the PSK reader electronics.
; #=#=#=#=#=#=#=#=#=#=#= PROJECT Microchip PSK Reader =#=#=#=#=#=#=#=#=#=#=#
;
; PIC16C84 running at 4MHz, Ti=1us
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
///////////////////////////////////////////////////////////////////////////
Revision history
///////////////////////////////////////////////////////////////////////////
Ver
Date
Comment
0.01
0.03
29 Dec 97
28 Jan 98
20 Aug 98
Tbit=32Tcy=256Ti
Ttag=128Tbit
Header=h802A
processor pic16c84
#include p16c84.inc
__config b11111111101001
; Code Protect on, power-up timer on, WDT off, XT oscillator
#define
#define
#define
#define
_CARRY
_ZERO
_TO
_RP0
STATUS,0
STATUS,2
STATUS,4
STATUS,5
#define _BUZZ1
#define _BUZZ2
#define _RS232TX
#define _RS232RX
#define _T0CKI
StartPORTA
=
StartTRISA
=
BeepPort
=
Beep0
=
Beep1
=
Beep2
=
PORTA,0
PORTA,1
PORTA,2
PORTA,3
PORTA,4
b01100
b11000
PORTA
StartPORTA
StartPORTA | b00001
StartPORTA | b00010
#define _DATA_IN
PORTB,0
#define _UNUSED1
PORTB,1
#define _LED1
PORTB,2
#define _LED2
PORTB,3
#define _UNUSED2
PORTB,4
#define _UNUSED3
PORTB,5
#define _UNUSED4
PORTB,6
#define _UNUSED5
PORTB,7
StartPORTB
= b00000000
StartTRISB
= b00000001
StartOPTION
= b00001111
BO3
DelayReg
BitCtr
BeepCtrHi
TxByte
BeepCtrLo
=
=
=
=
=
=
h0C
h0C
h0D
h0D
h0E
h0E
DS51138B-page 121
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
h10
h11
h12
h13
h14
h15
h16
h17
h18
h19
h1A
h1B
h1C
h1D
h1E
h1F
h20
h21
h22
h23
h24
h25
h26
h27
h28
h29
h2A
h2B
h2C
h2D
h2E
h2F
SKIP macro
BTFSC
endm
PCLATH,7
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
org h0000
CLRF
PCLATH
CLRF
INTCON
CLRF
STATUS
GOTO
RESET_A
org h0004
CLRF
PCLATH
CLRF
INTCON
CLRF
STATUS
GOTO
RESET_A
RS232CR
MOVLW
GOTO
RS232TxDigit
ANDLW
MOVWF
DS51138B-page 122
d13
RS232TxW
h0F
TxByte
;[0]
; |
;[0]
; |
;[0]
; |
;[0]
; |
Delay 7Ti
Delay 6Ti
Delay 5Ti
Delay 4Ti
h0A
TxByte,W
_CARRY
DigitLT10
A-0-h0A
TxByte,f
0
TxByte,W
TxByte
_RS232TX
d35
DelayReg
DelayReg,f
RS232TxD1
_RS232TX
d32
DelayReg
DelayReg,f
RS232TxD2
BitCtr
BitCtr,3
TxByte,0
RS232TxBit1
_RS232TX
_CARRY
RS232TxBitDone
_RS232TX
_CARRY
RS232TxBitDone
TxByte,f
d30
DelayReg
RS232TxD3
DelayReg,f
RS232TxD3
BitCtr,f
RS232TxL1
Delay04
_RS232TX
0
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
;[1] Transmit W on RS232 at 9615 baud
; | TxByte=W
;[1] Transmit TxByte - 104us = 9615.4 baud
; | Stop bit
; | |
; | |
; | |
; | |
; | |
; | Start bit
; | |
; | |
; | |
; | |
; | |
; | |
; | BitCtr=#8
; | |
; | {% -4Ti
; |
Transmit TxByte.0, RR TxByte
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|% 4Ti
; |
delay 1 bit
; |
|
; |
|
; |
|
; |
|
; |
|
; |
DEC BitCtr
; | } until (BitCtr==#0)
; | delay
; | stop bit
; end
STATUS
FSR
StartPORTA
PORTA
StartPORTB
PORTB
;
;
;
;
;
;
;
Initialise registers
| Access register page 0
| FSR=#0
| Initialise PORT and TRIS registers
| |
| |
| |
DS51138B-page 123
_RP0
StartTRISA
TRISA
StartTRISB
TRISB
StartOPTION
OPTION_REG
_RP0
Old0
Old1
Old2
Old3
Old4
Old5
Old6
Old7
Old8
Old9
OldA
OldB
OldC
OldD
OldE
OldF
;^|
;^|
;^|
;^|
;^|
;^|
;^|
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
BSF
CALL
BCF
MOVLW
CALL
MOVLW
MOVWF
_LED1
Delay07
_LED2
h09
RS232TxW
d128
BitCtr
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
Initialise OPTION register
|
|
Clear Old buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BigLoop1
GetEdge
BTFSC
GOTO
NOP
PreSync_L
BTFSC
GOTO
BTFSC
GOTO
DoSync_L
CLRWDT
BTFSS
GOTO
BTFSS
GOTO
GOTO
_DATA_IN
PreSync_H
_DATA_IN
PreSync_H
_DATA_IN
PreSync_H
_DATA_IN
DoSync_L
_DATA_IN
DoSync_L
Sync_Done
PreSync_H
BTFSS
_DATA_IN
GOTO
PreSync_L
BTFSS
_DATA_IN
GOTO
PreSync_L
DoSync_H
CLRWDT
BTFSC
_DATA_IN
GOTO
DoSync_H
BTFSC
_DATA_IN
GOTO
DoSync_H
GOTO
Sync_Done
Sync_Done
;% -120Ti from sample
NOP
MOVLW
d38
DS51138B-page 124
LEDs reading
|
|
Transmit TAB regularly
|
set BitCtr
|
Get an edge on _DATA_IN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|% 6 to (+4) from edge, say 8 from edge
NOP
ReadBitD1
DECFSZ
GOTO
CLRF
BTFSC
INCF
BTFSC
INCF
BTFSC
INCF
BCF
BTFSC
BSF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
HeadSearch
MOVLW
MOVWF
HeadSearchL1
MOVLW
XORWF
BTFSS
GOTO
MOVLW
XORWF
BTFSS
GOTO
GOTO
NotHead0
MOVLW
XORWF
BTFSS
GOTO
MOVLW
XORWF
BTFSS
GOTO
GOTO
NotHead1
RLF
d128
BitCtr
h80
BufferF,W
_ZERO
NotHead0
h2A
BufferE,W
_ZERO
NotHead0
HeadPolarity0
h7F
BufferF,W
_ZERO
NotHead1
hD5
BufferE,W
_ZERO
NotHead1
HeadPolarity1
Buffer0,f
; set BitCtr
; |
; {
;
if (header found)
;
|
;
|
;
|
;
|
;
|
;
|
;
{
;
goto HeadPolarity0
;
}
;
if (inverse header found)
;
|
;
|
;
|
;
|
;
|
;
|
;
{
;
goto HeadPolarity1
;
}
;
ROL Buffer
DS51138B-page 125
DS51138B-page 126
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Buffer8,f
Buffer9,f
BufferA,f
BufferB,f
BufferC,f
BufferD,f
BufferE,f
BufferF,f
Buffer0,0
_CARRY
Buffer0,0
BitCtr,f
HeadSearchL1
BigLoop1
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
DEC BitCtr
; } until (BitCtr==#0)
; goto BigLoop1
Buffer0,f
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Buffer8,f
Buffer9,f
BufferA,f
BufferB,f
BufferC,f
BufferD,f
BufferE,f
BufferF,f
Buffer0,W
Old0,W
_ZERO
NotSame
Buffer1,W
Old1,W
_ZERO
NotSame
Buffer2,W
Old2,W
_ZERO
NotSame
Buffer3,W
Old3,W
_ZERO
NotSame
Buffer4,W
Old4,W
_ZERO
NotSame
Buffer5,W
Old5,W
_ZERO
NotSame
Buffer6,W
Old6,W
_ZERO
NotSame
Buffer7,W
Old7,W
_ZERO
NotSame
Buffer8,W
Old8,W
_ZERO
NotSame
Buffer9,W
Old9,W
_ZERO
NotSame
BufferA,W
OldA,W
_ZERO
NotSame
BufferB,W
OldB,W
_ZERO
NotSame
BufferC,W
OldC,W
_ZERO
NotSame
BufferD,W
OldD,W
_ZERO
NotSame
BufferE,W
OldE,W
_ZERO
NotSame
BufferF,W
OldF,W
_ZERO
NotSame
Same
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
Buffer0,W
Old0
Buffer1,W
Old1
Buffer2,W
Old2
Buffer3,W
Old3
Buffer4,W
Old4
Buffer5,W
Old5
Buffer6,W
Old6
Buffer7,W
Old7
Buffer8,W
Old8
Buffer9,W
Old9
BufferA,W
OldA
NotSame
DS51138B-page 127
BufferB,W
OldB
BufferC,W
OldC
BufferD,W
OldD
BufferE,W
OldE
BufferF,W
OldF
BigLoop1
Same
TxTag
BSF
CALL
BCF
MOVLW
MOVWF
MOVLW
MOVWF
BeepLoopJ1
GOTO
BeepLoopJ2
MOVLW
MOVWF
MOVLW
MOVWF
BeepD1
CLRWDT
DECFSZ
GOTO
MOVLW
MOVWF
MOVLW
MOVWF
NOP
GOTO
BeepD2
CLRWDT
DECFSZ
GOTO
DECFSZ
GOTO
DECFSZ
GOTO
NOP
MOVLW
MOVWF
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
CALL
MOVLW
CALL
MOVLW
CALL
DS51138B-page 128
Beep0
BeepPort
;- Transmit tag
; LEDs Found tag
; |
; |
; Beep at 3597Hz for 1024 cycles
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
RS232CR
P
RS232TxW
S
RS232TxW
K
RS232TxW
/
RS232TxW
2
RS232TxW
RS232CR
T
RS232TxW
b
RS232TxW
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
_LED2
Delay07
_LED1
d4
BeepCtrHi
d0
BeepCtrLo
BeepLoopJ2
Beep1
BeepPort
d34
DelayReg
DelayReg,f
BeepD1
Beep2
BeepPort
d32
DelayReg
BeepD2
DelayReg,f
BeepD2
BeepCtrLo,f
BeepLoopJ1
BeepCtrHi,f
BeepLoopJ2
i
RS232TxW
t
RS232TxW
=
RS232TxW
3
RS232TxW
2
RS232TxW
T
RS232TxW
c
RS232TxW
y
RS232TxW
RS232CR
C
RS232TxW
o
RS232TxW
n
RS232TxW
s
RS232TxW
t
RS232TxW
a
RS232TxW
n
RS232TxW
t
RS232TxW
RS232CR
T
RS232TxW
t
RS232TxW
a
RS232TxW
g
RS232TxW
=
RS232TxW
1
RS232TxW
2
RS232TxW
8
RS232TxW
T
RS232TxW
b
RS232TxW
i
RS232TxW
t
RS232TxW
RS232CR
P
RS232TxW
o
RS232TxW
l
RS232TxW
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DS51138B-page 129
a
RS232TxW
r
RS232TxW
i
RS232TxW
t
RS232TxW
y
RS232TxW
RS232TxW
0
RS232TxW
RS232CR
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MOVLW
MOVWF
BufferF
FSR
SWAPF
CALL
MOVF
CALL
DECF
BTFSC
GOTO
CALL
INDF,W
RS232TxDigit
INDF,W
RS232TxDigit
FSR,f
FSR,4
TxLoop1
RS232CR
;
;
;
;
;
;
;
;
;
;
;
Transmit tag ID
|
|
|
|
|
|
|
|
|
|
GOTO
BigLoop1
; goto BigLoop1
TxLoop1
end
DS51138B-page 130
INTRODUCTION
2.0
FIGURE 2-1:
READER CIRCUITS
BLOCK DIAGRAM OF TYPICAL RFID READER FOR ASK SIGNAL (125 kHz)
Transmitting Section
32
Antenna Coil
125 kHz
CLK
Microcontroller
Data Decoding
Interface with
Host Computer
Filter, Amplifier,
and Pulse Shaping
Envelope Detector
Receiving Section
To Host Computer
DS51166C-page 131
Transmitting Section
DS51166C-page 132
2.2
Receiving Section
1
1
----------- > R > ----------o C
oC
where s and o are the angular frequencies of the
modulation (data) and carrier (125 kHz), respectively. R
is the load (discharging) resistor.
The demodulated signal must then pass through a filter
and signal shaping circuit before it is fed to the
microcontroller. The microcontroller performs data
decoding and communicates with the host computer
through an RS-232 or other serial interface protocols.
The reader circuit uses a single coil for both transmitting and receiving signals. An antenna coil
(L2: 1.62 mH) and a resonant capacitor (C14: 1000 pF)
forms a series resonant circuit for a 125 kHz resonance
frequency. Since the C14 is grounded, the carrier
signal (125 kHz) is filtered out to ground after passing
the antenna coil. The circuit provides a minimum
impedance at the resonance frequency. This results in
maximizing the antenna current, and therefore, the
magnetic field strength is maximized.
L2, C14, D7, C15, R24, and the other components in
the bottom part of the circuit form a signal receiving
section. D9 is a demodulator which detects the
envelope of the backscattering signal.
D9 and C15 form a half-wave capacitor-filtered rectifier.
The detected envelope signal is charged into C15. R24
provides a discharge path for the voltage charged in
C15. This voltage passes active filters (U5:B and C)
and the pulse shaping circuitry (U5:A) before it is fed
into the PIC16C84 for data processing.
The PIC16C84 microcontroller performs data decoding
and communicates with the host computer via an
RS-232 serial interface.
DS51166C-page 133
DS51166C-page 134
Quantity:
Part Number
Part Description
Reference Design
02-01518-D
03-01518
04-01518
08-00161
@U3
110-93-318-41-001
xU3
DE9S-FRS
P2
DJ005B
PC MOUNT SP1
PKM22EPP-4001
BZ1
ECU-S1H221JCA
ECQ-P1102JZ
ECQ-P6102JU
ECU-S2A182JCB
ECQ-V1103JM
ECQ-E1104KF
C7, C8
ECE-A16Z10
ECE-A25Z100
1N4148
D1-D8
1N4936
D9
MCT0003-001
INDUCTOR, 1.62 H,
L2
2N2907A-TO18
Q1, Q3, Q4
2N2222A-TO18
Q2
5043CX10R0J
R10,R8
82E CR-1/4W-B 5%
R9
5043CX100R0J
R15
5043CX1K000J
RES, CF 1K 1/4W 5%
R6
5043CX330R0J
5043CX470R0J
R4
1K8 CR-1/4W-B 5%
R7
390K CR-1/4W-T 5%
RES, CF 390K-OHM,5%,1/4W
R24
220K CR-1/4W-T 5%
R21
8K2 CR-1/4W-T 5%
R20
C1, C2
C6
L1
DS51166C-page 135
Part Number
Part Description
Reference Design
10K CR-1/4W-B 5%
5043CX47K00J
R18
12K CR-1/4W-B 5%
R16
22K CR-1/4W-B 5%
5043CX100K0J
R13,R26
1M0 CR-1/4W-B 5%
LM78L05ACZ
U1
MM74HC04N
U2
PIC16F84-10/P
U3
MM74HC4060N
U4
EFO-EC4004A4
Y1
JS-01
P2
DS51166C-page 136
U5
6.0
The following source code is for the PIC16C84 microcontroller used in the ASK reader electronics.
; #=#=#=#=#=#=#=#=#=#=#= PROJECT Microchip ASK Reader =#=#=#=#=#=#=#=#=#=#=#
; v002.asm
; PIC16C84 running at 4MHz, Ti=1us
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
///////////////////////////////////////////////////////////////////////////
Revision history
///////////////////////////////////////////////////////////////////////////
Ver
Date
Comment
0.01
0.02
01 Jul 98
29 Jul 98
Tbit=64Tcy=512Ti
Manchester encoded
Microchip - Header=h802A Ttag=128Tbit
- OR EM ASK - Header=b111111111 trailer=b0
Ttag=64Tbit
processor pic16c84
#include p16c84.inc
__config b11111111101001
; Code Protect on, power-up timer on, WDT off, XT oscillator
#define bit_CARRY
#define bit_ZERO
#define bit_RP0
#define _BUZZ1
#define _BUZZ2
#define _RS232TX
#define _RS232RX
#define _T0CKI
StartPORTA
=
StartTRISA
=
BeepPort
=
Beep0
=
Beep1
=
Beep2
=
STATUS,0
STATUS,2
STATUS,5
PORTA,0
PORTA,1
PORTA,2
PORTA,3
PORTA,4
b01100
b11000
PORTA
StartPORTA
StartPORTA | b00001
StartPORTA | b00010
#define _DATA_IN
PORTB,0
#define _UNUSED1
PORTB,1
#define _LED2
PORTB,2
#define _LED1
PORTB,3
#define _UNUSED2
PORTB,4
#define _UNUSED3
PORTB,5
#define _UNUSED4
PORTB,6
#define _UNUSED5
PORTB,7
StartPORTB
= b00000000
StartTRISB
= b00000001
StartOPTION
= b10001111
BO3
DelayReg1
Mask
BitCtr
BeepCtrHi
TxByte
BeepCtrLo
=
=
=
=
=
=
=
h0C
h0C
h0C
h0D
h0D
h0E
h0E
DS51166C-page 137
= h0E
= h0F
= h0F
Buffer0
Buffer1
Buffer2
Buffer3
Buffer4
Buffer5
Buffer6
Buffer7
Buffer8
Buffer9
BufferA
BufferB
BufferC
BufferD
BufferE
BufferF
Old0
Old1
Old2
Old3
Old4
Old5
Old6
Old7
Old8
Old9
OldA
OldB
OldC
OldD
OldE
OldF
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
SKIP macro
BTFSC
endm
PCLATH,7
h10
h11
h12
h13
h14
h15
h16
h17
h18
h19
h1A
h1B
h1C
h1D
h1E
h1F
h20
h21
h22
h23
h24
h25
h26
h27
h28
h29
h2A
h2B
h2C
h2D
h2E
h2F
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
org h0000
CLRF
PCLATH
CLRF
INTCON
CLRF
STATUS
GOTO
RESET_A
org h0004
CLRF
PCLATH
CLRF
INTCON
CLRF
STATUS
GOTO
RESET_A
RETLW
;[0]
; |
;[0]
; |
;[0]
; |
;[0]
; |
MOVLW
d13
NOP
Delay06:
NOP
Delay05:
NOP
Delay04:
RS232CR:
DS51166C-page 138
Delay 7Ti
Delay 6Ti
Delay 5Ti
Delay 4Ti
RS232TxW
h0F
TxByte
h0A
TxByte,W
bit_CARRY
DigitLT10
A-0-h0A
TxByte,f
0
TxByte,W
TxByte
_RS232TX
d35
DelayReg1
DelayReg1,f
RS232TxD1
_RS232TX
d32
DelayReg1
DelayReg1,f
RS232TxD2
BitCtr
BitCtr,3
TxByte,0
RS232TxBit1
_RS232TX
bit_CARRY
RS232TxBitDone
_RS232TX
bit_CARRY
RS232TxBitDone
TxByte,f
d30
DelayReg1
RS232TxD3
DelayReg1,f
RS232TxD3
BitCtr,f
RS232TxL1
Delay04
_RS232TX
0
ParityReg1
d10
BitCtr
ParityReg2
h10
; |
;[1] Transmit LSnybble of W on RS232
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
;[1] Transmit W on RS232 at 9615 baud
; | TxByte=W
;[1] Transmit TxByte - 104us = 9615.4 baud
; | Stop bit
; | |
; | |
; | |
; | |
; | |
; | Start bit
; | |
; | |
; | |
; | |
; | |
; | |
; | BitCtr=#8
; | |
; | {% -4Ti
; |
Transmit TxByte.0, RR TxByte
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|% 4Ti
; |
delay 1 bit
; |
|
; |
|
; |
|
; |
|
; |
|
; |
DEC BitCtr
; | } until (BitCtr==#0)
; | delay
; | stop bit
; end
;[0] Check parity
; | ParityReg1=0
; | BitCtr=10
; | |
; | {
; |
ParityReg2=0
; |
Mask=h10
DS51166C-page 139
DS51166C-page 140
Mask
bit_CARRY
Buffer0,f
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Buffer6,7
ParityReg2,f
Mask,W
Buffer6,7
ParityReg1,f
bit_CARRY
Mask,f
bit_CARRY
ParityL2
ParityReg2,0
ParityBad
BitCtr,f
ParityL1
h10
Mask
bit_CARRY
Buffer0,f
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Mask,W
Buffer6,7
ParityReg1,f
bit_CARRY
Mask,f
Mask,0
ParityL3
ParityReg1,W
h1E
bit_ZERO
ParityBad
BufferF,W
Buffer7
BufferE,W
Buffer6
BufferD,W
Buffer5
BufferC,W
Buffer4
BufferB,W
Buffer3
BufferA,W
Buffer2
Buffer9,W
Buffer1
Buffer8,W
Buffer0
bit_CARRY
0
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
LSL Buffer0-7
|
|
|
|
|
|
|
|
if (Buffer6.7==1)
{ INC ParityReg2 }
W=Mask
if (Buffer6.7==1)
{ ParityReg1=ParityReg1 XOR W }
LSR Mask
|
} until (bit_CARRY==1)
|
if (ParityReg2.0==1)
{ goto ParityBad }
DEC BitCtr
} until (BitCtr==0)
Mask=h10
|
{
LSL Buffer0-7
|
|
|
|
|
|
|
|
W=Mask
if (Buffer6.7==1)
{ ParityReg1=ParityReg1 XOR W }
LSR Mask
|
} until (Mask.0==1)
|
if ((ParityReg1 AND h1E)!=0)
|
|
{ goto ParityBad }
Buffer0-7=Buffer8-F
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bit_CARRY=0
BufferF,W
Buffer7
BufferE,W
Buffer6
BufferD,W
Buffer5
BufferC,W
Buffer4
BufferB,W
Buffer3
BufferA,W
Buffer2
Buffer9,W
Buffer1
Buffer8,W
Buffer0
bit_CARRY
0
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Buffer0-7=Buffer8-F
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bit_CARRY=1
STATUS
FSR
StartPORTA
PORTA
StartPORTB
PORTB
bit_RP0
StartTRISA
TRISA
StartTRISB
TRISB
StartOPTION
OPTION_REG
bit_RP0
Old0
Old1
Old2
Old3
Old4
Old5
Old6
Old7
; Initialise registers
; | Access register page 0
; | FSR=#0
; | Initialise PORT and TRIS registers
; | |
; | |
; | |
;^| |
;^| |
;^| |
;^| |
;^| |
;^| Initialise OPTION register
;^| |
; | |
; | Clear Old buffer
; | |
; | |
; | |
; | |
; | |
; | |
; | |
_LED1
Delay07
_LED2
h09
RS232TxW
d128
BitCtr
;
;
;
;
;
;
;
LEDs reading
|
|
Transmit TAB regularly
|
set BitCtr
|
;
;
;
;
;
;
;
;
GetEdge:
BTFSC
GOTO
NOP
PreSync_L0:
NOP
BTFSC
GOTO
_DATA_IN
PreSync_H0
_DATA_IN
PreSync_H0
DS51166C-page 141
MOVLW
SUBWF
BTFSC
GOTO
CALL
DoSync_H:
MOVLW
MOVWF
CALL
GOTO
DoSync_HL:
INCF
BTFSC
BTFSS
SKIP
GOTO
BTFSC
GOTO
Period
Period,f
Period,6
Period,4
BigLoop1
_DATA_IN
PreSync_L1
d48
Period,W
bit_CARRY
Sync_Done
Delay05
d2
Period
Delay04
DoSync_HL
Period,f
Period,6
Period,4
BigLoop1
_DATA_IN
DoSync_HL
MOVLW
SUBWF
BTFSS
GOTO
d16
Period,W
bit_CARRY
BigLoop1
MOVLW
SUBWF
BTFSS
GOTO
GOTO
d48
Period,W
bit_CARRY
DoSync_L
Sync_Done
PreSync_H0:
NOP
BTFSS
GOTO
CLRF
PreSync_H1:
INCF
BTFSC
BTFSS
SKIP
GOTO
BTFSC
GOTO
MOVLW
SUBWF
BTFSC
GOTO
CALL
DoSync_L:
MOVLW
DS51166C-page 142
_DATA_IN
PreSync_L0
Period
Period,f
Period,6
Period,4
BigLoop1
_DATA_IN
PreSync_H1
d48
Period,W
bit_CARRY
Sync_Done
Delay05
d2
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
| Period=0
| { % 7+Period*8 from low sample
|
INC Period
|
if ((Period*8Ti)>=Tbit*1.25=512Ti*1.25=640Ti)
|
|
|
|
|
{ goto BigLoop1 }
| } until (_DATA_IN==1)
| |
|% 6+Period*8 from low sample
|% 6 from rise
| if ((Period*8)>=Tbit*0.75=512Ti*0.75=384Ti)
| |
| |
| { goto Sync_Done }
|% 10 from rise
| delay
|% 15 from rise
| Period=2
| |
| delay
| |
| {% 7+Period*8 from rise
|
INC Period
|
if ((Period*8Ti)>=Tbit*1.25=512Ti*1.25=640Ti)
|
|
|
|
|
{ goto BigLoop1 }
| } until (_DATA_IN==0)
| |
|% 6+Period*8 from rise
|% 6 from fall
| if ((Period*8Ti)<Tbit*0.25=512Ti*0.25=128Ti)
| |
| |
| { goto BigLoop1 }
|% 10 from fall
| if ((Period*8Ti)<Tbit*0.75=512Ti*0.75=384Ti)
| |
| |
| { goto DoSync_L }
| goto Sync_Done
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
Period
Delay04
DoSync_LL
MOVLW
SUBWF
BTFSS
GOTO
d16
Period,W
bit_CARRY
BigLoop1
MOVLW
SUBWF
BTFSS
GOTO
GOTO
d48
Period,W
bit_CARRY
DoSync_H
Sync_Done
Period,f
Period,6
Period,4
BigLoop1
_DATA_IN
DoSync_LL
Sync_Done:
MOVLW
MOVWF
NOP
ReadBit:
ReadBitD1:
DECFSZ
GOTO
CLRF
BTFSC
INCF
BTFSC
INCF
BTFSC
INCF
BCF
BTFSC
BSF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
MOVLW
MOVWF
NOP
ReadBitD2:
DECFSZ
d121
DelayReg1
DelayReg1,f
ReadBitD1
BO3
_DATA_IN
BO3,f
_DATA_IN
BO3,f
_DATA_IN
BO3,f
bit_CARRY
BO3,1
bit_CARRY
Buffer0,f
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Buffer8,f
Buffer9,f
BufferA,f
BufferB,f
BufferC,f
BufferD,f
BufferE,f
BufferF,f
d76
DelayReg1
DelayReg1,f
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
| |
| delay
| |
| {% 7+Period*8 from fall
|
INC Period
|
if ((Period*8Ti)>=Tbit*1.25=512Ti*1.25=640Ti)
|
|
|
|
|
{ goto BigLoop1 }
| } until (_DATA_IN==1)
| |
|% 6+Period*8 from fall
|% 6 from rise
| if ((Period*8Ti)<Tbit*0.25=512Ti*0.25=128Ti)
| |
| |
| { goto BigLoop1 }
|% 10 from rise
| if ((Period*8Ti)<Tbit*0.75=512Ti*0.75=384Ti)
| |
| |
| { goto DoSync_H }
goto Sync_Done
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|% 16 from edge
|% -368 from sample
| DelayReg1=121
| |
| delay
{% -2-DelayReg1*3 Ti from sample
delay
|
|
BO3.1=_DATA_IN
|
|% effective sample time
|
|
|
|
bit_CARRY=BO3.1
|
|
roll in bit_CARRY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|% 23 from sample
|% -233 from sample
delay 230Ti
|
|
|
|
DS51166C-page 143
ReadBitD2
CLRF
BTFSC
INCF
BTFSC
INCF
BTFSC
INCF
BTFSC
COMF
BTFSS
GOTO
BO3
_DATA_IN
BO3,f
_DATA_IN
BO3,f
_DATA_IN
BO3,f
Buffer0,0
BO3,f
BO3,1
BigLoop1
MOVLW
MOVWF
NOP
d80
DelayReg1
DECFSZ
GOTO
BitCtr,f
ReadBit
HeadSearch1:
MOVLW
MOVWF
HeadSearch1L1:
MOVF
XORLW
BTFSS
GOTO
MOVF
XORLW
BTFSS
GOTO
GOTO
NotHead1A:
MOVF
XORLW
BTFSS
GOTO
MOVF
XORLW
BTFSS
GOTO
GOTO
NotHead1B:
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
BCF
BTFSC
BSF
DECFSZ
DS51166C-page 144
d128
BitCtr
BufferF,W
h80
bit_ZERO
NotHead1A
BufferE,W
h2A
bit_ZERO
NotHead1A
HeadFound0
BufferF,W
h7F
bit_ZERO
NotHead1B
BufferE,W
hD5
bit_ZERO
NotHead1B
HeadFound1
Buffer0,f
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Buffer8,f
Buffer9,f
BufferA,f
BufferB,f
BufferC,f
BufferD,f
BufferE,f
BufferF,f
Buffer0,0
bit_CARRY
Buffer0,0
BitCtr,f
;
|
;
|% -3 from sample
;
BO3.1=_DATA_IN
;
|
;
|% effective sample time
;
|
;
|
;
|
;
|
;
BO3.1=BO3.1 XOR Buffer0.0
;
|
;
if (BO3.1==0)
;
{ goto BigLoop1 }
; % 8 from sample
; % -248 from sample
;
DelayReg1=80
;
|
;
delay
; % -5-DelayReg1*3 Ti from sample
;
DEC BitCtr
; } until (BitCtr==#0)
; set BitCtr
; |
; {
;
if (header found)
;
|
;
|
;
|
;
|
;
|
;
|
;
{
;
goto HeadFound0
;
}
;
if (inverse header found)
;
|
;
|
;
|
;
|
;
|
;
|
;
{
;
goto HeadFound1
;
}
;
ROL Buffer
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
DEC BitCtr
HeadSearch1L1
; } until (BitCtr==#0)
MOVF
XORWF
BTFSS
GOTO
MOVF
XORWF
BTFSS
GOTO
MOVF
XORWF
BTFSS
GOTO
MOVF
XORWF
BTFSS
GOTO
MOVF
XORWF
BTFSS
GOTO
MOVF
XORWF
BTFSS
GOTO
MOVF
XORWF
BTFSS
GOTO
MOVF
XORWF
BTFSS
GOTO
Buffer0,W
Buffer8,W
bit_ZERO
BigLoop1
Buffer1,W
Buffer9,W
bit_ZERO
BigLoop1
Buffer2,W
BufferA,W
bit_ZERO
BigLoop1
Buffer3,W
BufferB,W
bit_ZERO
BigLoop1
Buffer4,W
BufferC,W
bit_ZERO
BigLoop1
Buffer5,W
BufferD,W
bit_ZERO
BigLoop1
Buffer6,W
BufferE,W
bit_ZERO
BigLoop1
Buffer7,W
BufferF,W
bit_ZERO
BigLoop1
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
d64
BitCtr
; set BitCtr
; |
; {
;
if (header found)
;
|
;
|
;
|
;
|
;
|
;
|
;
{
;
goto HeadFound2
;
}
;
ROL Buffer
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
;
|
HeadSearch2:
MOVLW
MOVWF
HeadSearch2L1:
MOVF
XORLW
BTFSS
GOTO
BTFSS
GOTO
BTFSC
GOTO
GOTO
NotHead2A:
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
BufferF,W
hFF
bit_ZERO
NotHead2A
BufferE,7
NotHead2A
Buffer8,0
NotHead2A
HeadFound2
Buffer0,f
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Buffer8,f
Buffer9,f
BufferA,f
BufferB,f
BufferC,f
BufferD,f
BufferE,f
BufferF,f
DS51166C-page 145
DS51166C-page 146
Buffer0,0
bit_CARRY
Buffer0,0
BitCtr,f
HeadSearch2L1
;
;
;
;
; }
d64
BitCtr
Buffer0,f
Buffer1,f
Buffer2,f
Buffer3,f
Buffer4,f
Buffer5,f
Buffer6,f
Buffer7,f
Buffer8,f
Buffer9,f
BufferA,f
BufferB,f
BufferC,f
BufferD,f
BufferE,f
BufferF,f
Buffer0,0
bit_CARRY
Buffer0,0
BitCtr,f
HeadSearch3L1
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
BigLoop1
; goto BigLoop1
BufferF,W
h00
bit_ZERO
NotHead3A
BufferE,7
NotHead3A
Buffer8,0
NotHead3A
HeadFound3
|
|
|
DEC BitCtr
until (BitCtr==#0)
set BitCtr
|
{
if (header found)
|
|
|
|
|
|
{
goto HeadFound3
}
ROL Buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEC BitCtr
} until (BitCtr==#0)
BufferF,f
BufferE,f
BufferD,f
BufferC,f
BufferB,f
BufferA,f
Buffer9,f
Buffer8,f
Buffer7,f
Buffer6,f
Buffer5,f
Buffer4,f
Buffer3,f
Buffer2,f
Buffer1,f
Buffer0,f
ParityCheck
bit_CARRY
BigLoop1
CheckSame
ParityCheck
bit_CARRY
HeadSearch3
CheckSame
BufferF,f
BufferE,f
BufferD,f
BufferC,f
BufferB,f
BufferA,f
Buffer9,f
Buffer8,f
Buffer7,f
Buffer6,f
Buffer5,f
Buffer4,f
Buffer3,f
Buffer2,f
Buffer1,f
Buffer0,f
Buffer0,W
Old0,W
bit_ZERO
NotSame
Buffer1,W
Old1,W
bit_ZERO
NotSame
Buffer2,W
Old2,W
bit_ZERO
NotSame
Buffer3,W
Old3,W
bit_ZERO
NotSame
Buffer4,W
Old4,W
bit_ZERO
NotSame
Buffer5,W
Old5,W
bit_ZERO
NotSame
Buffer6,W
Old6,W
bit_ZERO
NotSame
Buffer7,W
Old7,W
bit_ZERO
NotSame
Buffer8,W
Old8,W
bit_ZERO
NotSame
Buffer9,W
Old9,W
bit_ZERO
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
DS51166C-page 147
NotSame
BufferA,W
OldA,W
bit_ZERO
NotSame
BufferB,W
OldB,W
bit_ZERO
NotSame
BufferC,W
OldC,W
bit_ZERO
NotSame
BufferD,W
OldD,W
bit_ZERO
NotSame
BufferE,W
OldE,W
bit_ZERO
NotSame
BufferF,W
OldF,W
bit_ZERO
NotSame
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Same:
TxTag:
BSF
CALL
BCF
MOVLW
MOVWF
MOVLW
MOVWF
BeepLoopJ1:
GOTO
BeepLoopJ2:
MOVLW
MOVWF
MOVLW
MOVWF
BeepD1:
CLRWDT
DECFSZ
GOTO
MOVLW
MOVWF
MOVLW
MOVWF
NOP
GOTO
BeepD2:
CLRWDT
DECFSZ
GOTO
DECFSZ
GOTO
DECFSZ
GOTO
NOP
MOVLW
MOVWF
MOVF
DS51166C-page 148
_LED2
Delay07
_LED1
d4
BeepCtrHi
d0
BeepCtrLo
BeepLoopJ2
Beep1
BeepPort
d34
DelayReg1
DelayReg1,f
BeepD1
Beep2
BeepPort
d32
DelayReg1
BeepD2
DelayReg1,f
BeepD2
BeepCtrLo,f
BeepLoopJ1
BeepCtrHi,f
BeepLoopJ2
Beep0
BeepPort
;- Transmit tag
; LEDs Found tag
; |
; |
; Beep at 3597Hz for 1024 cycles
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
; |
OldF,W
BufferF
OldE,W
BufferE
OldD,W
BufferD
OldC,W
BufferC
OldB,W
BufferB
OldA,W
BufferA
Old9,W
Buffer9
Old8,W
Buffer8
Old7,W
Buffer7
Old6,W
Buffer6
Old5,W
Buffer5
Old4,W
Buffer4
Old3,W
Buffer3
Old2,W
Buffer2
Old1,W
Buffer1
Old0,W
Buffer0
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
CALL
MOVLW
CALL
MOVLW
CALL
RS232CR
A
RS232TxW
S
RS232TxW
K
RS232TxW
RS232CR
T
RS232TxW
b
RS232TxW
i
RS232TxW
t
RS232TxW
=
RS232TxW
6
RS232TxW
4
RS232TxW
T
RS232TxW
c
RS232TxW
y
RS232TxW
RS232CR
C
RS232TxW
o
RS232TxW
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
DS51166C-page 149
n
RS232TxW
s
RS232TxW
t
RS232TxW
a
RS232TxW
n
RS232TxW
t
RS232TxW
RS232CR
T
RS232TxW
t
RS232TxW
a
RS232TxW
g
RS232TxW
=
RS232TxW
BufferF,W
h80
bit_ZERO
Ttag64
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
GOTO
1
RS232TxW
2
RS232TxW
8
RS232TxW
TtagJ1
MOVLW
CALL
MOVLW
CALL
GOTO
6
RS232TxW
4
RS232TxW
TtagJ1
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
CALL
MOVLW
T
RS232TxW
b
RS232TxW
i
RS232TxW
t
RS232TxW
RS232CR
P
RS232TxW
o
RS232TxW
l
RS232TxW
a
RS232TxW
r
RS232TxW
i
RS232TxW
t
RS232TxW
y
Ttag128:
Ttag64:
TtagJ1:
DS51166C-page 150
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RS232TxW
RS232TxW
0
RS232TxW
RS232CR
BufferF
FSR
BufferF,W
h80
bit_ZERO
TxLoop1
Buffer7
FSR
SWAPF
CALL
MOVF
CALL
DECF
BTFSC
GOTO
CALL
INDF,W
RS232TxDigit
INDF,W
RS232TxDigit
FSR,f
FSR,4
TxLoop1
RS232CR
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
GOTO
BigLoop1
; goto BigLoop1
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
GOTO
Buffer0,W
Old0
Buffer1,W
Old1
Buffer2,W
Old2
Buffer3,W
Old3
Buffer4,W
Old4
Buffer5,W
Old5
Buffer6,W
Old6
Buffer7,W
Old7
Buffer8,W
Old8
Buffer9,W
Old9
BufferA,W
OldA
BufferB,W
OldB
BufferC,W
OldC
BufferD,W
OldD
BufferE,W
OldE
BufferF,W
OldF
BigLoop1
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
TxLoop1:
NotSame:
|
|
|
|
|
|
Transmit tag ID
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Old=Data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
goto BigLoop1
end
DS51166C-page 151
DS51166C-page 152
INTRODUCTION
FIGURE 1-1:
BLOCK DIAGRAM OF TYPICAL RFID READER FOR FSK SIGNAL (125 kHz)
Transmitting Section
32
Antenna Coil
125 kHz
Gap Signal Gate
Envelope Detector
Microcontroller
CLK
Data Decoding
Signal Collision
Detector
Interface with
Host Computer
Data
Filter/Amplifier
Receiving Section
DS51167B-page 153
READER CIRCUITS
FIGURE 2-1:
DS51167B-page 154
Field On
No
Yes
Data
Collision?
No
Modulation
Present?
Read
tag data
Yes
Gap Carrier
60 Sec
No
Verify Header
and Data?
Yes
Gap Carrier
60 Sec
No
Modulation
Present?
Yes
DS51167B-page 155
12
13
SET
D
CLK
RESET
U9:B
4013
out
in
gnd
RS-232
8
9
11
10
U10:B
11
10uf,16V
C20
+5V
R11
22K
R5
3.3K
C3
R7
2 5V
1.8K
VO
+5V
Q3
2N2907
U10:C
8
0.1uF
C11
10K
R3
10
C25
1000pF,5%
15K
R28
+5V
R14
10uF,16V
D3
D6
VI
R25
R30
R32
100K
0.1uF
1N4148
1N4148
6.8K
220,5%
10K,5%
C18
10K 1%
+9-15V
C23
6
7
8
9
1
2
10K,1%
C4
RA1
RA0
RB7
RB6
RB5
RB4
VDD
R16
R13
330
330
D7
6
5
3
4
14
U10:D
R29
11
12
Y1
1N4148
D5
12
13
QD
QE
QF
QG
QH
QI
QJ
QL
QM
QN
CKI CKO
CLR CKO
U6
1M
R2
4.00 MHz
82.5K,1%
4013
SET
D
CLK
RESET
22
U9:A
LED1
13
12
11
10
14
15
16
18
17
C2
1N4148
AGRN
ARED
PIC16F84
RB0
RB1
RB2
RB3
VSS
MCLR CKOUT
RTCC CLKIN
RA2
RA3
U7
22
C1
74HC4060
SP1
C21
U3
1000pF,5%
P1
1000pF,5%
R34
R1
330
1
3
1
1
C17
1N4148
D4
R12
33K
R21
C24
10
U8:C
D8
NC
OUT2
VDD
OUT1
R20
820
33K
R17
1N4936
MC34084
R18
150K
U4
IN2
VSS
IN1
NC
ICL7667
1000pF,5%
C12
1000pF,5%
C14
R6
100K
MC34084
0.1uF
C8
10
1M
R4
U2:C
U2:B
U8:B
10K
8
9
11
10
+5V
D2
1000pF,200V,5%
1000pF,5%
1N4148
U2:A
SET
D
CLK
RESET
4013
U5:B
R22
1.82K,1%
2N7000
R27
U10:A
12
13
Q4
4013
SET
D
CLK
RESET
47.5K,1%
C16
MC34084
2.67K,1%
R23
C9
1
2
1000pF,5%
U2:D
0.1uF
7
5
4
6
14
13
15
1
2
3
10
9
6
5
3
4
U5:A
.47uF
1M,5%
C10
LM78L12ACZA
2 12V
R31
VO
1000pF,5%
R33
C19
10K,1%
820
C5
10uF
C13
L1
162uHy
MC34084
14
U8:D
R19
150K
1000pF,5%
0.01uF,630V
C27
470uF, 16V
12
13
C15
1000pF,5%
MC34084
R8
C7
1000pF,5%
IRF740
Q2
D1
Q1 1N4936
IRF9520
150k
U8:A
C6
1000pF,5%
R9
+5V
1N4936
390K
C26
33K
U1 *
C22
VI
R24
R35
D9
.0022uF,200V,10%
R10
DS51167B-page 156
33K
3.0
820
R15
R26
470uF,16V
Quantity
Type
Value
Reference Designator
Part Number
PIEZO Buzzer
PKM17EPP-4001
BZ1
MURATA PART #
Capacitor
22 pF
C1, C2
1330PH-ND
12
Capacitor
lOOO pF, 5%
C6,C7,C12,C13,C14C15,C16,
C17,C19,C21,C23,C25
P4937-ND
Capacitor
C24
(P3497-ND)
Capacitor
C26
P3S01-ND
Capacitor
0.01F, 630V
c22
P3509-ND
Capacitor
0.1 F
P4539-ND
Capacitor
0.47 F
C10
P4967-ND
Capacitor
10 F, 16V
P6616-ND
Capacitor
l00 F, 25V
C4
P10269-ND
Capacitor
470 F, 16V
C27
P10247-ND
Diode
1N4148
1N4148DICT-ND
Diode
1N4936
D1, DB, D9
1N4936CT-ND
Bicolor LED
P392
LED 1
p392-ND
Coil Antenna
162 uBy
L1
Custom Wound
P-Chain MOSFET
IRF9520
Q1
IRF9520 FUTURE
N-Chain MOSFET
IRF740
Q2
IRF740-ND
PNP Transistor
2N2907
Q3
PN2907A-ND
N-Chain MOSFET
2N7000
Q4
2N7000DICT-ND
Resistor
220, 5%
R30
5043CX220ROJ
Resistor
330, 5%
5043CX330ROJ
Resistor
820, 5%
5043CX830ROJ
Resistor
1.8K, 5%
R7
1K8CR-1/4W-B 5%
Resistor
1.82K, 1%
R22
1K82MF-1/4W-B 5%
Resistor
2.67K, 15
R23
2K67MF-1/4W-B 1%
Resistor
3.3K, 5%
R5
3K3CR-1/4W-B 5%
Resistor
6.8K, 5%
R25
6K8CR-1/4W-B 5%
Resistor
10R,1
5043ED10KOOF
Resistor
10K, 5%
10KCR-1/4W-B 5%
Resistor
15K, 5%
R28
15KCR-1/4W-B 5%
Resistor
22K, 5%
R11
22KCR-1/4W-B 5%
Resistor
33K, 5%
33JCR1/4-B 5%
Resistor
47.5K, 1%
R27
47K5MF-1/4W-B 1%
Resistor
82.5K, 1%
R29
82.5KMF-1/4W-B 1%
Resistor
100K, 5%
R6, R14
5043CX100KOJ
Resistor
150K, 5%
150KCR-1/4W-B 5%
Resistor
390K, 5%
R35
390KCR-1/4-B, 5%
Resistor
1M, 5%
1MOCR-1/4W-B 5%
74HC02
U2
MM74HC02N-ND
5V Regulator
LM78L05
U3
NJM78L05A-ND
MOSFET Driver
ICL7667
U4
ICL7667CPA-ND
DUAL FLIP-FLOP
4013
U5, U9
CD4013BCN-ND
2
Note:
All resistors are 5% 1/4 watt carbon film resistors unless otherwise noted. DIGI-KEY part numbers follow
some parts where applicable (these part numbers are only intended as a reference).
DS51167B-page 157
Type
Value
Reference Designator
Part Number
Binary Counter
74HC4060
U6
MM74HC4060N-ND
Microprocessor
PIC16F84
U7
PIC16F84-04/P
OP-AMP
MC3407
U8, U10
FUTURE PART #
Crystal
4.00 MHz
Y1
X405-ND
Note:
All resistors are 5% 1/4 watt carbon film resistors unless otherwise noted. DIGI-KEY part numbers follow
some parts where applicable (these part numbers are only intended as a reference).
DS51167B-page 158
5.0
The following source code is for the PIC16C84 microcontroller used in the FSK reader electronics.
; #=#=#=#=#=#=#=# PROJECT Microchip FSK anticollision Reader #=#=#=#=#=#=#=#
; v008.asm
; PIC16F84 running at 4MHz, Ti=1us
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
///////////////////////////////////////////////////////////////////////////
Revision history
///////////////////////////////////////////////////////////////////////////
Ver
Date
0.01
0.02
0.05
0.06
0.07
0.07a
0.08
29
27
28
29
30
08
13
Dec
Feb
Apr
Apr
Apr
May
Aug
Comment
97
98
98
98
98
98
98
Tbit=50Tcy=400Ti
Ttag=96Tbit
Header=h802A
processor pic16f84
#include p16f84.inc
__config b00000000000001
; Code Protect on, power-up timer on, WDT off, XT oscillator
#define
#define
#define
#define
#define
_CARRY
_ZERO
_TO
_RP0
_PAGE0
STATUS,0
STATUS,2
STATUS,4
STATUS,5
PCLATH,3
#define _BUZZ1
#define _BUZZ2
#define _RS232TX
#define _RS232RX
#define _SDA
StartPORTA
=
StartTRISA
=
BeepPort
=
Beep0
=
Beep1
=
Beep2
=
PORTA,0
PORTA,1
PORTA,2
PORTA,3
PORTA,4
b11100
b01000
PORTA
StartPORTA
StartPORTA | b00001
StartPORTA | b00010
#define _UNUSED1
PORTB,0
#define _COIL_PWR
PORTB,1
#define _LED1
PORTB,2
#define _LED2
PORTB,3
#define _RAW_DATA
PORTB,4
#define _UNUSED2
PORTB,5
#define _COLLISION
PORTB,6 ; < Goes low when a collision occurs
#define _SCL
PORTB,7
StartPORTB
= b10000010 ; Coil_Off
StartTRISB
= b01010000
StartOPTION
= b10001111
; PORTB pullups disabled, TMR0 internal, prescaler off, WDT/256
BO3
DelayReg1
DS51167B-page 159
Buffer00
Buffer01
Buffer02
Buffer03
Buffer04
Buffer05
Buffer06
Buffer07
Buffer08
Buffer09
Buffer0A
Buffer0B
Buffer0C
Buffer0D
Buffer0E
Buffer0F
Buffer10
Buffer11
Buffer12
Buffer13
Buffer14
Buffer15
Buffer16
Buffer17
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
BeepCtrHi
BeepCtrLo
SKIP macro
BTFSC
endm
PCLATH,7
Coil_On macro
BCF
endm
_COIL_PWR
Coil_Off macro
BSF
endm
_COIL_PWR
h18
h19
h1A
h1B
h1C
h1D
h1E
h1F
h20
h21
h22
h23
h24
h25
h26
h27
h28
h29
h2A
h2B
h2C
h2D
h2E
h2F
Flags,0
Flags,1
; Used to read FSK
org h0000
CLRF
PCLATH
CLRF
INTCON
CLRF
STATUS
GOTO
RESET_A
org h0004
CLRF
PCLATH
CLRF
INTCON
CLRF
STATUS
GOTO
RESET_A
DS51167B-page 160
Delay08
GOTO
Delay06
Delay08:
Delay06:
NOP
Delay05:
NOP
Delay04:
RETLW
;[0]
; |
;[0]
; |
;[0]
; |
;[0]
; |
;[0]
; |
Delay 10Ti
Delay 8Ti
Delay 6Ti
Delay 5Ti
Delay 4Ti
DS51167B-page 161
RS232TxL1
Delay04
_RS232TX
0
;
;
;
;
| } until (BitCtr==#0)
| Delay 4Ti
| stop bit
end
STATUS
FSR
StartPORTA
PORTA
StartPORTB
PORTB
_RP0
StartTRISA
TRISA
StartTRISB
TRISB
_RP0
StartOPTION
TMR0
_RP0
OPTION_REG
_RP0
BigLoop1:
CALL
Delay08
BSF
_LED1
CALL
Delay08
BCF
_LED2
CALL
Delay08
Coil_Off
; Initialise registers
; | Access register page 0
; | FSR=#0
; | Initialise PORT and TRIS registers
; | |
; | |
; | |
;^| |
;^| |
;^| |
;^| |
;^| |
; | Initialise OPTION register
; | |
; | |
;^| |
;^| |
; | |
;
;
;
;
;
;
LEDs reading
|
|
|
|
Turn coil off
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
TagsDetected=#0
GapCount=#0
|
{
Turn coil off
LEDs reading
|
|
|
Wait 80us
|
|
|
|
|
|
Turn coil on
BSF
_PAGE0
GOTO
ResetDelay
ResetDelayDone:
CLRF
CLRF
CLRF
TagsDetected
GapCountHi
GapCountLo
GapLoop:
Coil_Off
CALL
Delay08
BSF
_LED1
CALL
Delay08
BCF
_LED2
CALL
Delay10
CALL
Delay10
CALL
Delay10
CALL
Delay10
CALL
Delay10
CALL
Delay10
NOP
Coil_On
;% 0 Ti from 1st bit
;(Ttag=38400Ti)
; If its the first gap since reset, delay Ttag
DS51167B-page 162
_FirstTime
DelayTtag
_FirstTime
CLRF
DelayReg1
CLRWDT
DECFSZ
GOTO
DelayReg1,f
GapD1
GapD1:
GapD2:
;
;
;
;
;
;
;
;
;
Delay 2047Ti
|
|
|
|
|
|
|
|
CLRWDT
DECFSZ DelayReg1,f
GOTO
GapD2
;% 2050Ti from 1st bit
MOVLW
d8
;
DelayReg1=#8
MOVWF
DelayReg1
;
|
;% 2052Ti from 1st bit
;% 2076-3*DelayReg1 from 1st bit
;% 5*400+76-3*DelayReg1 from 1st bit
;% 76-3*DelayReg1 Ti from 6th bit
;
Read tag, with timeouts everywhere
MOVLW
d2
;
| Counter2=#2
MOVWF
Counter2
;
| |
ReadBit_L1:
;
| {% 78-3*DelayReg1 Ti from bit
MOVLW
d96
;
|
BitCtr=#96
MOVWF
BitCtr
;
|
|
ReadBit_L2:
;
|
{% 80-3*DelayReg1 Ti from bit
ReadBit_D1:
;
|
delay
DECFSZ DelayReg1,f
;
|
|
GOTO
ReadBit_D1
;
|
|
;
|
% 79Ti from bit
CLRF
Counter1
;
|
Counter1=#0
;
|
% 80Ti=10Tcy from bit, time to start frequency sample
ReadBit_Hi0:
;
|
{% 80+(Counter1*8)Ti from bit
INCF
Counter1,f
;
|
++Counter1
;
|
% 73+(Counter1*8)Ti from bit
BTFSC
Counter1,6
;
|
if (timeout)
GOTO
GapX
;
|
{ goto GapX } // could be at 1st half of 1st bit!!!
NOP
;
|
|
BTFSC
_RAW_DATA
;
|
} until (_RAW_DATA==#1)
BTFSS
_RAW_DATA
;
|
|
GOTO
ReadBit_Hi0
;
|
|
NOP
;
|
|
ReadBit_Lo0:
;
|
{% 80+(Counter1*8)Ti from bit
INCF
Counter1,f
;
|
++Counter1
;
|
% 73+(Counter1*8)Ti from bit
BTFSC
Counter1,6
;
|
if (timeout)
GOTO
GapX
;
|
{ goto GapX } // could be at 1st half of 1st bit!!!
NOP
;
|
|
BTFSS
_RAW_DATA
;
|
} until (_RAW_DATA==#0)
BTFSC
_RAW_DATA
;
|
|
GOTO
ReadBit_Lo0
;
|
|
NOP
;
|
|
;
|
% 80+(Counter1*8)Ti from bit
MOVF
Counter1,W
;
|
Period=Counter1
MOVWF
Period
;
|
|
INCF
Counter1,f
;
|
|
CALL
Delay05
;
|
|
ReadBit_Hi1:
;
|
{% 80+(Counter1*8)Ti from bit
INCF
Counter1,f
;
|
++Counter1;
;
|
% 73+(Counter1*8)Ti from bit
BTFSC
Counter1,6
;
|
if (timeout)
GOTO
GapX
;
|
{ goto GapX } // could be at 1st half of 1st bit!!!
DS51167B-page 163
;
;
;
;
;
;
Counter1,f
;
;
BTFSC
Counter1,6
;
GOTO
GapX
;
NOP
;
BTFSS
_RAW_DATA
;
BTFSC
_RAW_DATA
;
GOTO
ReadBit_Lo1
;
NOP
;
ReadBit_Hi2:
;
INCF
Counter1,f
;
;
BTFSC
Counter1,6
;
GOTO
GapX
;
NOP
;
BTFSC
_RAW_DATA
;
BTFSS
_RAW_DATA
;
GOTO
ReadBit_Hi2
;
NOP
;
ReadBit_Lo2:
;
INCF
Counter1,f
;
;
BTFSC
Counter1,6
;
GOTO
GapX
;
NOP
;
BTFSS
_RAW_DATA
;
BTFSC
_RAW_DATA
;
GOTO
ReadBit_Lo2
;
NOP
;
;
MOVF
Period,W
;
SUBWF
Counter1,W
;
MOVWF
Period
;
;
COMF
Counter1,W
;
ADDLW
d1
;
ADDLW
d32
;
;
;
INCF
Counter1,f
;
INCF
Counter1,f
;
NOP
;
;
;
BTFSS
_CARRY
;
GOTO
GapX
;
;
MOVWF
Counter1
;
;
ReadBit_D2:
;
MOVF
Counter1,f
;
BTFSC
_ZERO
;
GOTO
ReadBit_D2_done ;
NOP
;
NOP
;
DECF
Counter1,f
;
GOTO
ReadBit_D2
;
ReadBit_D2_done:
;
;
;
DS51167B-page 164
_RAW_DATA
_RAW_DATA
ReadBit_Hi1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} until (_RAW_DATA==#1)
|
|
|
{% 80+(Counter1*8)Ti from bit
++Counter1;
% 73+(Counter1*8)Ti from bit
if (timeout)
{ goto GapX } // could be at 1st half of 1st bit!!!
|
} until (_RAW_DATA==#0)
|
|
|
{% 80+(Counter1*8)Ti from bit
++Counter1;
% 73+(Counter1*8)Ti from bit
if (timeout)
{ goto GapX } // could be at 1st half of 1st bit!!!
|
} until (_RAW_DATA==#1)
|
|
|
{% 80+(Counter1*8)Ti from bit
++Counter1;
% 73+(Counter1*8)Ti from bit
if (timeout)
{ goto GapX } // could be at 1st half of 1st bit!!!
|
} until (_RAW_DATA==#0)
|
|
|
% 80+(Counter1*8)Ti from bit
Period=Counter1-Period
|
|
% 83+(Counter1*8)Ti from bit
W=32-Counter1
|
|
% 86+(32-W)*8Ti from bit
% 86+(Counter1*8)Ti from bit
++Counter1
++Counter1
|
% 89+(32-W)*8Ti from bit
% 73+(Counter1*8)Ti from bit
if (W<0)
{ goto GapX } // could occur in 1st half of 1st bit!!!
% 91+(32-W)*8Ti from bit
Counter1=W
% 92+(32-Counter1)*8 Ti from bit
Delay 4+Counter1*8 Ti
|
|
|
|
|
|
|
|
% 92+32*8-(oldCounter1)*8+4+(oldCounter1)*8 Ti from bit
% 352Ti from bit
_COLLISION
;
Gap1
;
Period,W
;
low(0-d14)
;
_CARRY
;
Gap0
;
low(d14-d18);
_CARRY
;
ReadBit_Got0
;
low(d18-d22);
_CARRY
;
Gap0
;
|
|
|
|
|
|
|
|
|
|
|
|
_CARRY
ReadBit_GotBit
;
;
;
|
|
|
ReadBit_Got0:
NOP
NOP
BCF
GOTO
_CARRY
ReadBit_GotBit
;
;
;
;
;
|
|
|
|
|
ReadBit_GotBit:
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
RLF
Buffer00,f
Buffer01,f
Buffer02,f
Buffer03,f
Buffer04,f
Buffer05,f
Buffer06,f
Buffer07,f
Buffer08,f
Buffer09,f
Buffer0A,f
Buffer0B,f
Buffer0C,f
Buffer0D,f
Buffer0E,f
Buffer0F,f
Buffer10,f
Buffer11,f
Buffer12,f
Buffer13,f
Buffer14,f
Buffer15,f
Buffer16,f
Buffer17,f
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
% 367Ti from bit
|
roll in _CARRY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
% 391Ti from bit
|
% -9Ti from bit (Tbit=400Ti)
|
DelayReg1=#28
|
|
|
% -7Ti from bit
|
% 77-3*DelayReg1 Ti from bit
|
DEC BitCtr
|
} until (BitCtr==#0)
| % -5Ti from bit
|
DelayReg=#26
|
|
| % -3Ti from bit
| % 75-3*DelayReg1 Ti from bit
|
DEC Counter2
| } until (Counter2==#0)
ReadBit_Got1:
BSF
GOTO
MOVLW
MOVWF
d28
DelayReg1
DECFSZ
GOTO
BitCtr,f
ReadBit_L2
MOVLW
MOVWF
d26
DelayReg1
DECFSZ
GOTO
Counter2,f
ReadBit_L1
if (collision occurred)
{ goto Gap1 } // after 1st half of bit
if (Period<#14)
|
|
{ goto Gap0 } // after 1st half of bit
if (Period<#18)
|
{ goto ReadBit_Got0 }
if (Period>=#22)
|
{ goto Gap0 } // after 1st half of bit
DS51167B-page 165
DS51167B-page 166
_PAGE0
BigDelay
Buffer00
FSR
h0C
Counter1
_COLLISION
Gap1
INDF,W
Counter2
h0C
FSR,f
INDF,W
Counter2,W
_ZERO
Gap2
low(0-h0C+1)
FSR,f
Counter1,f
CheckTTagLoop
d96
BitCtr
_COLLISION
Gap1
_GotHeader
Buffer0B,W
h80
_ZERO
_GotHeader
Buffer0A,W
h2A
_ZERO
_GotHeader
_GotHeader
HeadFound
Buffer00,f
Buffer01,f
Buffer02,f
Buffer03,f
Buffer04,f
Buffer05,f
Buffer06,f
Buffer07,f
Buffer08,f
Buffer09,f
Buffer0A,f
Buffer0B,f
Buffer00,0
_CARRY
Buffer00,0
BitCtr,f
HeadSearchL1
Gap2
_COLLISION
Gap1
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
Delay 1568Ti
|
|% 1567Ti from first bit
if (tag is not 96 bits long) { goto Gap2 }
| FSR=#Buffer00
| |
| Counter1=h0C
| |
| {% 1571+(12-Counter1)*15Ti from first bit
|
if (collision occurred)
|
{ goto Gap1 } // never happens during first bit
|
Counter2=INDF
|
|
|
FSR=FSR+h0C
|
|
|
if (Couter2!=INDF)
|
|
|
|
|
{ goto Gap2 } // never happens during first bit
|
FSR=FSR-h0C+1
|
|
|
DEC Counter1
| } until (Counter1==#0)
% 1570+12*15Ti = 1752Ti from first bit
if (no header in Buffer) { goto Gap2 }
| set BitCtr
| |
| {% 1752+(96-BitCtr)*31 Ti from first bit
|
if (collision occurred)
|
{ goto Gap1 } // never happens during 1st bit
|
if (header found) { goto HeadFound }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ROL Buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEC BitCtr
| } until (BitCtr==#0)
|% 1751+96*31 Ti = 4727Ti from first bit
| goto Gap2 // never happens during first bit
% 1766+(96-BitCtr)*29 Ti from first bit
Delay to fixed time
| {% 1766+(96-BitCtr)*31 Ti from first bit
|
if (collision occurred)
|
{ goto Gap1 } // never happens during 1st bit
Delay08
Delay08
Delay06
Delay04
BitCtr,f
HeadDelay
;
;
;
;
;
;
;
BTFSS
GOTO
_COLLISION
Gap1
;
;
if (collision occurred)
{ goto Gap1 } // never happens during 1st bit
BSF
CALL
BCF
_LED2
Delay08
_LED1
;
;
;
;
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
CALL
SWAPF
CALL
MOVF
Buffer0B,W
RS232TxDigit
Buffer0B,W
RS232TxDigit
Buffer0A,W
RS232TxDigit
Buffer0A,W
RS232TxDigit
Buffer09,W
RS232TxDigit
Buffer09,W
RS232TxDigit
Buffer08,W
RS232TxDigit
Buffer08,W
RS232TxDigit
Buffer07,W
RS232TxDigit
Buffer07,W
RS232TxDigit
Buffer06,W
RS232TxDigit
Buffer06,W
RS232TxDigit
Buffer05,W
RS232TxDigit
Buffer05,W
RS232TxDigit
Buffer04,W
RS232TxDigit
Buffer04,W
RS232TxDigit
Buffer03,W
RS232TxDigit
Buffer03,W
RS232TxDigit
Buffer02,W
RS232TxDigit
Buffer02,W
RS232TxDigit
Buffer01,W
RS232TxDigit
Buffer01,W
RS232TxDigit
Buffer00,W
RS232TxDigit
Buffer00,W
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
Delay 26Ti
|
|
|
|
|
|
|
DEC BitCtr
| } until (BitCtr==#0)
% 1765+96*31 = 4741Ti from first bit
Transmit
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
|%% CALL
|
tag ID
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
RS232TxDigit takes 1057Ti
DS51167B-page 167
CALL
RS232CR
;% 31197Ti from first bit
MOVLW
MOVWF
WaitingL1:
CLRWDT
CALL
CALL
CALL
DECFSZ
GOTO
;
;
;
;
;
;
;
;
;
d255
DelayReg1
Delay10
Delay10
Delay05
DelayReg1,f
WaitingL1
Delay 7396Ti
|
|
|
|
|
|
|
|
GapCountHi
GapCountLo
GapLoop
GapX:
GapXDelay:
BTFSC
GOTO
INCF
NOP
GOTO
GapXDelayJ1:
GOTO
GapXDelayDone:
GapCountHi,0
GapCountLo,1
GapLoop
BigLoop1
; } until (GapCount>#257)
; |
; |
DS51167B-page 168
P1DelayTtag:
CLRF
P1DelayTtagL1:
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
DECFSZ
GOTO
MOVLW
MOVLW
P1DelayTtagL2:
CALL
DECFSZ
GOTO
d15
DelayReg1
P1Delay20
P1Delay20
P1Delay20
P1Delay20
P1Delay17
DelayReg1,f
BigDelayL1
P1Delay20
P1Delay20
P1Delay20
;
;
;
;
;
;
;
;
;
;
;
;
;
;
Delay 1501Ti
|
|
|
|
|
|
|
|
|
Delay 61Ti
|
|
|
_PAGE0
BigDelayDone
DelayReg1
P1Delay20
P1Delay20
P1Delay20
P1Delay20
P1Delay20
P1Delay20
P1Delay20
P1Delay06
DelayReg1,f
P1DelayTtagL1
d19
DelayReg1
P1Delay10
DelayReg1,f
P1DelayTtagL2
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
; Delay 38393Ti
| Delay 38144Ti
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Delay 248Ti
| |
| |
| |
| |
| |
DS51167B-page 169
; | Delay 1Ti
_PAGE0
0
RS232CR
d4
BeepCtrHi
d0
BeepCtrLo
BeepLoopJ2
Beep1
BeepPort
d34
DelayReg1
DelayReg1,f
BeepD1
Beep2
BeepPort
d32
DelayReg1
BeepD2
DelayReg1,f
BeepD2
BeepCtrLo,f
BeepLoopJ1
BeepCtrHi,f
BeepLoopJ2
Beep0
BeepPort
d20
Counter1
d124
DelayReg1
DelayReg1,f
ResetGapL2
Counter1,f
ResetGapL1
_FirstTime
d6
Counter1
d250
DelayReg1
DelayReg1,f
ResetDelayL2
Counter1,f
ResetDelayL1
_PAGE0
ResetDelayDone
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
Transmit CR regularly
Beep at 3597Hz for 1024 cycles
|
|
|% 27277Ti from first bit
|
|
|
|
|
| Delay 137Ti
| |
| |
| |
| |
| |
|
|
| Delay 132Ti
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
|
|
|
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
Turn coil on
Wait ~6ms
|
|
|
|
|
|
|
|
|
|
end
DS51167B-page 170
MCRF2XX
Using the microID Programmer
1.0
INTRODUCTION
FIGURE 1-1:
DS51139C-page 171
PROGRAMMING SIGNAL
WAVEFORM
DS51139C-page 172
2.1
2.2
Programming Sequence
Once the device has been verified blank for programming, the programmer sends a programming sequence
to the device. The programming data entered in the
rfLAB software is sent to the device via the
programmer. The programming signal waveforms are
shown in Figure 2-1. One bit of data is represented by
128 cycles of the carrier signal. It takes 131.072 ms to
complete one programming cycle for the total of 128
data bits. An microID 125 kHz Design Guide configured for 128 bits uses all bits in the transfer; an
microID 125 kHz Design Guide configured for 96 bits
ignores bits 33 through 64, although they are present in
the programming sequence. After the programming
sequence, the device transmits back a verification bit
stream. The programmer reports to the host computer
the status of the programming.
The data is programmed only if the programming signal
level is within the limit in the programming voltage
requirement of the device. It takes several
Programming/Verify cycles to completely program
each bit of the microID 125 kHz Design Guide. The
microID programmer uses ten (10) blind Program/Verify cycles before checking the final verify sequence for
correct programming. Faster programmers can be
designed by checking each Program/Verify cycle; after
approximately 3 ~ 5 cycles, the device will verify correctly. Once a correct verify sequence is received, one
additional program cycle should be run to ensure
proper programming margin.
0V
80 - 180 s
13.5 1 VPP
(R5)
Modulating
Not Modulating
VERIFY
FSK Signal
13.5 1 VPP
GAP
128 bits
30 2 VPP
(R7)
High
Power
Signal
Bit 2
Bit 3
Note:
13.5 1 VPP
(R5)
Power
Signal
Low
Bit 1
PROGRAM
FIGURE 2-1:
POWER-UP
MCRF2XX
DS51139C-page 173
CALIBRATION OF
PROGRAMMING VOLTAGE
b)
h)
i)
Set Up:
Connect the +9 VDC power supply to the
programmer.
Connect the RS-232 cable from the external serial
port in the programmer box to a COM port in the
host.
Open up the rfLAB software on the host computer.
Place the calibration tag in the center of the tag
area on the programmer. A calibration tag is any
tag using microID 125 kHz Design Guide or
MCRF250 silicon and your own coil and capacitor.
c) Run the programming software (rfLAB).
j)
Note:
k)
DS51139C-page 174
MCRF2XX
FIGURE 3-1:
MCRF2XX microID
PROGRAMMER AND
CALIBRATION TAG COIL
ARRANGEMENT FOR
PROGRAMMING SIGNAL
LEVEL MEASUREMENT
DS51139C-page 175
PROGRAMMING PROCEDURE
Set up the programmer and open up the rfLAB
software on the host computer.
e)
f)
g)
Programming Precautions
Taking these steps will help to ensure proper programming and minimize programming fallout.
a)
Set Up:
d)
4.2
b)
c)
d)
4.1
Error Conditions
DS51139C-page 176
MCRF2XX
FIGURE 4-1:
Programmer
power-up and
connection ok?
No
Error Message:
Programmer Time-out
Yes
Adjust the Programming Power-up
Signal Level (R5) or try a new tag.
Click Blank Check Button in rfLAB Software
(Due to not blank
or incorrect
power-up
Error message with a
signal level) No
Device not Blank
or
Device not present
Blank
and power-up
signal level ok?
Yes
Type in Programming
Data in rfLAB Software
Programming
Successful?
No
Yes
Message with a Green Bar:
Programming Successful
Stop
DS51139C-page 177
PROGRAMMING IN A
STANDARD TERMINAL MODE
5.1
flow
host
and
and
Programmer Wake-up
5.2
Blank Check
5.2.1
5.3
5.4
Error Conditions
DS51139C-page 178
MCRF2XX
FIGURE 5-1:
TYPICAL SEQUENCE
The following is the programming sequence necessary to wake-up the programmer,
check if a MCRF2XX part is blank, unlocked and ready to be programmed, send
F1E2D3C4B5A6978888796A5B4C3D2E1F ASCII data to the programmer, and
instruct the programmer to program and verify the device.
STEP1
PC Send
W to the
programmer
Programmer
replies with
R to the PC
PC Send
T to the
programmer
Programmer
replies with Y
if the device
is OK and N if
there is an error
PC Send
F to prog.
Programmer replies
with F
PC Send
1 to prog.
Programmer replies
with 1
PC Send
E to prog.
Programmer replies
with E
PC Send
2 to prog.
Programmer replies
with 2
PC Send
2 to prog.
Programmer replies
with 2
PC Send
E to prog.
Programmer replies
with E
PC Send
1 to prog.
Programmer replies
with 1
PC Send
F to prog.
Programmer replies
with F
WAKE-UP
STEP2
VERIFY BLANK
STEP3
PASS 16 BYTES
OF DATA
Byte 1
Byte 2
Byte 15
Byte 16
STEP4
PROGRAM/VERIFY
PC Send V to the
programmer to initiate
a Program/Verify sequence
(ID internal Program/Verify)
Note:
Programmer
replies with y
if the device
programs OK and
n if there is an
error
See the signal waveforms and calibration procedure in Section 2.0 Programming
Signal Waveform and Section 3.0 Calibration of Programming Voltage.
DS51139C-page 179
NUL
DLE
Space
SOH
DC1
STX
DC2
"
ETX
DC3
EOT
DC4
ENQ
NAK
ACK
SYN
&
Bell
ETB
'
BS
CAN
HT
EM
LF
SUB
VT
ESC
FF
FS
<
CR
GS
SO
RS
>
SI
US
DEL
DS51139C-page 180
P1
P2
DB9F
1
2
3
2
1
1N4002
D2
R3
470
Y1
8.00 MHz
.1 uF
.1 uF
C13
20 uF, 35V
C5
C4
C1+
U7
R1IN
C2-
C2+
C12
.1 uF
MAX232
T2OUT
T1OUT
8 R2IN
14
13
U4
16
+5V
15
12
.1 uF
C6
15
16
17
18
19
20
22
21
28
27
26
25
24
23
1 VIN
G
2
V0 3
U9
LM7805CV
11
T1IN
T2IN 10
R2OUT
R1OUT
1V-
V+
.1 uF
C3
PIC16C73
9 OSC1/CLKIN
VDD
10
VSS
OSC2/CLKOUT
RC7/RX/DT
11
RC0/T1OSO/T1CKI
RC6/TX/CK
12
RC1/T1OSI/CCP2
RC5/SD0
13 RC2/CCPI
RC4/SDI/SDA
14 RC3/SCK/SCL
3 C1-
.1 uF
RB7
MCLR
RB6
RA0/AN0
RB5
RA1/AN1
RB4
RA2/AN2
RB3
RA3/AN3/VREF
RB2
RA4/TOCKI
7
RB1
RA5/SS/AN4
8 VSS
RB0/INT
1
2
3
4
5
6
C1
VEE
C14
100 uF, 6V
+5V
BZ1
+5V
R2
+5V
13
C7
11
12
13
9
10
470K
R9
22 pF
5
C15
+5V
.1 uF
C17
R14
100K
R13
2.2K
47K
R11
10K
C9
470 pF
R8
4 G2 D2 5
SI9942
U6
1 S1 D1 8
2 G1 D1 7
6
3 S2
D2
6
S2 D2
4 G2 D2 5
SI9942
U5
1 S1 D1 8
2 G1 D1 7
10
R6
47
R4
R12
100K
CW
CW
3 S2 D2 6
C2
5
4 G2
D2
4700 pF 500V
SI9942
2 G1 D1 7
U2
1 S1 D1 8
C8
470 pF
+5V
.1 uF
C16
+5V
.1 uF
R10
150K
+5V
11
U3:D
U3:C
4 U1:B
U8:B 6
+ 5
34072
12 U1:D
9 U1:C
10
4
5
U3:B
LED1
U8:A 2
1
+ 3
34072
74HC86
1 U3:A
3
2
270
R1
1 U1:A
3
2
74HC00
R5
CCW
CCW
C11
1000 pF
D1
1N4148
100
W R7
500
C18
560 pF
L1
308 uH
6.0
GND
+5V
MCRF2XX
DS51139C-page 181
Item # Qty
Part #
Reference
Designator
Part Description
Manufacturer
Vendor
Vendor
Part #
MOUSER
5982-15-300V560
ICA-328-S-ST
U4
SOCKET, 28
PIN,.300,
MACHINED
COLLET
-SPARE-
SP1, LED1,
R1, R2
-SPARELOCATION DO NOT
INSTALL
PCC220CNCT-ND
C7
CAP SMT, 22 pF
NPO 0805
PANASONIC
0805N471J101NT
C8, C9
MALLORY
CD15FC561JO3
C18
CORNELL
DUBILIER
ECU-V1H102JCX
C11
PANASONIC
CD19FD472JO3
C2
CORNELL
DUBILIER
250R18Z104MV4E-6
C1, C3-C6,
CAP SMT, 0.1 F
C12, C15-C17 20% 50V 0805
JOHANSON
NEWARK
50F3674
ECS-H1ED106R
C13
CAP SMT, 10 F,
TANT ELEC, 25V,
7343
PANASONIC
DIGIKEY
PCT5106CT-ND
10
ECE-V0JA101SP
C14
PANASONIC
DIGIKEY
PCE3058CT-ND
11
LL4148
D1
DIODES INC
DIGIKEY
LL4148DITR-ND
12
DL4002
D2
DIODE SMT,
RECTIFIER,
1N4002, 1A, 100V,
DL-41
DIODES INC.
DIGIKEY
DL4002DITR-ND
13
3345P-1-101
R7
BOURNS
DIGIKEY
3345P-101-ND
14
3345P-1-501
R5
BOURNS
DIGIKEY
3345P-501-ND
15
ERJ-6GEYJ100
R6
PANASONIC
16
ERJ-6GEYJ470V
R4
PANASONIC
17
ERJ-6GEYJ471V
R3
PANASONIC
P470ATR-ND
18
ERJ-6GEYJ222V
R13
PANASONIC
P2.2KATR-ND
DS51139C-page 182
SAMTEC
MOUSER 5982-19-500V4700
P10ACT-ND
DIGIKEY
P470ATR-ND
MCRF2XX
Item # Qty
Part #
Reference
Designator
Part Description
Manufacturer
Vendor
Vendor
Part #
19
ERJ-6GEYJ103V
R8
PANASONIC
DIGIKEY
P10KATR-ND
20
ERJ-6GEYJ473V
R11
PANASONIC
DIGIKEY
P473ATR-ND
21
ERJ-6GEYJ104V
R12, R14
PANASONIC
DIGIKEY
P100KATR-ND
22
ERJ-6GEYJ154V
R10
PANASONIC
DIGIKEY
P150KATR-ND
23
ERJ-6GEYJ474V
R9
PANASONIC
DIGIKEY
P470KATR-ND
24
MM74HC00M
U1
FAIRCHILD
SEMICONDUCTOR
DIGIKEY
MM74HC00M-ND
25
NDS9942
U2, U5, U6
FAIRCHILD
SEMICONDUCTOR
DIGIKEY
NDS9942TR-ND
26
MM74HC86MX
U3
FAIRCHILD
SEMICONDUCTOR
DIGIKEY
27
PIC16C73A /P
U4
MICROCHIP
28
MAX232ACSE
U7
IC, MAX232ACSE
DUAL RS-232
TRANSMITTER/
RCVR, (SO-16)
MAXIM
29
MC34072D
U8
MOTOROLA
30
L7805CV
U9
31
EFO-EC8004A4
Y1
32
MCT0003-000
L1
33
DE9S-FRS
P2
CONN, D-SUB 9P
RECPT RT ANGLE
SPC
TECHNOLOGY
34
DJ005B
P1
JACK, POWER,
2.5mm DC PC
MOUNT
LZR
ELECTRONICS
DIGIKEY
MAX232ACSE-ND
SGS THOMSON
MOUSER
511-L7805CV
PANASONIC
DIGIKEY
PX800-ND
DS51139C-page 183
The software supplied herewith by Microchip Technology Incorporated (the Company) is intended and supplied to you, the
Companys customer, for use solely and exclusively with products manufactured by the Company.
The software is owned by the Company and/or its supplier, and is protected under applicable copyright laws. All rights are reserved.
Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil
liability for the breach of the terms and conditions of this license.
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
;
;
;
;
;
;
;
;
;
;
;
;
;
;
///////////////////////////////////////////////////////////////////////////
Revision history
///////////////////////////////////////////////////////////////////////////
Ver
Date
Comment
1.00
1.04
10/24/97
13 Feb 98
LISTP=PIC16C73A
INCLUDE P16C73A.INC
__config b11111111110010
; Code Protect off, Brown-out detect on, Power-up timer on, WDT off,
;
HS oscillator
constant StartPORTA
constant StartTRISA
= b000000
= b010111
#define _LED1
PORTB,4
#define _LED2
PORTB,5
#define _BUZZ1
PORTB,6
constant StartPORTB
= b00010010
constant StartTRISB
= b00000100
constant StartOPTION
= b10001000
; Pullups disabled, TMR0 internal, WDT*1
COUNT1EQU0x20 ; COUNT REGISTER
DATA0EQU0x21
DATA1EQU0x22
DATA2EQU0x23
DATA3EQU0x24
DATA4EQU0x25
DATA5EQU0x26
DATA6EQU0x27
DATA7EQU0x28
DATA8EQU0x29
DATA9EQU0x2A
DATAAEQU0x2B
DATABEQU0x2C
DATACEQU0x2D
DATADEQU0x2E
DATAEEQU0x2F
DATAFEQU0x30
BIT EQU 0x31
OVERPROEQU0x32
DELAY1EQU0x33
DS51139C-page 184
MCRF2XX
DELAY2EQU0x34
DelayReg?H
= h35
DelayReg?L
= h36
CycleCtr?H
= h37
CycleCtr?L
= h38
TimerHi
= h39
TimerMid
= h3A
TimerLo
= h3B
BitCtr
= h3C
BO3
= h3D
RxByte
= h3E
TxByte
= h3F
ByteCtr
= h40
NoiseTimeout = h41
SampTimeout = h42
CycleCtr2?L = h43
CycleCtr2?H = h44
#define _RAW_DATA
#define _RS232OUT
#define _CARRY
#define _TMR2ON
#define _RS232IN
#define _ZERO
#define _COIL_PWR_0
#define _COIL_EN
SKIP macro
BTFSC
endm
PORTA,4
PORTC,6
STATUS,0
T2CON,2
PORTC,7
STATUS,2
PORTB,3
PORTB,1
PORTA,7
DS51139C-page 185
STATUS
FSR
StartPORTA
PORTA
StartPORTB
PORTB
INTCON
b110001
T1CON
b0000000
T2CON
d8
CCPR1L
b001100
CCP1CON
b00000000
ADCON0
STATUS,RP0
StartTRISA
TRISA
StartTRISB
TRISB
0x82
TRISC
StartOPTION
OPTION_REG
d15
PR2
h03
PCON
b110
ADCON1
STATUS,RP0
; !!!!!
BCF
CLRF
BCF
CALL
RS232On
BigLoop1
CALL
CheckRxByte
MOVF
XORLW
BTFSC
GOTO
CALL
MOVLW
CALL
GOTO
;^|
;^|
;^|
;^|
;^|
;^|
;^|
;^|
; |
RS232WaitForever
RxByte,W
W
_ZERO
INTERRUPT
RS232On
Q
RS232TxW
BigLoop1
INTERRUPT
CALL
Delay07
BSF
_LED1
CALL
Delay07
BSF
_LED2
CALL
Delay07
INT_WAKEUP
MOVLW
R
DS51139C-page 186
;
;
;
;
;
MCRF2XX
MOVWF
RxByte
CALL
RS232On
MOVF
RxByte,W
CALL
RS232TxW
CALL
RS232Rx
BTFSC
_CARRY
GOTO
INT_END
MOVF
RxByte,W
XORLW
T
BTFSS
_ZERO
GOTO
CheckRxByte
MOVLW
MOVWF
CLRF
;
;
;
;
;
;
;
;
;
;
delay
Transmit RxByte
|
Read byte from RS-232
| (if timeout, goto INT_END)
|
if (RxByte<>#T)
|
|
{ goto CheckRxByte }
d10
CycleCtr?H
CycleCtr?L
Top1
BCFPORTB,3; SET FOR LOW VOLTAGE
CALLDELAY ; CALL A SMALL DELAY
GAP1; THIS IS THE ROUTINE THAT SETS THE GAP
BCF
CALL
PORTB,3
DELAY
WaitFall1
WaitFall1A
MOVLW
MOVWF
CLRF
WaitFall1AL
DECFSZ
SKIP
DECFSZ
SKIP
GOTO
BTFSS
GOTO
NOP
DECFSZ
SKIP
DECFSZ
TWC
TWC
TWC
TWC
TWC
d200
DelayReg?H
DelayReg?L
DelayReg?L,f
DelayReg?H,f
INT_ErrorN
_RAW_DATA
WaitFall1AL
DelayReg?L,f
DelayReg?H,f
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
DS51139C-page 187
INT_ErrorN
_RAW_DATA
WaitFall1AL
d200
DelayReg?H
DelayReg?L
DelayReg?L,f
DelayReg?H,f
INT_ErrorN
_RAW_DATA
WaitFall1BL
DelayReg?L,f
DelayReg?H,f
INT_ErrorN
_RAW_DATA
WaitFall1BL
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ goto INT_ErrorN }
| } until (_RAW_DATA==#1)
|
Wait for low
| Set timeout
| |
| |
| { {
|
if (timeout)
|
|
|
|
|
|
|
{ goto INT_ErrorN }
|
} until (_RAW_DATA==#0)
|
|
|
|
|
if (timeout)
|
|
|
|
|
|
|
{ goto INT_ErrorN }
| } until (_RAW_DATA==#0)
| |
CLRF
DelayReg?L
; Clear timer
WaitFall2
; Time falling edge
WaitFall2A
; | Wait for high
WaitFall2AL
; | | { {
NOP
;
NOP
;
INCF
DelayReg?L,f
; | |
Increment timer
BTFSC
DelayReg?L,7
; | |
if timeout,
GOTO
INT_ErrorN
; | |
{ goto INT_ErrorN }
BTFSS
_RAW_DATA
; | |
} until (_RAW_DATA==#1)
GOTO
WaitFall2AL
; | |
|
NOP
; | |
|
NOP
;
NOP
;
INCF
DelayReg?L,f
; | |
Increment timer
BTFSC
DelayReg?L,7
; | |
if timeout,
GOTO
INT_ErrorN
; | |
{ goto INT_ErrorN }
BTFSS
_RAW_DATA
; | | } until (_RAW_DATA==#1)
GOTO
WaitFall2AL
; | |
NOP
;
WaitFall2B
; | Wait for low
WaitFall2BL
; | | { {
NOP
;
NOP
;
INCF
DelayReg?L,f
; | |
Increment timer
BTFSC
DelayReg?L,7
; | |
if timeout,
GOTO
INT_ErrorN
; | |
{ goto INT_ErrorN }
BTFSC
_RAW_DATA
; | |
} until (_RAW_DATA==#0)
GOTO
WaitFall2BL
; | |
|
NOP
; | |
|
NOP
;
NOP
;
INCF
DelayReg?L,f
; | |
Increment timer
BTFSC
DelayReg?L,7
; | |
if timeout,
GOTO
INT_ErrorN
; | |
{ goto INT_ErrorN }
BTFSC
_RAW_DATA
; | | } until (_RAW_DATA==#0)
GOTO
WaitFall2BL
; | | |
; DelayReg?L*8Ti = period of signal
; period of _RAW_DATA on FSK = Tcy*10 = Ti*160
; DelayReg?L = 20 if FSK present
DS51139C-page 188
MCRF2XX
MOVF
ADDLW
BTFSS
GOTO
ADDLW
BTFSC
GOTO
MOVLW
MOVWF
MOVLW
MOVWF
TestGotLo
DECFSZ
SKIP
DECFSZ
SKIP
GOTO
MOVLW
MOVWF
BTFSS
GOTO
TestGotLoLoop
BTFSS
GOTO
DECFSZ
GOTO
GOTO
;
DelayReg?L,W
;
low(0-d14)
;
_CARRY
;
INT_ErrorN
;
low(d14-d22);
_CARRY
;
INT_ErrorN
;
d7
CycleCtr?H
d164
CycleCtr?L
;
;
;
;
CycleCtr?L,f
CycleCtr?H,f
INT_ErrorN
0x20
COUNT1
_RAW_DATA
TestGotHi
_RAW_DATA
TestGotHi
COUNT1,1
TestGotLoLoop
MChip_Prog
TestGotHi
MOVLW
0x20
MOVWF
COUNT1
BTFSC
_RAW_DATA
GOTO
TestGotLo
TestGotHiLoop
BTFSC
_RAW_DATA
GOTO
TestGotLo
DECFSZ COUNT1,1
GOTO
TestGotHiLoop
;END TEST FOR NO MODULATION
MChip_Prog
BCF
CALL
_TMR2ON
TWC
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
CLRF
DATA0
DATA1
DATA2
DATA3
DATA4
DATA5
DATA6
DATA7
DATA8
DATA9
DATAA
DATAB
DATAC
DATAD
DATAE
DATAF
MOVLW
MOVWF
Y
RxByte
; RxByte=Y
; |
DS51139C-page 189
DATAF
FSR
h20
ByteCtr
;
;
;
;
RS232On
RxByte,W
RS232TxW
RS232Rx
_CARRY
INT_END
RxByte,W
BO3
h30
BO3,W
_CARRY
CheckRxByte
BO3
h3A-h30
BO3,W
_CARRY
RSDataJ1
BO3
h41-h3A
BO3,W
_CARRY
CheckRxByte
BO3
h47-h41
BO3,W
_CARRY
CheckRxByte
h0A
BO3,f
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
BO3,W
ByteCtr,0
BO3,W
INDF,f
ByteCtr,0
FSR,f
ByteCtr,f
RS_ByteLoop
;
;
;
;
;
;
;
;
FSR=#DATAF
|
ByteCtr=#h20
|
; {
delay
Transmit RxByte on RS-232
|
Read RS-232 byte into RxByte
|(if timeout, goto INT_END)
|
BO3=RxByte
|
if (BO3<#h30)
|
|
{ goto CheckRxByte }
BO3=BO3-#h30
if (BO3>=#h3A-#h30)
|
|
{
BO3=BO3-#h3A+#h30
if (BO3<#h41-#h3A)
|
|
{ goto CheckRxByte }
BO3=BO3-#h41+#h3A
if (BO3>=#h47-#h41)
|
|
{ goto CheckRxByte }
BO3=BO3+#h0A
|
;
}
W = { BO3 swapped if ByteCtr,0==#0
|
{ BO3
if ByteCtr,0==#1
|
INDF=INDF OR W
if (ByteCtr,0==#1)
{ FSR=FSR-#1 }
DEC ByteCtr
} until (ByteCtr==#0)
RS232On
RxByte,W
RS232TxW
RS232Rx
_CARRY
INT_END
RxByte,W
V
_ZERO
CheckRxByte
;
;
;
;
;
;
;
;
;
;
delay
Transmit RxByte on RS-232
|
Read RS-232 byte into RxByte
|( if timeout, goto INT_END)
|
if (RxByte!=#V)
|
|
{ goto CheckRxByte }
; ********
Top BCF PORTB,3 ; SET FOR LOW VOLTAGE
CALLDELAY ; CALL A SMALL DELAY
GAP ; THIS IS THE ROUTINE THAT SETS THE GAP
BCF
DS51139C-page 190
PORTB,3
MCRF2XX
CALL
DELAY
MODING
BIGDLY
CALL
CALL
CALL
CALL
CALL
TWC
TWC
TWC
TWC
TWC
CALL
CALL
TESTMOD
PROGRAM
MOVLW
MOVWF
CALL
DECFSZ
GOTO
0x60
COUNT1
TWC
COUNT1,f
BIGDLY
DECFSZ OVERPRO,1
; DECREMENT THE OVERPROGRAMMING NUMBER
GOTOMODING ; GOTO LOOK FOR THE MODULATION TO STOP
GOTOVERIFY
;***************************************
VERIFY
CALL
TESTMOD
StartWatch
MOVLW
MOVWF
VerifyD1a
MOVLW
MOVWF
VerifyD1b
CLRWDT
DECFSZ
GOTO
DECFSZ
GOTO
StopWatch
CLRF
BSF
h00
DelayReg?H
hFF
DelayReg?L
DelayReg?L,f
VerifyD1b
DelayReg?H,f
VerifyD1a
BitCtr
BitCtr,7
VerifyL1
;
;
;
;
;
;
;
;
;
;
;
;
Delay >~262144Ti
|
|
| delay 1021Ti
| |
| |
| |
| |
| |
|
|
|
; BitCtr=#128
; |
; {
DS51139C-page 191
;
;
set NoiseTimeout
|
;
;
_RAW_DATA
VerS1
VerS0
;% reftime+4-NTO*6-STO*7
DECFSZ NoiseTimeout,f
SKIP
GOTO
VerFail
BTFSC
_RAW_DATA
GOTO
VerS1
VerGot0
;% reftime+3-NTO*6-STO*7
VerGot0a
;% reftime+3-NTO*6-STO*7
CLRWDT
DECFSZ SampTimeout,f
SKIP
GOTO
SampleDone
BTFSS
_RAW_DATA
GOTO
VerGot0
NOP
VerGot0b
;% reftime+3-NTO*6-STO*7
CLRWDT
DECFSZ SampTimeout,f
SKIP
GOTO
SampleDone
BTFSS
_RAW_DATA
GOTO
VerGot0
NOP
VerGotRise
;% reftime+3-NTO*6-STO*7
CLRWDT
DECFSZ SampTimeout,f
SKIP
GOTO
SampleDone
INCF
CycleCtr?L,f
GOTO
VerGot1
VerS1
;% reftime+4-NTO*6-STO*7
DECFSZ NoiseTimeout,f
SKIP
GOTO
VerFail
BTFSS
_RAW_DATA
GOTO
VerS0
VerGot1
;% reftime+3-NTO*6-STO*7
VerGot1a
;% reftime+3-NTO*6-STO*7
CLRWDT
DS51139C-page 192
MCRF2XX
DECFSZ
SKIP
GOTO
BTFSC
GOTO
NOP
SampTimeout,f
SampleDone
_RAW_DATA
VerGot1
VerGot1b
;% reftime+3-NTO*6-STO*7
CLRWDT
DECFSZ SampTimeout,f
SKIP
GOTO
SampleDone
BTFSC
_RAW_DATA
GOTO
VerGot1
NOP
VerGotFall
;% reftime+3-NTO*6-STO*7
CLRWDT
DECFSZ SampTimeout,f
SKIP
GOTO
SampleDone
INCF
CycleCtr?L,f
GOTO
VerGot0
SampleDone
;% reftime+1-NTO*6-STO*7
;& STO=0
;% reftime+1-NTO*6
NoiseMargin
;% reftime+1-NTO*6
NOP
NOP
NOP
DECFSZ NoiseTimeout,f
GOTO
NoiseMargin
;% reftime+0-NTO*6
;% NTO=0
;% reftime+0
BTFSC
GOTO
NOP
DATAF,7
Verify1
Verify0
;% 3 from ref time
; if 0 bit, _DATA_IN cycles 10 times in 80 Tcy
; CycleCtr?L should be 20
MOVF
CycleCtr?L,W
ADDLW
low(0-d18)
BTFSS
_CARRY
GOTO
INT_Failure
ADDLW
low(d18-d22)
BTFSS
_CARRY
GOTO
Bit_Verified
GOTO
INT_Failure
Verify1
;% 3 from ref time
; if 1 bit, _DATA_IN cycles 8 times in 80Tcy
; CycleCtr?L should be 16
MOVF
CycleCtr?L,W
ADDLW
low(0-d14)
BTFSS
_CARRY
GOTO
INT_Failure
ADDLW
low(d14-d18)
DS51139C-page 193
_CARRY
Bit_Verified
INT_Failure
Bit_Verified
;% 11 from ref time
BCF
_CARRY
BTFSC
DATAF,7
BSF
_CARRY
RLF
DATA0,f
RLF
DATA1,f
RLF
DATA2,f
RLF
DATA3,f
RLF
DATA4,f
RLF
DATA5,f
RLF
DATA6,f
RLF
DATA7,f
RLF
DATA8,f
RLF
DATA9,f
RLF
DATAA,f
RLF
DATAB,f
RLF
DATAC,f
RLF
DATAD,f
RLF
DATAE,f
RLF
DATAF,f
;% 30 from ref time
MOVLW
MOVWF
NOP
d167
DelayReg?L
VerDelay
CLRWDT
DECFSZ
GOTO
DelayReg?L,f
VerDelay
;
;
;
;
;
;
;
Delay 670Ti
|
|
|
|
|
|
RS232On
n
RS232TxW
BigLoop1
RS232On
N
DS51139C-page 194
MCRF2XX
CALL
GOTO
RS232TxW
BigLoop1
DELAYMOVLW0x05
MOVWFDELAY1
HOLD4DECFSZDELAY1,1
GOTOHOLD4
RETLW0
; TWC lasts
TWC MOVLW0xB0 ; WRITE CYCLE TIMER SUBROUTINE
MOVWFDELAY1
HOLD1MOVLW0x02
MOVWFDELAY2
HOLD2DECFSZDELAY2,1
GOTOHOLD2
DECFSZDELAY1,1
GOTOHOLD1
RETLW0
BUFFERMOVLW0x58
MOVWFDELAY1
HOLD3DECFSZDELAY1,1
GOTOHOLD3
NOP
NOP
RETLW0
TESTMOD; THIS ROUTINE TESTS THE RAW DATA LINE TO SEE IF THE
; PART IS MODULATING OR NOT
; This routine returns when _RAW_DATA stays constant for some time
; some time = 7Ti+32*5Ti = 167Ti = 10.4375Tcy
MOVLW
MOVWF
MOVLW
MOVWF
TestModLo
DECFSZ
SKIP
DECFSZ
SKIP
GOTO
MOVLW
MOVWF
BTFSS
GOTO
TestModLoLoop
BTFSS
GOTO
DECFSZ
GOTO
RETLW
TestModHi
MOVLW
MOVWF
BTFSC
GOTO
TestModHiLoop
BTFSC
GOTO
DECFSZ
GOTO
d7
CycleCtr2?H
d164
CycleCtr2?L
;
;
;
;
CycleCtr2?L,f
CycleCtr2?H,f
INT_Failure
0x20
COUNT1
_RAW_DATA
TestModHi
_RAW_DATA
TestModHi
COUNT1,1
TestModLoLoop
0
0x20
COUNT1
_RAW_DATA
TestModLo
_RAW_DATA
TestModLo
COUNT1,1
TestModHiLoop
DS51139C-page 195
DS51139C-page 196
MCRF2XX
NOP
NOP
NOP
NOP
NOP
MOVLW0x07 ; MOVW 7 HEX INTO W
MOVWFBIT
; MOVE THIS INTO THE BIT COUNTER
WRITECBTFSSDATAC,7 ; TEST MOST BYTE
BSF PORTB,3 ; SET THE HIGH VOLTAGE
CALLTWC
; CALL THE WRITE CYCLE TIMER
BCF
STATUS,C
; CLEAR THE CARRY BIT
BTFSC
DATAC,7
; TEST THE MSB
BSF
STATUS,C
; SET THE CARRY BIT
RLF
DATAC,1
; ROTATE DATAF
BCFPORTB,3; CLEAR THE HIGH VOLTAGE
CALL BUFFER; CALL THE BUFFER TIMER
DECF
BIT,1; DECREMENT BIT, SKIP IF ZERO
BTFSS
BIT,7
; SKIP IF SET
GOTOWRITEC; GOTO WRITEC IF BIT IS NOT EQUAL TO ZERO
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOVLW0x07 ; MOVW 7 HEX INTO W
MOVWFBIT
; MOVE THIS INTO THE BIT COUNTER
WRITEBBTFSSDATAB,7 ; TEST MOST BYTE
BSF PORTB,3 ; SET THE HIGH VOLTAGE
CALLTWC
; CALL THE WRITE CYCLE TIMER
BCF
STATUS,C
; CLEAR THE CARRY BIT
BTFSC
DATAB,7
; TEST THE MSB
BSF
STATUS,C
; SET THE CARRY BIT
RLF
DATAB,1
; ROTATE DATAF
BCFPORTB,3; CLEAR THE HIGH VOLTAGE
CALL BUFFER; CALL THE BUFFER TIMER
DECF
BIT,1; DECREMENT BIT, SKIP IF ZERO
BTFSS
BIT,7
; SKIP IF SET
GOTOWRITEB; GOTO WRITEB IF BIT IS NOT EQUAL TO ZERO
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOVLW0x07 ; MOVW 7 HEX INTO W
MOVWFBIT
; MOVE THIS INTO THE BIT COUNTER
WRITEABTFSSDATAA,7 ; TEST MOST BYTE
BSF PORTB,3 ; SET THE HIGH VOLTAGE
CALLTWC
; CALL THE WRITE CYCLE TIMER
BCF
STATUS,C
; CLEAR THE CARRY BIT
BTFSC
DATAA,7
; TEST THE MSB
BSF
STATUS,C
; SET THE CARRY BIT
RLF
DATAA,1
; ROTATE DATAF
BCFPORTB,3; CLEAR THE HIGH VOLTAGE
CALL BUFFER; CALL THE BUFFER TIMER
DECF
BIT,1; DECREMENT BIT, SKIP IF ZERO
BTFSS
BIT,7
; SKIP IF SET
GOTOWRITEA; GOTO WRITEA IF BIT IS NOT EQUAL TO ZERO
NOP
DS51139C-page 197
DS51139C-page 198
MCRF2XX
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOVLW0x07 ; MOVW 7 HEX INTO W
MOVWFBIT
; MOVE THIS INTO THE BIT COUNTER
WRITE6BTFSSDATA6,7 ; TEST MOST BYTE
BSF PORTB,3 ; SET THE HIGH VOLTAGE
CALLTWC
; CALL THE WRITE CYCLE TIMER
BCF
STATUS,C
; CLEAR THE CARRY BIT
BTFSC
DATA6,7
; TEST THE MSB
BSF
STATUS,C
; SET THE CARRY BIT
RLF
DATA6,1
; ROTATE DATAF
BCFPORTB,3; CLEAR THE HIGH VOLTAGE
CALL BUFFER; CALL THE BUFFER TIMER
DECF
BIT,1; DECREMENT BIT, SKIP IF ZERO
BTFSS
BIT,7
; SKIP IF SET
GOTOWRITE6; GOTO WRITE6 IF BIT IS NOT EQUAL TO ZERO
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOVLW0x07 ; MOVW 7 HEX INTO W
MOVWFBIT
; MOVE THIS INTO THE BIT COUNTER
WRITE5BTFSSDATA5,7 ; TEST MOST BYTE
BSF PORTB,3 ; SET THE HIGH VOLTAGE
CALLTWC
; CALL THE WRITE CYCLE TIMER
BCF
STATUS,C
; CLEAR THE CARRY BIT
BTFSC
DATA5,7
; TEST THE MSB
BSF
STATUS,C
; SET THE CARRY BIT
RLF
DATA5,1
; ROTATE DATAF
BCFPORTB,3; CLEAR THE HIGH VOLTAGE
CALL BUFFER; CALL THE BUFFER TIMER
DECF
BIT,1; DECREMENT BIT, SKIP IF ZERO
BTFSS
BIT,7
; SKIP IF SET
GOTOWRITE5; GOTO WRITE5 IF BIT IS NOT EQUAL TO ZERO
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOVLW0x07 ; MOVW 7 HEX INTO W
MOVWFBIT
; MOVE THIS INTO THE BIT COUNTER
WRITE4BTFSSDATA4,7 ; TEST MOST BYTE
BSF PORTB,3 ; SET THE HIGH VOLTAGE
CALLTWC
; CALL THE WRITE CYCLE TIMER
BCF
STATUS,C
; CLEAR THE CARRY BIT
BTFSC
DATA4,7
; TEST THE MSB
BSF
STATUS,C
; SET THE CARRY BIT
RLF
DATA4,1
; ROTATE DATAF
BCFPORTB,3; CLEAR THE HIGH VOLTAGE
CALL BUFFER; CALL THE BUFFER TIMER
DECF
BIT,1; DECREMENT BIT, SKIP IF ZERO
BTFSS
BIT,7
; SKIP IF SET
DS51139C-page 199
DS51139C-page 200
MCRF2XX
BTFSS
BIT,7
; SKIP IF SET
GOTOWRITE1; GOTO WRITEF IF BIT IS NOT EQUAL TO ZERO
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOVLW0x07 ; MOVW 7 HEX INTO W
MOVWFBIT
; MOVE THIS INTO THE BIT COUNTER
WRITE0BTFSSDATA0,7 ; TEST MOST BYTE
BSF PORTB,3 ; SET THE HIGH VOLTAGE
CALLTWC
; CALL THE WRITE CYCLE TIMER
BCF
STATUS,C
; CLEAR THE CARRY BIT
BTFSC
DATA0,7
; TEST THE MSB
BSF
STATUS,C
; SET THE CARRY BIT
RLF
DATA0,1
; ROTATE DATAF
BCFPORTB,3; CLEAR THE HIGH VOLTAGE
CALL BUFFER; CALL THE BUFFER TIMER
DECF
BIT,1; DECREMENT BIT, SKIP IF ZERO
BTFSS
BIT,7
; SKIP IF SET
GOTOWRITE0; GOTO WRITE0 IF BIT IS NOT EQUAL TO ZERO
RETLW
0
Delay12
NOP
Delay11
GOTO
Delay09
GOTO
Delay07
Delay09
RS232On
BCF
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
RETLW
_TMR2ON
RS232StopBit
RS232StopBit
RS232StopBit
RS232StopBit
RS232StopBit
RS232StopBit
RS232StopBit
RS232StopBit
RS232StopBit
RS232StopBit
h00
RS232WaitForever
BigWaitL1
CLRWDT
BTFSS
_RS232IN
GOTO
RS232RxL1Done
NOP
GOTO
BigWaitL1
RS232Rx
MOVLW
MOVWF
CLRF
CLRF
RS232RxL1
CLRWDT
BTFSS
GOTO
DECFSZ
;
;
;
;
;
;
;
;
;
;
;
;
|
|
|
|
|
|
|
|
|
|
|
|
;!|
; |
if (_RS232IN==#0)
; |
{ goto RS232RxL1Done }
;!|
; | } until (0)
;
;
;
;
_RS232IN
RS232RxL1Done
TimerLo,f
;!|
; |
if (_RS232IN==#0)
; |
{ goto RS232RxL1Done }
; | }
|
|
|
|
d16
TimerHi
TimerMid
TimerLo
DS51139C-page 201
RS232RxL1
; | |
TimerMid,f
; | |
RS232RxL1
; | |
TimerHi,f
; | |
RS232RxL1
; | |
_CARRY
; | return with error
h00
; | |
; |
RS232RxL1Done
; |% 3 to (+6, +8, +10) - say 10us
; |% 10-104=-94
MOVLW
d90
;!|
CALL
DelayW12
;!|% 9
CLRF
BitCtr
; | BitCtr=#8
BSF
BitCtr,3
; | |
RS232RxLoop
; | {% 11
MOVLW
d181
;!|
CALL
DelayW12
;!| % 205
CLRF
BO3
; |
BO3,1=_RS232IN
BTFSC
_RS232IN
; |
|
INCF
BO3,f
; |
|% 208
BTFSC
_RS232IN
; |
|% 1
INCF
BO3,f
; |
|
BTFSC
_RS232IN
; |
|
INCF
BO3,f
; |
|% 4
RRF
RxByte,f
; |
RR RxByte
BCF
RxByte,7
; |
RxByte,7=BO3,1
BTFSC
BO3,1
; |
|
BSF
RxByte,7
; |
|% 8
DECFSZ BitCtr,f
; |
DEC BitCtr
GOTO
RS232RxLoop
; | } until (BitCtr==#0)
BCF
_CARRY
; | return with no error
RETLW
h00
; | |
RS232TxW
MOVWF
CALL
CLRF
BSF
BCF
MOVLW
CALL
RS232TxLoop
BTFSS
BCF
BTFSC
BSF
RRF
MOVLW
CALL
DECFSZ
GOTO
GOTO
RS232TxJ1
NOP
BSF
RETLW
;
;
;
;
;
;
;
TxByte,0
_RS232OUT
TxByte,0
_RS232OUT
TxByte,f
d187
DelayW12
BitCtr,f
RS232TxLoop
RS232TxJ1
; |
; |
; |
; |
; |
;!|
;!| % 202
; |
DEC BitCtr
; | } until (BitCtr==#0)
; |
; |
; |% 207
; | Stop bit
; | return
_RS232OUT
h00
|
|
|
|
|
|
|
TxByte
RS232StopBit
BitCtr
BitCtr,3
_RS232OUT
d191
DelayW12
end
DS51139C-page 202
DS51115F-page 203
ASIA/PACIFIC
ASIA/PACIFIC
EUROPE
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://support.microchip.com
Web Address:
www.microchip.com
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
India - Bangalore
Tel: 91-80-2229-0061
Fax: 91-80-2229-0062
China - Beijing
Tel: 86-10-8528-2100
Fax: 86-10-8528-2104
Austria - Weis
Tel: 43-7242-2244-399
Fax: 43-7242-2244-393
Denmark - Ballerup
Tel: 45-4450-2828
Fax: 45-4485-2829
China - Chengdu
Tel: 86-28-8676-6200
Fax: 86-28-8676-6599
Japan - Kanagawa
Tel: 81-45-471- 6166
Fax: 81-45-471-6122
France - Massy
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
China - Fuzhou
Tel: 86-591-8750-3506
Fax: 86-591-8750-3521
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
Germany - Ismaning
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Atlanta
Alpharetta, GA
Tel: 770-640-0034
Fax: 770-640-0307
Boston
Westford, MA
Tel: 978-692-3848
Fax: 978-692-3821
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Farmington Hills, MI
Tel: 248-538-2250
Fax: 248-538-2260
Kokomo
Kokomo, IN
Tel: 765-864-8360
Fax: 765-864-8387
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
Taiwan - Kaohsiung
Tel: 886-7-536-4818
Fax: 886-7-536-4803
Taiwan - Taipei
Tel: 886-2-2500-6610
Fax: 886-2-2508-0102
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
England - Berkshire
Tel: 44-118-921-5869
Fax: 44-118-921-5820
Taiwan - Hsinchu
Tel: 886-3-572-9526
Fax: 886-3-572-6459
China - Qingdao
Tel: 86-532-502-7355
Fax: 86-532-502-7205
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
San Jose
Mountain View, CA
Tel: 650-215-1444
Fax: 650-961-0286
Toronto
Mississauga, Ontario,
Canada
Tel: 905-673-0699
Fax: 905-673-6509
10/20/04
DS51115F-page 204