e
e
e
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 with-
out 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 Information contained in the data sheet is on products in full production.
100V
BLOCK DIAGRAM
Modulation Data
Control
Load Clock
Generator Row Memory
coil Decode Array
connections Vcc
Rectifier
Vss
Counter Column
Decode
All parameters apply across the Industrial (I): Tamb = -40°C to +85°C
specified operating ranges
unless otherwise noted.
VB VA
SYNC WORD
CB5 = 1 1.5-bit sync word enable
CB5 = 0 1.5-bit sync word disable
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 (Not Used)
MODULATION OPTIONS
CB8 = 0; CB9 = 0 FSK 0 = Fc/8, 1 = Fc/10
CB8 = 0; CB9 = 1 Direct
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)
PSK RATE OPTION
CB10 = 1 clk/4 carrier
CB10 = 0 clk/2 carrier
(READ ONLY)
CB11 = 0
ARRAY LOCK BIT (READ ONLY)
CB12 = 0 array not locked
CB12 = 1 array is locked
Pad VA
Pad VB
To reader MCRF200
amplifier/filter Data
2.2 nF
1
fres = ------------------ = 125 kHz
2π LC
CB12 CB11 CB10 CB9 CB8 CB7 CB6 CB5 CB4 CB3 CB2 CB1
0 0 0 0 0 0 0 0 1 0 1 0
FEATURES APPLICATION
• Anticollision feature to resolve multiple tags in the
same RF field
• Read-only data transmission
RF
• 96 or 128 bits of One-Time Programmable (OTP) Signal
user memory (also supports 48 and 64-bit
Transmitter/ MCRF250
protocols) Receiver
• Operates up to 150 kHz Data
• On-chip rectifier and voltage regulator
• Low power operation
• Factory programming and device serialization
available
• Encoding options: The MCRF250 is equipped with an anticollision
feature that allows multiple tags in the same field to
- NRZ Direct, Differential Biphase, Manchester
be read simultaneously. This revolutionary feature
Biphase, Biphase IDI
eliminates the issue of data corruption due to
• Modulation options: simultaneous transmissions from multiple tags.
- FSK, Direct, PSK (change on data change),
The user memory array of this device can be
PSK (change at the beginning of a one)
programmed contactlessly after encapsulation. This
• Contactless programmable after encapsulation allows the user to keep encapsulated blank tags in
stock for on-demand personalization. The tags can
DESCRIPTION then be programmed with data as they are needed.
This device is a Radio Frequency Identification (RFID)
tag that provides a variety of operating modes. The These devices are available in die form or packaged in
device is powered by an external RF transmitter SOIC, PDIP or COB modules. The encoding,
(reader) through inductive coupling. When in the reader modulation, frequency, and bit rate options are
field, the device will transmit the contents of its memory specified by the customer and programmed by
array by damping (modulating) the incoming RF signal. Microchip Technology Inc. prior to shipment. Array pro-
A reader is able to detect the damping and decodes the gramming and serialization (SQTP) can also be
data being transmitted. Code length, modulation arranged upon request. See TB023 (page 23) for more
option, encoding option and bit rate are set at the information.
factory to fit the needs of particular applications.
BLOCK DIAGRAM
Modulation Data
Control
Clock Anticollision
Modulation
Counter Column
Decode
VA 1 8 VB
MCRF250
NC 2 7 NC
NC 3 6 NC
NC 4 5 NC
VB VA
2.3 VDD Regulator This logic acts upon the serial data being read from the
EEPROM and performs two operations on the data.
The device generates a fixed supply voltage from the The logic first encodes the data according to the
unregulated coil voltage. configuration bits CB6 and CB7. The data can be sent
out direct to the modulation logic or encoded
2.4 VPP Regulator Biphase_s (Differential), Biphase_l (Manchester) or IDI
This regulates a programming voltage during the (Manchester).
programming mode. The voltage is switched into the The encoded data is then either passed NRZ Direct out
EEPROM array to perform block erasure of the to modulate the coil, or FSK modulated, or PSK
memory as well as single bit programming during both modulated with phase changes on the change of data,
contact and contactless programming. During reading or PSK with phase changes on the bit edge of a one.
this voltage is level shifted down and kept below the Configuration bits CB8 and CB9 determine the
programming voltages to insure that the part is not modulation option. CB10 is used if the PSK option has
inadvertently programmed. been selected and determines whether the return
carrier rate is FCLK/2 or FCLK/4.
3.1 Control Bit Register The chip will access data at a baud rate determined by
bits CB2, CB3, CB4, and CB5 of the configuration
The configuration register determines the operational register. CB2, CB3, and CB4 determine the return data
parameters of the device. The configuration register rate (CACLK). The default rate of FCLK/128 is used for
can not be programmed contactlessly; it is contact and contactless programming. Once the array
programmed during wafer probe at the Microchip is successfully programmed, the lock bit CB12 is set.
factory. CB11 is always a one; CB12 is set when When the lock bit is set, programming and erasing the
successful contact or contactless programming of the device becomes permanently disabled. The
data array has been completed. Once CB12 is set, configuration register has no effect on device timing or
programming and erasing of the device is disabled. modulation until after the EEPROM data array is
Figure 3-1 contains a description of the control register programmed. If CB2 is set to a one and CB5 is set to a
bit functions. one, the 1.5 bit SYNC word option is enabled.
Pad VB
To reader MCRF250
amplifier/ Data
data detector (Backscattering
2.2 nF Signal)
1
fres = ------------------ = 125 kHz
2π LC
Is
modulation No
present?
Yes
Is
only one tag No
modulating?
Yes
Read Tag
MCRF250 - I /WFxxx
Hex = Three digit hex value to be programmed into the
Code configuration register. Three hex characters corre-
Configuration:
spond to 12 binary bits. These bits are programmed
into the configuration register MSB first (CB12,
CB11…CB1). See the example below.
WF = Sawed wafer on frame (7 mil backgrind)
W = Wafer
S = Dice in wafer pack
Package: SN = 150 mil SOIC
P = PDIP
1C = COB module with 1000 pF capacitor
3C = COB module with 330 pF capacitor
Temperature I = –40°C to +85°C
Range:
CB12 CB11 CB10 CB9 CB8 CB7 CB6 CB5 CB4 CB3 CB2 CB1
0 1 0 0 0 0 0 0 1 0 1 0
Filename
FILE0000.TXT FILE0001.TXT
00001 A34953DBCA001F26 Next Code 12346 EA43786937DCFB87
00002 C4F55308B492A783 12347 459724FCA487ED24
00003 38FAC359981200B7 " "
" " " " Code File
12345 9278256DCAFE8756 Last Code
ID Code
Serial Number Carriage Return Space Necessary
Tag Coil
V = V0sin(ωt)
Tag
B = B0sin(ωt)
Reader Coil
Reader
Electronics Tuning Circuit
I = I0sin(ωt)
α
–6 2 2 3⁄2
Tag 2 ( 1.5 × 10 ) ( 0.08 + 0.254 )
= -------------------------------------------------------------------------
–7
( 4π × 10 ) ( 0.08 )
The induced voltage developed across the loop This is an attainable number. If, however, we wish to
antenna coil is a function of the angle of the arrival sig- have a read range of 20 inches (50.8 cm), it can be
nal. The induced voltage is maximized when the found that NI increases to 48.5 ampere-turns. At
antenna coil is placed perpendicular to the direction of 25.2 inches (64 cm), it exceeds 100 ampere-turns.
the incoming signal where α = 0.
2 2
100
a – 2r = 0
NI for 1.5 µ-Weber/m2
Note: BO = 1.5 µWb/m2 is used. The above result indicates that the optimum radius of
loop for a reader antenna is 1.414 times the read
range r.
l
RDC = ------ (Ω)
σS
= 0.187 ( mm )
where:
l = total length of the wire
The wire resistance increases with frequency, and the
σ = conductivity resistance due to the skin depth is called an AC
S = cross-sectional area resistance. An approximated formula for the ac resis-
tance is given by:
Table 1 shows the diameter for bare and
enamel-coated wires, and DC resistance.
EQUATION 15:
AC Resistance of Wire
1 a
At DC, charge carriers are evenly distributed through Rac ≈ ------------- = ( R DC ) ------ (Ω)
2 σ πδ 2δ
the entire cross section of a wire. As the frequency
increases, the reactance near the center of the wire
where:
increases. This results in higher impedance to the cur-
rent density in the region. Therefore, the charge moves a = coil radius
away from the center of the wire and towards the edge
For copper wire, the loss is approximated by the DC
of the wire. As a result, the current density decreases
resistance of the coil, if the wire radius is greater than
in the center of the wire and increases near the edge of
0.066 ⁄ f cm. At 125 kHz, the critical radius is 0.019
the wire. This is called a skin effect. The depth into the
cm. This is equivalent to #26 gauge wire. Therefore, for
conductor at which the current density falls to 1/e, or
minimal loss, wire gauge numbers of greater than #26
37% of its value along the surface, is known as the skin
should be avoided if coil Q is to be maximized.
depth and is a function of the frequency and the perme-
ability and conductivity of the medium. The skin depth
is given by:
EQUATION 13:
1
δ = -----------------
πfµ σ
where:
f = frequency
µ = permeability of material
σ = conductivity of the material
FIGURE 8: A CIRCULAR LOOP AIR CORE Inductance of a Square Loop Coil with
ANTENNA COIL WITH Multilayer
N-TURNS If N is the number of turns and a is the side of the
square measured to the center of the rectangular cross
section that has length b and depth c as shown in
N-Turn Coil Figure 9, then[2]:
b a
center of coil EQUATION 23:
a
X
L = 0.008aN 2.303log 10 ------------ + 0.2235 ------------ + 0.726 ( µH )
2 a b+c
b b + c a
h
The formulas for inductance are widely published and
provide a reasonable approximation for the relationship
The number of turns needed for a certain inductance between inductance and number of turns for a given
value is simply obtained from Equation 20 such that: physical size[1]-[4]. When building prototype coils, it is
wise to exceed the number of calculated turns by about
EQUATION 21: 10%, and then remove turns to achieve resonance. For
production coils, it is best to specify an inductance and
tolerance rather than a specific number of turns.
L µH ( 6a + 9h + 10b )
N = -------------------------------------------------
2
-
( 0.31 )a FIGURE 9: A SQUARE LOOP ANTENNA
COIL WITH MULTILAYER
b
N-Turn Coil
c
a a
b
d = 2a
2a
Co Co Co
Coupling Coil
(primary coil)
C2
To reader electronics
Main Loop
(secondary coil)
C1
Z = R
R C L
EQUATION 29:
1
B = --------------- ( Hz )
2πRC
fo
= ---- where:
B
r = ohmic resistance of the circuit
where:
fo = resonant frequency EQUATION 34:
B = bandwidth
X L = 2πfo L (Ω)
By applying Equation 27 and Equation 29 into
Equation 30, the loaded Q in the parallel resonant
circuit is:
EQUATION 35:
EQUATION 31: 1
Xc = --------------- (Ω)
2πf o C
C
Q = R ----
L The impedance in Equation 33 becomes minimized
when the reactance component cancelled out each
The Q in parallel resonant circuit is directly proportional
other such that XL = XC. This is called a resonance
to the load resistor R and also to the square root of the
condition. The resonance frequency is same as the
ratio of capacitance and inductance in the circuit.
parallel resonant frequency given in Equation 27.
When this parallel resonant circuit is used for the tag
antenna circuit, the voltage drop across the circuit can FIGURE 13: SERIES RESONANCE
be obtained by combining Equations 7 and 31, CIRCUIT
EQUATION 32: r C
Eo
V o = 2πfo NQSBo cos α
EIN L
= 2πf o N R ---- SB o cos α
C 125 kHz
L
30
Q = 30
25
20
15
Q = 14
10
Q=8
Q =5
5
PSK FSK
FSK PSK
÷2 ASK ÷8,10
÷8,10 ÷2
0
50 75 100 125 150 175 200
f
fo
S11 Z Z
f f f
fo fo fo
FIGURE 17: READ RANGE VS. TAG SIZE FOR PROXIMITY APPLICATIONS
0.5" diameter
Tag
ch 1" diameter
1 in
Tag
s
2 inche
Proximity Reader
Antenna 2" diameter
(4" x 3") 3 ~ 4 inches
Tag
Tag
FIGURE 18: READ RANGE VS. TAG SIZE FOR LONG RANGE APPLICATIONS
0.5" diameter
Tag
s
he
i nc
4 ~5 1" diameter
Tag
he s
8~ 12 inc
Long Range 2" diameter
Reader Antenna 18 ~ 22 inches Tag
(16" x 32")
27 ~ 3
2 inch 3.37" x 2.125"
es
(Credit Card Type: ISO Card)
Tag
FIGURE 2-1: BLOCK DIAGRAM OF TYPICAL RFID READER FOR FSK SIGNAL (125 kHz)
Transmitting Section
Microcontroller
Data Decoding Filter, Amplifier,
Interface with and Pulse Shaping Envelope Detector
CLK Host Computer
To Host Computer
FIGURE 3-1: SIGNAL WAVEFORM FOR FSK PROTOCOL (Fc = 125 KHZ)
1 2 3 4 5 6 7 8 9 10 ô í ÷ û ø ù î 1 2 3 4 5 6 7 8 9 10 ôí ÷û øù î 1 2 3
Transmitting Signal
Fc/8 =
Fc/10 = 12.5 kHz 15.625 kHz
(‘1’) (‘0’) (‘1’) (‘0’)
Data Signal
Backscattering
Signal
Signal in Receiver
Coil
Output Signal of
Envelop Detector
Detected Signal
after Pulse Shaping
Circuit
PIC16C84
; ///////////////////////////////////////////////////////////////////////////
; Revision history
; ///////////////////////////////////////////////////////////////////////////
;
; Ver Date Comment
;
; 0.01 29 Dec 97 Copied from MChip\Reader\FSK
; 0.03 28 Jan 98 TRANSMIT TAB (h’09’) REGULARLY
; 20 Aug 98 Modified to correct FSK comments
;
; Tbit=50Tcy=400Ti
; Ttag=96Tbit
; Header=h’802A’
;
processor pic16c84
#include “p16c84.inc”
__config b’11111111101001’
; Code Protect on, power-up timer on, WDT off, XT oscillator
BO3 = h’0C’
DelayReg = h’0C’
BitCtr = h’0D’
BeepCtrHi = h’0D’
TxByte = h’0E’
BeepCtrLo = h’0E’
Buffer0 = h’10’ ; --- IMMOBILE --- IMMOBILE --- IMMOBILE --- IMMOBILE
SKIP macro
BTFSC PCLATH,7
endm
RESET_A
CLRWDT
; Initialise registers
CLRF STATUS ; | Access register page 0
CLRF FSR ; | FSR=#0
MOVLW StartPORTA ; | Initialise PORT and TRIS registers
MOVWF PORTA ; | |
MOVLW StartPORTB ; | |
MOVWF PORTB ; | |
BSF _RP0 ;^| |
MOVLW StartTRISA ;^| |
BigLoop1
;303-581-1041
BSF _LED1 ; LEDs “reading”
CALL Delay07 ; |
BCF _LED2 ; |
MOVLW h’09’ ; Transmit TAB regularly
CALL RS232TxW ; |
MOVLW d’96’ ; set BitCtr
MOVWF BitCtr ; |
GetEdge ; Get an edge on _DATA_IN
BTFSC _DATA_IN ; |
GOTO PreSync_H ; |
NOP ; |
PreSync_L ; |
BTFSC _DATA_IN ; |
GOTO PreSync_H ; |
BTFSC _DATA_IN ; |
GOTO PreSync_H ; |
DoSync_L ; |
CLRWDT ; |
BTFSS _DATA_IN ; |
GOTO DoSync_L ; |
BTFSS _DATA_IN ; |
GOTO DoSync_L ; |
GOTO 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 ; |% 6 to (+4) from edge, say 8 from edge
;% -192Ti from sample
MOVLW d’62’
MOVWF DelayReg
;% -190Ti from sample
ReadBit ; {% -4-DelayReg*3 Ti from sample
GOTO ReadBitD1 ; delay
ReadBitD1 ; |
DECFSZ DelayReg,f ; |
HeadSearch
MOVLW d’96’ ; set BitCtr
MOVWF BitCtr ; |
HeadSearchL1 ; {
MOVLW h’80’ ; if (header found)
XORWF BufferB,W ; |
BTFSS _ZERO ; |
GOTO NotHead0 ; |
MOVLW h’2A’ ; |
XORWF BufferA,W ; |
BTFSS _ZERO ; |
GOTO NotHead0 ; {
GOTO HeadFound ; goto HeadFound
NotHead0 ; }
RLF Buffer0,f ; ROL Buffer
RLF Buffer1,f ; |
RLF Buffer2,f ; |
RLF Buffer3,f ; |
RLF Buffer4,f ; |
RLF Buffer5,f ; |
RLF Buffer6,f ; |
RLF Buffer7,f ; |
RLF Buffer8,f ; |
RLF Buffer9,f ; |
RLF BufferA,f ; |
RLF BufferB,f ; |
BCF Buffer0,0 ; |
BTFSC _CARRY ; |
BSF Buffer0,0 ; |
DECFSZ BitCtr,f ; DEC BitCtr
GOTO HeadSearchL1 ; } until (BitCtr==#0)
GOTO BigLoop1 ; goto BigLoop1
HeadFound
CheckSame
end
FIGURE 2-1: BLOCK DIAGRAM OF TYPICAL RFID READER FOR PSK SIGNAL (125 kHz)
Transmitting Section
To Host Computer
PSK 1
PP PP Change on Data
PP
P PP PSK 2
Change on ‘1’
P PP
PIC16C84
; ///////////////////////////////////////////////////////////////////////////
; Revision history
; ///////////////////////////////////////////////////////////////////////////
;
; Ver Date Comment
;
; 0.01 29 Dec 97 Copied from MChip\Reader\PSK
; 0.03 28 Jan 98 TRANSMIT TAB (h’09’) REGULARLY
; 20 Aug 98 Modified to correct PSK comments
;
; Tbit=32Tcy=256Ti
; Ttag=128Tbit
; Header=h’802A’
;
;
processor pic16c84
#include “p16c84.inc”
__config b’11111111101001’
; Code Protect on, power-up timer on, WDT off, XT oscillator
BO3 = h’0C’
DelayReg = h’0C’
BitCtr = h’0D’
BeepCtrHi = h’0D’
TxByte = h’0E’
BeepCtrLo = h’0E’
Buffer0 = h’10’ ; --- IMMOBILE --- IMMOBILE --- IMMOBILE --- IMMOBILE
SKIP macro
BTFSC PCLATH,7
endm
RESET_A
CLRWDT
; Initialise registers
CLRF STATUS ; | Access register page 0
CLRF FSR ; | FSR=#0
MOVLW StartPORTA ; | Initialise PORT and TRIS registers
MOVWF PORTA ; | |
MOVLW StartPORTB ; | |
MOVWF PORTB ; | |
BSF _RP0 ;^| |
MOVLW StartTRISA ;^| |
BigLoop1
BSF _LED1 ; LEDs “reading”
CALL Delay07 ; |
BCF _LED2 ; |
MOVLW h’09’ ; Transmit TAB regularly
CALL RS232TxW ; |
MOVLW d’128’ ; set BitCtr
MOVWF BitCtr ; |
GetEdge ; Get an edge on _DATA_IN
BTFSC _DATA_IN ; |
GOTO PreSync_H ; |
NOP ; |
PreSync_L ; |
BTFSC _DATA_IN ; |
GOTO PreSync_H ; |
BTFSC _DATA_IN ; |
GOTO PreSync_H ; |
DoSync_L ; |
CLRWDT ; |
BTFSS _DATA_IN ; |
GOTO DoSync_L ; |
BTFSS _DATA_IN ; |
GOTO DoSync_L ; |
GOTO 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 ; |% 6 to (+4) from edge, say 8 from edge
;% -120Ti from sample
NOP
MOVLW d’38’
MOVWF DelayReg
;% -117Ti from sample
HeadSearch
MOVLW d’128’ ; set BitCtr
MOVWF BitCtr ; |
HeadSearchL1 ; {
MOVLW h’80’ ; if (header found)
XORWF BufferF,W ; |
BTFSS _ZERO ; |
GOTO NotHead0 ; |
MOVLW h’2A’ ; |
XORWF BufferE,W ; |
BTFSS _ZERO ; |
GOTO NotHead0 ; {
GOTO HeadPolarity0 ; goto HeadPolarity0
NotHead0 ; }
MOVLW h’7F’ ; if (inverse header found)
XORWF BufferF,W ; |
BTFSS _ZERO ; |
GOTO NotHead1 ; |
MOVLW h’D5’ ; |
XORWF BufferE,W ; |
BTFSS _ZERO ; |
GOTO NotHead1 ; {
GOTO HeadPolarity1 ; goto HeadPolarity1
NotHead1 ; }
RLF Buffer0,f ; ROL Buffer
RLF Buffer1,f ; |
RLF Buffer2,f ; |
RLF Buffer3,f ; |
HeadPolarity1
COMF Buffer0,f
COMF Buffer1,f
COMF Buffer2,f
COMF Buffer3,f
COMF Buffer4,f
COMF Buffer5,f
COMF Buffer6,f
COMF Buffer7,f
COMF Buffer8,f
COMF Buffer9,f
COMF BufferA,f
COMF BufferB,f
COMF BufferC,f
COMF BufferD,f
COMF BufferE,f
COMF BufferF,f
HeadPolarity0
HeadFound
CheckSame
MOVF Buffer0,W
XORWF Old0,W
BTFSS _ZERO
GOTO NotSame
MOVF Buffer1,W
XORWF Old1,W
BTFSS _ZERO
GOTO NotSame
MOVF Buffer2,W
XORWF Old2,W
BTFSS _ZERO
GOTO NotSame
MOVF Buffer3,W
XORWF Old3,W
BTFSS _ZERO
GOTO NotSame
MOVF Buffer4,W
XORWF Old4,W
BTFSS _ZERO
GOTO NotSame
MOVF Buffer5,W
XORWF Old5,W
BTFSS _ZERO
GOTO NotSame
MOVF Buffer6,W
XORWF Old6,W
end
FIGURE 2-1: BLOCK DIAGRAM OF TYPICAL RFID READER FOR ASK SIGNAL (125 kHz)
Transmitting Section
Microcontroller
Data Decoding Filter, Amplifier,
Interface with and Pulse Shaping Envelope Detector
CLK Host Computer
To Host Computer
; ///////////////////////////////////////////////////////////////////////////
; Revision history
; ///////////////////////////////////////////////////////////////////////////
;
; Ver Date Comment
;
; 0.01 01 Jul 98 Copied from MCHIP\READER\FSK
; 0.02 29 Jul 98 MICROCHIP TAG HAS 128 BITS
;
; Tbit=64Tcy=512Ti
; Manchester encoded
; Microchip - Header=h’802A’ Ttag=128Tbit
; - OR -
; EM ASK - Header=b’111111111’ trailer=b’0’ Ttag=64Tbit
;
processor pic16c84
#include “p16c84.inc”
__config b’11111111101001’
; Code Protect on, power-up timer on, WDT off, XT oscillator
BO3 = h’0C’
DelayReg1 = h’0C’
Mask = h’0C’
BitCtr = h’0D’
BeepCtrHi = h’0D’
TxByte = h’0E’
BeepCtrLo = h’0E’
ParityReg1 = h’0E’
Buffer0 = h’10’ ; --- IMMOBILE --- IMMOBILE --- IMMOBILE --- IMMOBILE
Buffer1 = h’11’ ; |
Buffer2 = h’12’ ; |
Buffer3 = h’13’ ; |
Buffer4 = h’14’ ; |
Buffer5 = h’15’ ; |
Buffer6 = h’16’ ; |
Buffer7 = h’17’ ; |
Buffer8 = h’18’ ; |
Buffer9 = h’19’ ; |
BufferA = h’1A’ ; |
BufferB = h’1B’ ; |
BufferC = h’1C’ ; |
BufferD = h’1D’ ; |
BufferE = h’1E’ ; |
BufferF = h’1F’ ; |
Old0 = h’20’ ; |
Old1 = h’21’ ; |
Old2 = h’22’ ; |
Old3 = h’23’ ; |
Old4 = h’24’ ; |
Old5 = h’25’ ; |
Old6 = h’26’ ; |
Old7 = h’27’ ; |
Old8 = h’28’ ; |
Old9 = h’29’ ; |
OldA = h’2A’ ; |
OldB = h’2B’ ; |
OldC = h’2C’ ; |
OldD = h’2D’ ; |
OldE = h’2E’ ; |
OldF = h’2F’ ; |
SKIP macro
BTFSC PCLATH,7
endm
RESET_A:
CLRWDT
; Initialise registers
CLRF STATUS ; | Access register page 0
CLRF FSR ; | FSR=#0
MOVLW StartPORTA ; | Initialise PORT and TRIS registers
MOVWF PORTA ; | |
MOVLW StartPORTB ; | |
MOVWF PORTB ; | |
BSF bit_RP0 ;^| |
MOVLW StartTRISA ;^| |
MOVWF TRISA ;^| |
MOVLW StartTRISB ;^| |
MOVWF TRISB ;^| |
MOVLW StartOPTION ;^| Initialise OPTION register
MOVWF OPTION_REG ;^| |
BCF bit_RP0 ; | |
CLRF Old0 ; | Clear Old buffer
CLRF Old1 ; | |
CLRF Old2 ; | |
CLRF Old3 ; | |
CLRF Old4 ; | |
CLRF Old5 ; | |
CLRF Old6 ; | |
CLRF Old7 ; | |
BigLoop1:
BSF _LED1 ; LEDs “reading”
CALL Delay07 ; |
BCF _LED2 ; |
MOVLW h’09’ ; Transmit TAB regularly
CALL RS232TxW ; |
MOVLW d’128’ ; set BitCtr
MOVWF BitCtr ; |
HeadSearch1:
MOVLW d’128’ ; set BitCtr
MOVWF BitCtr ; |
HeadSearch1L1: ; {
MOVF BufferF,W ; if (header found)
XORLW h’80’ ; |
BTFSS bit_ZERO ; |
GOTO NotHead1A ; |
MOVF BufferE,W ; |
XORLW h’2A’ ; |
BTFSS bit_ZERO ; |
GOTO NotHead1A ; {
GOTO HeadFound0 ; goto HeadFound0
NotHead1A: ; }
MOVF BufferF,W ; if (inverse header found)
XORLW h’7F’ ; |
BTFSS bit_ZERO ; |
GOTO NotHead1B ; |
MOVF BufferE,W ; |
XORLW h’D5’ ; |
BTFSS bit_ZERO ; |
GOTO NotHead1B ; {
GOTO HeadFound1 ; goto HeadFound1
NotHead1B: ; }
RLF Buffer0,f ; ROL Buffer
RLF Buffer1,f ; |
RLF Buffer2,f ; |
RLF Buffer3,f ; |
RLF Buffer4,f ; |
RLF Buffer5,f ; |
RLF Buffer6,f ; |
RLF Buffer7,f ; |
RLF Buffer8,f ; |
RLF Buffer9,f ; |
RLF BufferA,f ; |
RLF BufferB,f ; |
RLF BufferC,f ; |
RLF BufferD,f ; |
RLF BufferE,f ; |
RLF BufferF,f ; |
BCF Buffer0,0 ; |
BTFSC bit_CARRY ; |
BSF Buffer0,0 ; |
DECFSZ BitCtr,f ; DEC BitCtr
GOTO HeadSearch1L1 ; } until (BitCtr==#0)
HeadSearch2:
MOVLW d’64’ ; set BitCtr
MOVWF BitCtr ; |
HeadSearch2L1: ; {
MOVF BufferF,W ; if (header found)
XORLW h’FF’ ; |
BTFSS bit_ZERO ; |
GOTO NotHead2A ; |
BTFSS BufferE,7 ; |
GOTO NotHead2A ; |
BTFSC Buffer8,0 ; |
GOTO NotHead2A ; {
GOTO HeadFound2 ; goto HeadFound2
NotHead2A: ; }
RLF Buffer0,f ; ROL Buffer
RLF Buffer1,f ; |
RLF Buffer2,f ; |
RLF Buffer3,f ; |
RLF Buffer4,f ; |
RLF Buffer5,f ; |
RLF Buffer6,f ; |
RLF Buffer7,f ; |
RLF Buffer8,f ; |
RLF Buffer9,f ; |
RLF BufferA,f ; |
RLF BufferB,f ; |
RLF BufferC,f ; |
RLF BufferD,f ; |
RLF BufferE,f ; |
RLF BufferF,f ; |
BCF Buffer0,0 ; |
BTFSC bit_CARRY ; |
BSF Buffer0,0 ; |
DECFSZ BitCtr,f ; DEC BitCtr
GOTO HeadSearch2L1 ; } until (BitCtr==#0)
HeadSearch3:
MOVLW d’64’ ; set BitCtr
MOVWF BitCtr ; |
HeadSearch3L1: ; {
MOVF BufferF,W ; if (header found)
XORLW h’00’ ; |
BTFSS bit_ZERO ; |
GOTO NotHead3A ; |
BTFSC BufferE,7 ; |
GOTO NotHead3A ; |
BTFSS Buffer8,0 ; |
GOTO NotHead3A ; {
GOTO HeadFound3 ; goto HeadFound3
NotHead3A: ; }
RLF Buffer0,f ; ROL Buffer
RLF Buffer1,f ; |
RLF Buffer2,f ; |
RLF Buffer3,f ; |
RLF Buffer4,f ; |
RLF Buffer5,f ; |
RLF Buffer6,f ; |
RLF Buffer7,f ; |
RLF Buffer8,f ; |
RLF Buffer9,f ; |
RLF BufferA,f ; |
RLF BufferB,f ; |
RLF BufferC,f ; |
RLF BufferD,f ; |
RLF BufferE,f ; |
RLF BufferF,f ; |
BCF Buffer0,0 ; |
BTFSC bit_CARRY ; |
BSF Buffer0,0 ; |
DECFSZ BitCtr,f ; DEC BitCtr
GOTO HeadSearch3L1 ; } until (BitCtr==#0)
HeadFound3:
COMF BufferF,f
COMF BufferE,f
COMF BufferD,f
COMF BufferC,f
COMF BufferB,f
COMF BufferA,f
COMF Buffer9,f
COMF Buffer8,f
COMF Buffer7,f
COMF Buffer6,f
COMF Buffer5,f
COMF Buffer4,f
COMF Buffer3,f
COMF Buffer2,f
COMF Buffer1,f
COMF Buffer0,f
CALL ParityCheck
BTFSC bit_CARRY
GOTO BigLoop1
GOTO CheckSame
HeadFound2:
CALL ParityCheck
BTFSC bit_CARRY
GOTO HeadSearch3
GOTO CheckSame
HeadFound1:
COMF BufferF,f
COMF BufferE,f
COMF BufferD,f
COMF BufferC,f
COMF BufferB,f
COMF BufferA,f
COMF Buffer9,f
COMF Buffer8,f
COMF Buffer7,f
COMF Buffer6,f
COMF Buffer5,f
COMF Buffer4,f
COMF Buffer3,f
COMF Buffer2,f
COMF Buffer1,f
COMF Buffer0,f
HeadFound0:
Same:
MOVF OldF,W
MOVWF BufferF
MOVF OldE,W
MOVWF BufferE
MOVF OldD,W
MOVWF BufferD
MOVF OldC,W
NotSame: ; Old=Data
MOVF Buffer0,W ; |
MOVWF Old0 ; |
MOVF Buffer1,W ; |
MOVWF Old1 ; |
MOVF Buffer2,W ; |
MOVWF Old2 ; |
MOVF Buffer3,W ; |
MOVWF Old3 ; |
MOVF Buffer4,W ; |
MOVWF Old4 ; |
MOVF Buffer5,W ; |
MOVWF Old5 ; |
MOVF Buffer6,W ; |
MOVWF Old6 ; |
MOVF Buffer7,W ; |
MOVWF Old7 ; |
MOVF Buffer8,W ; |
MOVWF Old8 ; |
MOVF Buffer9,W ; |
MOVWF Old9 ; |
MOVF BufferA,W ; |
MOVWF OldA ; |
MOVF BufferB,W ; |
MOVWF OldB ; |
MOVF BufferC,W ; |
MOVWF OldC ; |
MOVF BufferD,W ; |
MOVWF OldD ; |
MOVF BufferE,W ; |
MOVWF OldE ; |
MOVF BufferF,W ; |
MOVWF OldF ; |
GOTO BigLoop1 ; goto BigLoop1
end
FIGURE 1-1: BLOCK DIAGRAM OF TYPICAL RFID READER FOR FSK SIGNAL (125 kHz)
Transmitting Section
Data
Pulse Waveform Shaping Filter/Amplifier
No No
Modulation
Present?
Read
Yes tag data
Gap Carrier
60 µSec
No Verify Header
and Data?
Yes
Wait 5 bit times
Gap Carrier
1st half bit 1
Gap Carrier
60 µSec
No
Modulation Yes
Present?
U1 *
1 3
VI VO
G
+5V C1
LM78L12ACZA SP1
P1 2 12V 2 U2:A U2:B IRF9520
U3 22 Y1 1 5 ICL7667
1 3 3 4
VI VO
DS51167B-page 102
+9-15V G 6 1 8
NC NC
* Only stuff this part for
22
C2
4.00 MHz Q1 1N4936
2 7
2 5V
use with a 15V supply. U5:A IN1 OUT1
C4
C3
R1
D1
330
U2:C 3 6
6 1 VSS VDD
+5V SET Q 8
R2 5
10uF,16V
D 10 4 5
470uF,16V
3 2 IN2 OUT2
CLK Q 9 Q2
1M 4
RESET
R7
4 15 7
1.8K
MCLR CKOUT QD R6
5 13 8 R8
gnd QE Q SET
5 14 4 9
VSS VDD QF D
RS-232
+5V 6 12 11
QG Q CLK
6 13 14 1 1 10
RB0 RB7 QH 2 1 RESET
R9
7 12 13
33K
D3
2 5
QM +
74HC4060
1N4148
3 U2:D 1N4148
R10
33K
R14
D6
R13 AGRN
100K
820
R15
1N4148
C10
LED1
.47uF
D7 R20
U9:A R18 820 R19
6 1
R21
SET Q
5
D 33K
3 2 9 - U8:C 13 -
CLK Q U8:D
4
+5V RESET
8 14
4013 R22 10 12
+ +
MC34084 MC34084
1.82K,1%
1000pF,5% 1000pF,5%
R23 C27
470uF, 16V
820
C18
R24
0.1uF
R25
6.8K
C21 47.5K,1% 1N4936 162uHy
R26
C19
microID™ 125 kHz Design Guide
C20
10K 1%
R28 R29 R27
1000pF,5%
D8 L1
C23
10uf,16V
1000pF,5%
R30
15K 82.5K,1%
C22
220,5%
R31
0.01uF,630V
1M,5%
U10:A
D9
4 - 6 U10:C - 9 U10:D - 13 - 2
1000pF,5%
1N4936
7 8 14 1
C24
5 10 12 3
U10:B + + + MC34084 +
11
U9:B 1000pF,200V,5%
13 8
Q SET
R32
R33
R34
R35
C26
9
390K
10K,5%
10K,1%
10K,1%
12 11
Q CLK 1000pF,5%
10
RESET
4013 C25
.0022uF,200V,10%
; ///////////////////////////////////////////////////////////////////////////
; Revision history
; ///////////////////////////////////////////////////////////////////////////
;
; Ver Date Comment
;
; 0.01 29 Dec 97 Copied from MChip\Reader\FSK
; 0.02 27 Feb 98 Gap during first half of first bit
; 0.05 28 Apr 98 Change from PIC16C84 to PIC16F84
; 0.06 29 Apr 98 Count to 256 instead of to 512
; 0.07 30 Apr 98 Make PORTB.0 low output (previously demodulated data input)
; 0.07a 08 May 98 Make gaps 80us wide
; 0.08 13 Aug 98 TAKE OUT CODE INTENDED FOR LAB USE ONLY
;
; Tbit=50Tcy=400Ti
; Ttag=96Tbit
; Header=h’802A’
;
processor pic16f84
#include “p16f84.inc”
__config b’00000000000001’
; Code Protect on, power-up timer on, WDT off, XT oscillator
StartOPTION = b’10001111’
; PORTB pullups disabled, TMR0 internal, prescaler off, WDT/256
Buffer00 = h’18’ ; --- IMMOBILE --- IMMOBILE --- IMMOBILE --- IMMOBILE
Buffer01 = h’19’ ; |
Buffer02 = h’1A’ ; |
Buffer03 = h’1B’ ; |
Buffer04 = h’1C’ ; |
Buffer05 = h’1D’ ; |
Buffer06 = h’1E’ ; |
Buffer07 = h’1F’ ; |
Buffer08 = h’20’ ; |
Buffer09 = h’21’ ; |
Buffer0A = h’22’ ; |
Buffer0B = h’23’ ; |
Buffer0C = h’24’ ; |
Buffer0D = h’25’ ; |
Buffer0E = h’26’ ; |
Buffer0F = h’27’ ; |
Buffer10 = h’28’ ; |
Buffer11 = h’29’ ; |
Buffer12 = h’2A’ ; |
Buffer13 = h’2B’ ; |
Buffer14 = h’2C’ ; |
Buffer15 = h’2D’ ; |
Buffer16 = h’2E’ ; |
Buffer17 = h’2F’ ; |
SKIP macro
BTFSC PCLATH,7
endm
Coil_On macro
BCF _COIL_PWR
endm
Coil_Off macro
BSF _COIL_PWR
endm
RESET_A:
CLRWDT
; Initialise registers
CLRF STATUS ; | Access register page 0
CLRF FSR ; | FSR=#0
MOVLW StartPORTA ; | Initialise PORT and TRIS registers
MOVWF PORTA ; | |
MOVLW StartPORTB ; | |
MOVWF PORTB ; | |
BSF _RP0 ;^| |
MOVLW StartTRISA ;^| |
MOVWF TRISA ;^| |
MOVLW StartTRISB ;^| |
MOVWF TRISB ;^| |
BCF _RP0 ; | Initialise OPTION register
MOVLW StartOPTION ; | |
CLRF TMR0 ; | |
BSF _RP0 ;^| |
MOVWF OPTION_REG ;^| |
BCF _RP0 ; | |
BigLoop1:
CALL Delay08 ; LEDs “reading”
BSF _LED1 ; |
CALL Delay08 ; |
BCF _LED2 ; |
CALL Delay08 ; |
Coil_Off ; Turn coil off
BSF _PAGE0
GOTO ResetDelay
ResetDelayDone:
;(Ttag=38400Ti)
; If it’s the first gap since reset, delay Ttag
BTFSC _FirstTime
Gap2: ; !!!!! goto here for valid FSK but invalid code
INCFSZ GapCountLo,f ; INC GapCount
SKIP ; |
INCF GapCountHi,f ; |
BTFSC GapCountHi,0 ; } until (GapCount>#257)
BTFSS GapCountLo,1 ; |
GOTO GapLoop ; |
GOTO BigLoop1
org h’0200’
P1Delay20:
GOTO P1Delay18
P1Delay18:
NOP
BigDelay:
;!!!!! delay (1568-6)Ti = 1562Ti
BCF _PAGE0
GOTO BigDelayDone
ResetDelay:
CALL RS232CR ; Transmit CR regularly
end
FIGURE 2-1:
Contactless Programming Protocol
f = 125 kHz
t = 8 µs
22 ± 3 VPP 33 ± 1VPP
128 bits x 128 cycles/bit x 8 µs/cycle = 131.1 ms
22 ± 3 VPP (R5) (R7)
(R5) 0V 22 ± 3 VPP
128 bits
Start
Check Cable Connection and COM Port
Programmer
No Error Message:
power-up and
connection ok? “Programmer Time-out”
Yes
Adjust the Programming Power-up Adjust Programming Signal Level
Signal Level (R5) or try a new tag. (R5 and R7)
Click “Blank Check” Button in RFLAB
Yes
Type in Programming
Data in RFLAB
Yes
Stop
STEP2 Programmer
VERIFY BLANK PC Send replies with ‘Y’
‘T’ to the if the device
programmer is OK and ‘N’ if
there is an error
STEP3
PASS 16 BYTES
OF DATA
PC Send Programmer replies
F ‘F’ to prog. with ‘F’
Byte 1
PC Send Programmer replies
1 ‘1’ to prog. with ‘1’
PC Send Programmer replies
E ‘E’ to prog. with ‘E’
Byte 2
PC Send Programmer replies
2 ‘2’ to prog. with ‘2’
STEP4
PROGRAM/VERIFY
Programmer
replies with ‘y’
PC Send ‘V’ to the
if the device
programmer to initiate
programs OK and
a program/verify sequence ‘n’ if there is an
(ID internal program/verify) error
Hex 0 1 2 3 4 5 6 7
0 NUL DLE Space 0 @ P ‘ p
1 SOH DC1 ! 1 A Q a q
2 STX DC2 " 2 B R b r
3 ETX DC3 # 3 C S c s
Least Significant Characters
4 EOT DC4 $ 4 D T d t
5 ENQ NAK % 5 E U e u
6 ACK SYN & 6 F V f v
7 Bell ETB ’ 7 G W g w
8 BS CAN ( 8 H X h x
9 HT EM ) 9 I Y i y
A LF SUB * : J Z j z
B VT ESC + ; K [ k {
C FF FS , < L \ l |
D CR GS - = M ] m }
E SO RS . > N ^ n ~
F SI US / ? O _ o DEL
; ///////////////////////////////////////////////////////////////////////////
; Revision history
; ///////////////////////////////////////////////////////////////////////////
;
; Ver Date Comment
;
; 1.00 10/24/97 Shannon/Hugh first pass
; 1.04 13 Feb 98 ADDED TIMEOUT TO TESTMOD
;
LISTP=PIC16C73A
INCLUDE “P16C73A.INC”
__config b’11111111110010’
; Code Protect off, Brown-out detect on, Power-up timer on, WDT off,
; HS oscillator
SKIP macro
BTFSC PORTA,7
endm
org h’000’
CLRF STATUS
CLRF PCLATH
CLRF INTCON
GOTO RESET_A
org h’004’
CLRF STATUS
CLRF PCLATH
GOTO RESET_A
RESET_A
CLRWDT ; Initialise registers, clear watchdog timer
CLRF STATUS ; | Access register page 0
CLRF FSR ; | FSR=#0
MOVLW StartPORTA ; | Initialise PORT registers
MOVWF PORTA ; | |
MOVLW StartPORTB ; | |
MOVWF PORTB ; | |
CLRF INTCON ; | Interrupts off
MOVLW b’110001’ ; | TMR1 prescale *8, on
MOVWF T1CON ; | |
MOVLW b’0000000’ ; | TMR2 postscale *1, off, prescale *1
CALL RS232On
BigLoop1
CALL RS232WaitForever
CheckRxByte
MOVF RxByte,W
XORLW ‘W’
BTFSC _ZERO
GOTO INTERRUPT
CALL RS232On
MOVLW ‘Q’
CALL RS232TxW
GOTO BigLoop1
INTERRUPT
CALL Delay07 ; LED1 on, LED2 on (orange/yellow)
BSF _LED1 ; |
CALL Delay07 ; |
BSF _LED2 ; |
CALL Delay07 ; |
INT_WAKEUP
MOVLW ‘R’
MOVWF RxByte
CALL RS232On ; delay
MOVF RxByte,W ; Transmit RxByte
CALL RS232TxW ; |
CALL RS232Rx ; Read byte from RS-232
BTFSC _CARRY ; | (if timeout, goto INT_END)
GOTO INT_END ; |
MOVF RxByte,W ; if (RxByte<>#’T’)
XORLW ‘T’ ; |
BTFSS _ZERO ; |
GOTO CheckRxByte ; { goto CheckRxByte }
MOVLW d’10’
BCF PORTB,3
CALL DELAY
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 _TMR2ON
CALL TWC
CLRF DATA0
CLRF DATA1
CLRF DATA2
CLRF DATA3
CLRF DATA4
CLRF DATA5
CLRF DATA6
CLRF DATA7
CLRF DATA8
CLRF DATA9
CLRF DATAA
CLRF DATAB
CLRF DATAC
CLRF DATAD
CLRF DATAE
CLRF DATAF
; ********
BCF PORTB,3
CALL DELAY
MOVLW 0x60
MOVWF COUNT1
BIGDLY CALL TWC ; CALL A DELAY TO ALLOW THE AMP TO SETTLE
DECFSZ COUNT1,f
GOTO BIGDLY
;***************************************
VERIFY
CALL TESTMOD ; Wait for modulation to stop
;% 167Ti of constant _RAW_DATA
VerifyL1 ; {
;% reftime-1345
CLRF CycleCtr?L
;% reftime-1344
;% reftime-3-10*6-183*7
MOVLW d’10’ ; set NoiseTimeout
MOVWF NoiseTimeout ; |
;% reftime-1-10*6-183*7
;% reftime-1-NTO*6-183*7
MOVLW d’183’ ; set SampTimeout to 80Tcy
MOVWF SampTimeout ; |
;% reftime+1-NTO*6-183*7
;% reftime+1-NTO*6-STO*7
BTFSC _RAW_DATA
GOTO VerS1
NOP
VerS0
;% reftime+4-NTO*6-STO*7
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
DECFSZ SampTimeout,f
SKIP
GOTO SampleDone
BTFSC _RAW_DATA
GOTO VerGot1
NOP
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
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 DATAF,7
GOTO Verify1
NOP
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-d’18’)
BTFSS _CARRY
GOTO INT_Failure
ADDLW low(d’18’-d’22’)
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-d’14’)
BTFSS _CARRY
GOTO INT_Failure
ADDLW low(d’14’-d’18’)
BTFSS _CARRY
GOTO Bit_Verified
GOTO 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
;***************************************
INT_Success
CALL RS232On
MOVLW ‘y’
CALL RS232TxW
GOTO BigLoop1
VerFail
INT_Failure
CALL RS232On
MOVLW ‘n’
CALL RS232TxW
GOTO BigLoop1
INT_ErrorN
CALL RS232On
MOVLW ‘N’
CALL RS232TxW
GOTO 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
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
TestModLo
DECFSZ CycleCtr2?L,f
SKIP
DECFSZ CycleCtr2?H,f
SKIP
GOTO INT_Failure
MOVLW 0x20
MOVWF COUNT1
BTFSS _RAW_DATA
GOTO TestModHi
TestModLoLoop
BTFSS _RAW_DATA
GOTO TestModHi
DECFSZ COUNT1,1
GOTO TestModLoLoop
RETLW 0
TestModHi
MOVLW 0x20
MOVWF COUNT1
BTFSC _RAW_DATA
GOTO TestModLo
TestModHiLoop
BTFSC _RAW_DATA
GOTO TestModLo
DECFSZ COUNT1,1
GOTO TestModHiLoop
;END TEST FOR NO MODULATION
RETLW 0
Delay12
NOP
end
• The PICmicro family meets the specifications contained in the Microchip Data Sheet.
• Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today,
when used in the intended manner and under normal conditions.
• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowl-
edge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet.
The person doing so may be engaged in theft of intellectual property.
• Microchip is willing to work with the customer who is concerned about the integrity of their code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable”.
• Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of
our product.
If you have any further questions about this matter, please contact the local sales office nearest to you.
01/18/02