Part Number Hot Search : 
B1584 DSAI35 2SK962 ICS252PM VLZ10A HZ6LA3 2SK962 AN321
Product Description
Full Text Search
 

To Download DRM005 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  www.motorola.com/semiconductors m68hc08 microcontrollers DRM005/d 5/2002 remote keyless designer reference manual entry (rke) reference design using the mc68hc908rf2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola 3 remote keyless entry (rke) reference design using the mc68hc908rf2 by: andrea martini essepie s.r.l. ? studio di progettazione via artigianato,5 24044 dalmine (bg) ? italy email: essepie@wavenet.it web: http://www.elektronikladen.de/en motorola and the stylized m logo are registered trademarks of motorola, inc. digitaldna is a trademark of motorola, inc. ? motorola, inc., 2002  f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 4 motorola revision history to provide the most up-to-date information, the revision of our documents on the world wide web will be the most current. your printed copy may be an earlier revision. to verify you have the latest information available, refer to: http://www.motorola.com/semiconductors the following revision history table summarizes changes contained in this document. for your convenience, the page number designators have been linked to the appropriate location. revision history date revision level description page number(s) may, 2002 n/a initial release n/a f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola list of sections 5 designer reference manual ? remote keyless entry list of sections section 1. general description . . . . . . . . . . . . . . . . . . . . 11 section 2. motorola rf components . . . . . . . . . . . . . . . 17 section 3. reference board hardware . . . . . . . . . . . . . . 21 section 4. hc908rf2 for windows installation . . . . . . . 33 section 5. remote programming commands . . . . . . . . 43 appendix a. source code . . . . . . . . . . . . . . . . . . . . . . . . 59 appendix b. schematics . . . . . . . . . . . . . . . . . . . . . . . . 135 appendix c. board layouts . . . . . . . . . . . . . . . . . . . . . . 139 appendix d. bill of materials . . . . . . . . . . . . . . . . . . . . . 147 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 6 list of sections motorola list of sections f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola table of contents 7 designer reference manual ? remote keyless entry table of contents section 1. general description 1.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 1.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 1.3 reference board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 1.4 reference goals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 section 2. motorola rf components 2.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 2.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 2.3 mc68hc908rf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 2.4 mc33592/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 2.5 mc33491 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 section 3. reference board hardware 3.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 3.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 3.3 mother board description . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 3.4 remote description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 3.5 receiver board description . . . . . . . . . . . . . . . . . . . . . . . . . . .24 3.6 transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 3.7 mother board display menu . . . . . . . . . . . . . . . . . . . . . . . . . . .30 section 4. hc908rf2 for windows installation 4.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 4.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 4.3 installation screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 8 table of contents motorola table of contents section 5. remote programming commands 5.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 5.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 5.3 communication protocol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 5.4 command set parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 5.4.1 erase programming algorithm memory (epg) . . . . . . . . . .45 5.4.2 erase tx s19 memory (etx). . . . . . . . . . . . . . . . . . . . . . . .46 5.4.3 erase user code memory (eum) . . . . . . . . . . . . . . . . . . . .47 5.4.4 initialize mc33592/3 registers (irr) . . . . . . . . . . . . . . . . . .48 5.4.5 load programming algorithm (lpg) . . . . . . . . . . . . . . . . . .49 5.4.6 load tx s19 file (ltx) . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 5.4.7 product id (pid) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 5.4.8 read mc33592/3 registers (rrr) . . . . . . . . . . . . . . . . . . .54 5.4.9 update user code (uuc) . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.4.10 mc33592/3 registers (wrr). . . . . . . . . . . . . . . . . . . . . . . .57 appendix a. source code a.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 a.2 mother board firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 a.2.1 uk509.asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 a.2.2 uk509 prm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124 a.3 transmitter firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 appendix b. schematics appendix c. board layouts appendix d. bill of materials d.1 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 d.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 d.3 transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148 d.4 receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 d.5 mother board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola list of figures and tables 9 designer reference manual ? remote keyless entry list of figures and tables figure title page 1-1 transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 1-2 receiver board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 1-3 mother board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 2-1 mc33492 pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . . .20 2-2 14-lead tssop pictorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 3-1 mother board block diagram . . . . . . . . . . . . . . . . . . . . . . . . . .23 3-2 remote block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 3-3 receiver board block diagram. . . . . . . . . . . . . . . . . . . . . . . . .25 3-4 receiver board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 3-5 receiver board schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 3-6 transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 3-7 transmitter schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 3-8 mother board display menu . . . . . . . . . . . . . . . . . . . . . . . . . . .31 4-1 startup screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 4-2 welcome screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 4-3 license agreement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 4-4 choose destination location screen . . . . . . . . . . . . . . . . . . . .37 4-5 setup type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38 4-6 select program folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 4-7 install files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4-8 finish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 5-1 command packet format. . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 5-2 command packet format. . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 10 list of figures and tables motorola list of figures and tables figure title page b-1 mother board schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . .136 b-2 receiver schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137 b-3 transmitter schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 c-1 transmitter layout (top view) . . . . . . . . . . . . . . . . . . . . . . . .140 c-2 transmitter layout (bottom view) . . . . . . . . . . . . . . . . . . . . .141 c-3 receiver layout (top view) . . . . . . . . . . . . . . . . . . . . . . . . . .142 c-4 receiver layout (bottom view) . . . . . . . . . . . . . . . . . . . . . . .143 c-5 mother board layout (top view) . . . . . . . . . . . . . . . . . . . . . .144 c-6 mother board layout (bottom view). . . . . . . . . . . . . . . . . . . .145 table title page 2-1 mc33492 ordering information . . . . . . . . . . . . . . . . . . . . . . . 20 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola general description 11 designer reference manual ? remote keyless entry section 1. general description 1.1 contents 1.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 1.3 reference board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 1.4 reference goals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 1.2 introduction the purpose of this document is to detail the hardware and software required for a remote key entry (rke) application. for several reasons this solution can fit well even for ?wireless? applications where there is a need to send data from a remote sensor via radio frequency (rf) communication. if you look at networking connections, some years ago the only way to implement these was with hundreds of meter of wires. today we are faced with a new challenge. for clarification, some of the standards are highlighted below along with their main application. 1. 2.4-ghz standards ? the main application for this standard is business wireless local area networks (lans), where the speed of the communication is a key factor (up to 24-mbps) 2. bluetooth ?originally, bluetooth was being studied to provide a solution to point-to-point short-range links for voice applications, such as cell phones to pdas or a hands free automobile adapter kit that eliminates the need for cables and adapter sockets. even in these cases, the purpose of the standard is to provide a high-speed solution for communicating huge quantities of data. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 12 general description motorola designer reference manual 3. radio frequency (rf) ? the number of rf applications are unlimited. an example of rf use would be with gate opening applications. rf can be considered as a cost-effective solution for small to medium volume data transmission (not at high speeds). for such applications, frequency bands most used are 200 mhz, 315 mhz, 433 mhz, 868 mhz, or 900 mhz. some of the markets interested in this standard include appliances, smoke sensors, and home networking. the rf standard is the subject of this document. 1.3 reference board over the past several years, motorola has developed many rf semiconductor products including the mc68hc908rf2 microcontroller unit (mcu). this microcontroller includes the excellent performance of the hc08 family along with an integrated rf transmitter. reference board features:  mother board: connectable to a pc through an rs232 connector for setting up the receiver. the setting can be implemented stand alone using the integrated encoder and a display unit on the board.  remote transmitter: implemented using an mc68hc908rf2 mcu with integrated motorola technology for uhf transmitters. eight buttons are implemented on the transmitter.  receiver board: the mc3359x uhf is used to receive data from the transmitter. the received data can be viewed on the display unit on the mother board.  433-mhz and 868-mhz band frequency transmission implemented (the mc68hc908rf2 can transmit both of the frequencies by simply changing a pin status  simple rolling code provided  all source code and schematics provided for fast implementation of an rf application f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
general description reference goals remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola general description 13 it is important to highlight that the mc68hc908rf2 mcu can transmit at two frequency levels: 433-mhz or 868-mhz simply by changing the configuration of one pin (to be either a pullup or pulldown). for evaluation reasons, motorola has provided two separate transmitters so that users can avoid buying or disconnecting a pullup on a case-by-case basis. see figure 1-1 . figure 1-1. transmitter 1.4 reference goals the main goal of this document is to demonstrate how to use the motorola components listed in 1.3 reference board to control transmitting and receiving a rf transmission. however, it is important to acknowledge the capabilities of the mc68hc908rf2 ? s flash memory which will be demonstrated. a rolling code algorithm is provided with this material (the source code is in appendix a. source code ). this algorithm has been developed to use the embedded flash of the mc68hc908rf2 mcu instead of an eeprom memory. in the remote transmitter, eight buttons have been implemented. the pressure of one of these buttons is transformed in a rf transmitted frame and captured by the receiver. the display mounted on the mother board then shows an indication of the button pressed with the crc code f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 14 general description motorola designer reference manual transmitted (highlighting the fix code and variable code in case a rolling code transmission is chosen). due to the excellent current consumption features of the mc68hc908rf2 a ? small ? 3-volt lithium battery (i.e., cr2032) is used in the remote transmitter. in this configuration the average transmission distance is around 10 meters. however, with a simple modification to the transmitter layout (including a small transistor for amplifying and a ? bigger ? battery) a range of 100 meters can be achieved. the mother board is powered with a 9-volt dc power supply and has a encoder mounted to set up the configuration of the transmission (fixed or rolling code) and the three registers which reside inside the rf receiver. the value of these register can be viewed on the mother board ? s display. another way to change the register ? s value is through windows ? pc software which is provided on a cd rom and downloadable from the motorola web site at: www.motorola.com/semiconductors all embedded software has been written using metrowerks ? codewarrior ? suite for motorola hc08 devices. all the code is commented and provided in appendix a. source code . the receiver board is shown in figure 1-2 and the mother board in figure 1-3 . ? windows is a registered trademark of microsoft corporation in the u.s. and/or other countries. ? metrowerks and codewarrior are registered trademarks of metrowerks, inc., a wholly owned subsidiary of motorola, inc. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
general description reference goals remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola general description 15 figure 1-2. receiver board f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 16 general description motorola general description figure 1-3. mother board f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola motorola rf components 17 designer reference manual ? remote keyless entry section 2. motorola rf components 2.1 contents 2.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 2.3 mc68hc908rf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 2.4 mc33592/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 2.5 mc33491 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 2.2 introduction this section provides a general overview of the motorola rf components used in this reference. they are:  mc68hc908rf2 ? microcontroller unit (mcu)  mc33592/3 ? phase locked loop (pll) tuned ultra-high frequency (uhf) receiver  mc33491 ? pll tuned uhf transmitter 2.3 mc68hc908rf2 the mc68hc908rf2 mcu is a member of the low-cost, high-performance m68hc08 family of 8-bit microcontroller units (mcus). optimized for low-power operation and available in a small 32-pin low-profile quad flat pack (lqfp), this mcu is well suited for remote keyless entry (rke) transmitter designs. this mcu can work with a lithium battery because of the low level current consumption that can be reached. in stop mode, the mcu current consumption is almost 10 na and it is possible to wakeup the mcu with an external interrupt generated by the keyboard interrupt port. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 18 motorola rf components motorola motorola rf components features of the mc68hc908rf2 mcu include:  high-performance m68hc08 architecture, fully upward-compatible object code with m6805, m146805, and m68hc05 families.  maximum internal bus frequency of: ? 4 mhz at 3.3 volts ? 2 mhz at 1.8 volts  internal oscillator requiring no external components  software selectable bus frequencies    option allowing use of external clock source or external crystal/ceramic resonator  2 kbytes of on-chip flash memory  128 bytes of on-chip ram  16-bit, 2-channel timer interface module (tim)  12 general-purpose input/output (i/o) ports: ? six shared with the keyboard wakeup function ? two shared with the timer module  port a pins have 3-ma sink capabilities  low-voltage inhibit (lvi) module: ? 1.85-v detection forces mcu into reset ? 2.0-v detection sets indicator flag  6-bit keyboard interrupt with wakeup feature  external asynchronous interrupt pin with internal pullup (irq1)  uhf mc33491 transmitter featuring: ? switchable frequency bands: 315, 434, and 868 mhz ? on/off keying (ook) and frequency shift keying (fsk) modulation ? adjustable output power range ? fully integrated voltage-controlled oscillator (vco) ? data clock output for the mcu ? low external component count f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola rf components mc33592/3 remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola motorola rf components 19 2.4 mc33592/3 mc33592/3 is a pll tuned uhf receiver, usable in the receiver side of a data transmitter application. it is a 24-lead quad flat package (lqfp) device, completely configurable by a serial peripheral interface (spi) making it simple to interface with a mcu. the mc33592/3 provides two band frequency ranges selectable by mask option:  mc33592 supports 315/433 mhz band with an intermediate frequency (if) of 500 khz  mc33593 supports 868 mhz band the mc33592/3 supports either ook or fsk modulation. with the data manager active, the mc33592/3 is able to receive manchester codified data and communicate by spi with an external mcu (a few components are externally requested). by using mc33592/3 in sleep mode with the strobe oscillator enabled, very low power consumption can be reached (115 ma). in this condition, mc33592/3 will be periodically woken up based on resistor-capacitor (rc) values outside and strobe ration programmed from users. 2.5 mc33491 mc33491 is a pll tuned uhf transmitter in a 14-lead thin shrink small outline package (tssop). this device is characterized for low power consumption (0.5 na stand-by current) with a supply voltage range between 1.9 volts and 3.7 volts (this feature is suitable for portable applications). note: mc33491 can work at 315 mhz, 433 mhz, and 868 mhz without mask change as the frequency band is completely switchable. for the european market, 868 mhz will be a band extremely important in the future, since it has just recently become available in many countries. refer to figure 2-1 , figure 2-2 , and table 2-1 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 20 motorola rf components motorola motorola rf components figure 2-1. mc33492 pin assignments figure 2-2. 14-lead tssop pictorial table 2-1. mc33492 ordering information device ambient temperature range package mc33491 dtb ? 40 c to 125 c tssop14 dataclk 1 2 3 4 5 6 7 14 13 12 11 10 9 8 data band gnd xtal1 xtal0 rext cf8k v cc rfout gndrf v cc enable mode 0.65 mm pitch 5 mm x 4.4 mm body dtb tssop-14 dtb suffix case 948g f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola reference board hardware 21 designer reference manual ? remote keyless entry section 3. reference board hardware 3.1 contents 3.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 3.3 mother board description . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 3.4 remote description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 3.5 receiver board description . . . . . . . . . . . . . . . . . . . . . . . . . . .24 3.6 transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 3.7 mother board display menu . . . . . . . . . . . . . . . . . . . . . . . . . . .30 3.2 introduction this section describes the mc68hc908rf2 reference board hardware. the mc68hc908rf2 reference board (hereafter referred to as rf2 board) has these purposes:  demonstration of a remote controller board for the mc68hc908rf2 microcontroller (mcu)  demonstration of a receiver board for the mc3359x receiver chip the rf2 board can also program the flash memory of a mc68hc908rf2 mcu from a personal computer (pc). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 22 reference board hardware motorola reference board hardware in the development of this reference:  the software was developed using metrowerks c compiler and assembler.  printed circuit board (pcb) and schematics were developed using zuken-redac cr5000 software.  debugging was done using a mmevs08 debugger with eml08gp32 daughter board for the mc68hc908gp32 and eml08rk2 daughter board for the mc68hc908rf2. the rf2 board is composed of three parts: 1. mother board ? see 3.3 mother board description 2. remote ? see 3.4 remote description 3. receiver board ? see 3.5 receiver board description note: there is also a programming adapter board for the rf2 which is not covered by this document. 3.3 mother board description the rf2 mother board is described here:  the rf2 board is based on a mc68hc908gp32 flash mcu.  the user interface has a rotary encoder with: ? push button ? select switch ? 3-line by 12-character liquid crystal display (lcd)  a rs232 interface is provided to connect the board to the pc.  a programmable power supply generates all voltages required to program flash mcu.  an input/output (i/o) connector is provided for the receiver board. note: the receiver board has not been integrated with the mother board to allow for future upgrades as long as receiver chips are in continuous evolution. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
reference board hardware mother board description remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola reference board hardware 23  two option board connectors have been provided that can accept either a programming adapter or any other demonstration board.  an optional external high density flash memory (128 mbit) can be installed to use the rf2 board as a general-purpose flash programmer (firmware and adapters are not covered by this document). refer to figure 3-1 for a block diagram. figure 3-1. mother board block diagram programmable power supply system 128m flash (optional) rs232 display input device i/o connector mcu option board mc68hc908gp32 connector f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 24 reference board hardware motorola reference board hardware 3.4 remote description the remote is described here:  the remote is based on a mc68hc908rf2 flash mcu with an integrated ultra-high frequency (uhf) module.  the circuit has: ? an 8-key silicon rubber keyboard to evaluate the wake-up feature of the mcu ? a single cell cr2032 lithium battery  the antenna is a small loop on the pcb generally used in keyless entry systems. refer to figure 3-2 for a block diagram. figure 3-2. remote block diagram 3.5 receiver board description the receiver board is based on a mc3359x uhf receiver (x = 1 and 2 for 433.92 mhz and x = 3 for 868 mhz). this circuit allows the demonstration of the mc3359x wake-up feature and data manager. antenna 4 x 2 rubber keyboard mcu 1-cell lithium mc68hc908rf2 battery f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
reference board hardware receiver board description remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola reference board hardware 25 two connectors are provided for expandability:  one is a card edge connector so that the board can be used with the mc68hc908rf2 mother board  the other (not assembled) is a standard 2-mm pitch pth connector so that the board can be easily used with a user target. refer to figure 3-3 for a block diagram, figure 3-4 shows the receiver board, and figure 3-5 the receiver board schematic. figure 3-3. receiver board block diagram figure 3-4. receiver board antenna wake-up circuit board connector mc3359x connector f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 26 reference board hardware motorola reference board hardware figure 3-5. receiver board schematic 25 28 32 cn2 cn4 24 cn2 cn5 23 cn2 cn6 33 cn2 cn7 cn2 cn2 17 16 15 14 21 20 123 18 2319 vcc vcc1 vdcl vdc0 mikout dmdat ic2 mc33591 568919 22 12 24 7 11 10 cr1 c5 c3 c8 c11 r3 c10 c12 c4 7 cn2 cn8 gnd 500p 00g 500m xja xja 10n 6p cdg 180k b8n x7a 1u y5v 1u y6v 100 p cdg c8 4 1.4?3 pf 3 mm c19 vcc gndl gnds gnd gnd1 gnd0 cafc cagc dmixago pfd x2 x1 sclk mosi miso resetb strobe robgap 36 cn3 r5 r2 10 k 470 k 1uh cn2 rfin f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
reference board hardware receiver board description remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola reference board hardware 27 the circuit is very simple and not all components are needed in most applications.  the power supply is first filtered with l1,c10, and c12. note that c10 must be placed as near as possible to ic2.  r3 is the bandgap biasing resistor and should have an 1% tolerance.  cr1 and c11 are the reference oscillators for the phase locked loop (pll). note that it is also possible to use an external generator connected to x1 through a dc blocking capacitor. however, the amplitude of the signal should not exceed 500 mv. note: when you calculate the reference oscillator frequency you must add to the carrier center frequency the if center frequency (generally 660 khz). so, for 433.92 mhz carrier frequency: f(ref) = (433.92+0.66)/32 = 13.580625 mhz in this way, the transmitter and receiver have different reference xtal. warning: reference oscillators values must be calculated accurately since a difference of 10 khz = 0.01 mhz will force the receiver out of tune (for example, a xtal of 13.57 mhz is not usable for a carrier of 433.92 mhz).  c3 is the agc capacitor in the case of ook modulation. in case of fsk modulation, the voltage at this pin is used as reference.  c4 and r2 are the strobe oscillator external components. if a strobe oscillator is not used r2 should be the jumper that connects the strobe pin to v cc . otherwise, mc33592/3 will be in sleep mode. warning: if strobe = v cc , bit 4 of cr1 (strobe oscillator enable) must be 0.  the antenna is a very small loop antenna. while it is not the best solution in that it is not well matched with the input impedance of the lna input amplifier, for most applications it is good enough and there are no additional costs. a better solution would require a matching network (with at least one inductor) and a input saw filter which is very expensive. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 28 reference board hardware motorola reference board hardware 3.6 transmitter a programming connector is provided for in-circuit programming of the mc68hc908rf2 and for loading custom user programs. the transmitter is shown in figure 3-6 and the schematic in figure 3-7 figure 3-6. transmitter f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola reference board hardware 29 reference board hardware transmitter figure 3-7. transmitter schematic 87 cr1 2 1 bat1 c42032 sw7 sw6 sw3 sw1 sw8 sw5 sw4 sw2 ld1 tl0u1002 330 r14 10 r20 10k r18 10k r22 2 1 32 31 30 28 29 27 3 4 5 20 19 18 17 16 15 pta0 pta1/kbd1 pta2/kbd2 pta3/kbd3 pta4/kbd4 pta5/kbd5 pta6/kbd6 pta7 ptb0/mclk ptb1 ptb2/tcho ptb3/tclk dclk data band pllen mode osc1 21 1u ybv c8 r18 r16 1k 1k cne 10 10k 10 r21 r19 r23 cn5 cn4 gnd osc2 vss x0 x1 cfbk pext gndpf gnd 22 23 10 9 13 6 8p c0g c5 12k r17 10n x7r c8 8p c0g c3 22 nh l1 c8 c2 c7 3 mm 1.4 ? 3 pf 100p cob 1u y5v 12 rfout 25 26 24 14 11 irq reset vdd vccpf vcc ic1 hc908rf2rev1 vcc cn1 cn2 cn3 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 30 reference board hardware motorola reference board hardware the circuit is very simple.  the power supply is a cr2032 lithium battery connected directly to the mc68hc908rf2 (ic1). note: when the rf pll is disabled and the mcu is in sleep mode the power consumption is less then 100 na.  the keyboard (a 4 x 2 crosspoint rubber keyboard) connected to the keyboard port wakes up the mcu.  the mcu has an internal clock generator with no external components.  cr1 an c6 are the reference oscillators for the rf pll enabled by the pllen pin. when pllen = 1 the oscillator is on and a reference signal dclk = xtal/64 is available. dclk is used as a reference clock for the mcu timer to generate an accurate modulation signal. this signal is available only when pll is on. warning: the mc68hc908rf2 has two separate chips in the same case, one is the mcu and one is the rf transmitter. a buffer is needed if the mcu is to be used to drive other logic gates.  c2, c3, c8, c9, and l1 are the matching network for the small loop antenna.  r20 and r21 are used to select the band and only one of them must be assembled.  r12 is the output power setting resistor and sets the current of the rf power amplifier. 3.7 mother board display menu figure 3-8 shows the mother board display menu. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola reference board hardware 31 reference board hardware mother board display menu figure 3-8. mother board display menu rx board not found! x receive set mc3359x 434/868mhz no file in memory! programming firmware not loaded! program tx file name: no file x program tx file name: uk804 x coding type fixed esc to exit x coding type rolling esc to exit x tx id 5423f4 key sx 3 crc ec --id--kkrrrr 5423f4860084 c587b8f090fd cr1=14 cr2=a1 cr3=00 x receive set mc3359x 315mhz x rx menu tx menu power off x f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 32 reference board hardware motorola reference board hardware f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola hc908rf2 for windows installation 33 designer reference manual ? remote keyless entry section 4. hc908rf2 for windows installation 4.1 contents 4.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 4.3 installation screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 4.2 introduction this section provides the installation screens for the mc68hc908rf2 reference board. 4.3 installation screens see figure 4-1 through figure 4-8 . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 34 hc908rf2 for windows installation motorola hc908rf2 for windows installation figure 4-1. startup screen f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hc908rf2 for windows installation installation screens remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola hc908rf2 for windows installation 35 figure 4-2. welcome screen f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 36 hc908rf2 for windows installation motorola hc908rf2 for windows installation figure 4-3. license agreement f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hc908rf2 for windows installation installation screens remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola hc908rf2 for windows installation 37 figure 4-4. choose destination location screen f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 38 hc908rf2 for windows installation motorola hc908rf2 for windows installation figure 4-5. setup type f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hc908rf2 for windows installation installation screens remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola hc908rf2 for windows installation 39 figure 4-6. select program folder f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 40 hc908rf2 for windows installation motorola hc908rf2 for windows installation figure 4-7. install files f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
hc908rf2 for windows installation installation screens remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola hc908rf2 for windows installation 41 figure 4-8. finish f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 42 hc908rf2 for windows installation motorola hc908rf2 for windows installation f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola remote programming commands 43 designer reference manual ? remote keyless entry section 5. remote programming commands 5.1 contents 5.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 5.3 communication protocol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 5.4 command set parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 5.4.1 erase programming algorithm memory (epg) . . . . . . . . . .45 5.4.2 erase tx s19 memory (etx). . . . . . . . . . . . . . . . . . . . . . . .46 5.4.3 erase user code memory (eum) . . . . . . . . . . . . . . . . . . . .47 5.4.4 initialize mc33592/3 registers (irr) . . . . . . . . . . . . . . . . . .48 5.4.5 load programming algorithm (lpg) . . . . . . . . . . . . . . . . . .49 5.4.6 load tx s19 file (ltx) . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 5.4.7 product id (pid) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 5.4.8 read mc33592/3 registers (rrr) . . . . . . . . . . . . . . . . . . .54 5.4.9 update user code (uuc) . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.4.10 mc33592/3 registers (wrr). . . . . . . . . . . . . . . . . . . . . . . .57 5.2 introduction a set of commands is available to control the flashprog from the rs232 serial interface. this section will explain the format and parameters of each command. 5.3 communication protocol commands are send to flashprog using data packets. a data packet is composed of packet length, the command, parameters, data, and checksum. parameters and data fields are optional. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 44 remote programming commands motorola remote programming commands the maximum length of a packet is 64 bytes. the packet length is 1 byte, the command is an ascii mnemonic of three characters. parameters and data are of variable size and the checksum length is 1 byte. the command packet format is shown in figure 5-1 . checksum is one ? s complement of the least significant bit (lsb) of the sum from packet length (included) to the checksum (excluded). the answer from flashprog can be one of four types: ? y ? = packet correct and command executed without error ? n ? = packet error  exxx = packet correct but command ended with error xxx  a data packet the answer data package format is shown in figure 5-2 . 5.4 command set parameters this subsection provides the command set parameters available to control the flashprog from the rs232 serial interface. $1b packet length 1 byte command 3 bytes parameters n bytes data m bytes checksum 1 byte byte 0 byte 1 byte p figure 5-1. command packet format $1b packet length 1 byte data m bytes checksum 1 byte byte 0 byte 1 byte p figure 5-2. command packet format f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote programming commands command set parameters remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola remote programming commands 45 5.4.1 erase programming algorithm memory (epg) the epg command will erase the memory area from $d7ff to $d6ff. the programming algorithm for the mc68hc908rf2 is stored in this area. the epg command packet has the following composition: the answer to the epg command has the following composition: command examples: to erase the programming algorithm area the following command packet must be sent. $1b,$04,?epg?,$1f or in hex $1b,$04,$45,$50,$47,$1f the answer will be: y or in hex $59 $1b $04 epg $1f field value type length header $1b byte 1 length 4 byte 1 mnemonic epg character 3 checksum checksum byte 1 answer ascii meaning y $59 memory erased n $4e packet not valid f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 46 remote programming commands motorola remote programming commands 5.4.2 erase tx s19 memory (etx) the etx command will erase the memory area from $e700 to $efff. the s19 file for the mc68hc908rf2 is stored in this area. the etx command packet has the following composition: the answer to the etx command has the following composition: command examples: to erase the programming algorithm area the following command packet must be sent. $1b,$04, ? etx ? ,$0a or in hex $1b,$04,$45,$54,$58,$0a the answer will be: y or in hex $59 $1b $04 etx $0a field value type length header $1b byte 1 length 4 byte 1 mnemonic etx character 3 checksum checksum byte 1 answer ascii meaning y $59 memory erased n $4e packet not valid f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote programming commands command set parameters remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola remote programming commands 47 5.4.3 erase user code memory (eum) the eum command will erase the memory area from $8000 to $cfff. the user code is stored in this area. the eum command packet has the following composition: the answer to the eum command has the following composition: command examples: to erase the user code area the following command packet must be sent. $1b,$04, ? eum ? ,$14 or in hex $1b,$04,$45,$55,$4d,$14 the answer will be: y or in hex $59 $1b $04 eum $14 field value type length header $1b byte 1 length 4 byte 1 mnemonic eum character 3 checksum checksum byte 1 answer ascii meaning y $59 memory erased n $4e packet not valid f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 48 remote programming commands motorola remote programming commands 5.4.4 initialize mc33592/3 registers (irr) the irr command will load mc3359x registers cr1, cr2, and cr3 with the value stored in flash memory. the irr command packet has the following composition: the answer to the epg command has the following composition: command examples: to init the mc3359x registers with the nv memory value the following command packet must be sent. $1b,$04, ? irr ? ,$0e or in hex $1b,$04,$49,$52,$52,$0e if the command has been executed successfully and is blank the answer will be: y or in hex $59 if the receiver board is not present the answer will be: e001 or in hex $45,$30,$30,$31 $1b $04 irr $0e field value type length header $1b byte 1 length 4 byte 1 mnemonic irr character 3 checksum checksum byte 1 answer ascii meaning y $59 command executed successfully n $4e packet not valid e001 $45, $30, $30, $31 receiver board not present f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote programming commands command set parameters remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola remote programming commands 49 5.4.5 load programming algorithm (lpg) the lpg command will load the programming algorithm for the mc68hc908gp32 and will wait for data. the lpg command packet has the following composition: the answer to the lpg command has the following composition: command examples: after the answer ? y ? , the mc68hc908gp32 on the reference board is ready to receive data. the pc must send the character ? s ? and receive an ? s ? as echo. the data is sent after the ? s ? and has the following composition: data format: $1b $04 lpg $18 field value type length header $1b byte 1 length 4 byte 1 mnemonic lpg character 3 checksum checksum byte 1 answer ascii meaning y $59 read to receive data n $4e packet not valid number of packets (2 bytes) packet 1 ? .. packet n number of data bytes (1 byte) checksum (1 byte) start address data bytes (max 256) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 50 remote programming commands motorola remote programming commands packet format: at the end of each packet the reference board will send the character ? y ? . command examples: to start loading the programming algorithm area the following command packet must be sent: $1b,$04, ? lpg ? ,$18 or in hex $1b,$04,$4c,$50,$47,$18 the answer will be: y or in hex $59 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote programming commands command set parameters remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola remote programming commands 51 5.4.6 load tx s19 file (ltx) the ltx command will load the programming algorithm for the mc68hc908gp32 and will wait for data. the data will be stored in the tx s19 file area (0xe700 to 0xefff). the lpg command packet has the following composition: the answer to the ltx command has the following composition: after the answer ? y ? , the mc68hc908gp32 on the reference board is ready to receive data. the pc must send the character ? s ? and receive an ? s ? as echo. the data is sent after the ? s ? and has the following composition: data format: $1b $04 ltx $03 field value type length header $1b byte 1 length 4 byte 1 mnemonic ltx character 3 checksum checksum byte 1 answer ascii meaning y $59 ready to receive data n $4e packet not valid number of packets (2 bytes) packet 1 ? .. packet n number of data bytes (1 byte) checksum (1 byte) start address data bytes (max 256) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 52 remote programming commands motorola remote programming commands packet format: at the end of each packet the reference board will send the character ? y ? . command examples: to start loading the s19 file area the following command packet must be sent. $1b,$04, ? ltx ? ,$03 or in hex $1b,$04,$4c,$54,$58,$03 the answer will be: y or in hex $59 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote programming commands command set parameters remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola remote programming commands 53 5.4.7 product id (pid) the pid command will ask the mc68hchc908rf2 for the firmware revision. the pid command packet has the following composition: the answer to the pid command has the following composition: command examples: to get the firmware revision, the following command packet must be sent. $1b,$04, ? pid ? ,$1e or in hex $1b,$04,$50,$49,$44,$1e an example answer will be: rfb a0.0 or in hex $52,$46,$42,$20,$41,$30,$2e,$30 $1b $04 pid $1e field value type length header $1b byte 1 length 4 byte 1 mnemonic pid character 3 checksum checksum byte 1 answer ascii meaning rfb xy.z $52, $46, $42, $20, $xx, $3y, $2e, $3z n $4e packet not valid f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 54 remote programming commands motorola remote programming commands 5.4.8 read mc33592/3 registers (rrr) the rrr command will read mc3359x registers cr1, cr2, and cr3. the rrr command packet has the following composition: the answer to the rrr command has the following composition: command examples: to read the mc3359x registers, the following command packet must be sent. $1b,$04, ? rrr ? ,$05 or in hex $1b,$04,$52,$52,$52,$05 if the command has been executed successfully and cr1 = $46, cr2 = $04, cr3 = $00 the answer will be: $46,$04,$00,y or in hex $46,$04,$00,$59 if the receiver board is not present the answer will be: e001 or in hex $45,$30,$30,$31 $1b $04 rrr $05 field value type length header $1b byte 1 length 4 byte 1 mnemonic rrr character 3 checksum checksum byte 1 answer ascii meaning xyz y $xx, $yy, $zz, $59 xx = cr1, yy = cr2, zz = cr3 n $4e packet not valid e001 $45, $30, $30, $31 receiver board not present f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote programming commands command set parameters remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola remote programming commands 55 5.4.9 update user code (uuc) the uuc command will update the firmware stored in the area 0x8000 to 0xcfff. the uuc command packet has the following composition: the answer to the uuc command has the following composition: after the answer ? y ? , the mc68hc908gp32 on the reference board is ready to receive data. the pc must send the character ? s ? and receive an ? s ? as echo. the data is sent after the ? s ? and has the following composition: data format: $1b $04 uuc $0e field value type length header $1b byte 1 length 4 byte 1 mnemonic uuc character 3 checksum checksum byte 1 answer ascii meaning y $59 ready to receive data n $4e packet not valid number of packets (2 bytes) packet 1 ? .. packet n number of data bytes (1 byte) checksum (1 byte) start address data bytes (max 256) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 56 remote programming commands motorola remote programming commands packet format: at the end of each packet the reference board will send the character ? y ? . command examples: to start updating the firmware the following command packet must be sent: $1b,$04, ? uuc ? ,$0e or in hex $1b,$04,$55,$55,$43,$0e the answer will be: y or in hex $59 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote programming commands command set parameters remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola remote programming commands 57 5.4.10 mc33592/3 registers (wrr) the wrr command will write mc3359x registers cr1, cr2, and cr3 and update the init value stored in the flash memory. the wrr command packet has the following composition: the answer to the wrr command has the following composition: $1b $07 wrr cr1, cr2, cr3 (3 bytes) checksum field value type length header $1b byte 1 length $07 byte 1 mnemonic wrr character 3 parameter cr1, cr2, cr3 byte 3 checksum checksum byte 1 answer ascii meaning y $59 command executed successfully n $4e packet not valid e001 $45, $30, $30, $31 receiver board not present f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 58 remote programming commands motorola remote programming commands command examples: to set cr1 = $54, cr2 = $30, and cr3 = $00 the following command packet must be sent: $1b,$05, ? wrr ? ,$54,$30,$00,$79 or in hex $1b,$05,$53,$42,$4d,$03,$79 the answer will be: y or in hex $59 if the receiver board is not present the answer will be e001 or in hex $45,$30,$30,$31 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 59 designer reference manual ? remote keyless entry appendix a. source code a.1 contents a.2 mother board firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 a.2.1 uk509.asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 a.2.2 uk509 prm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124 a.3 transmitter firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 note: the mc33592/3 is referred to as romeo and the mc33491 is referred to as tango in the source code. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 60 source code motorola source code a.2 mother board firmware a.2.1 uk509.asm base $10 usersum equ $912d usersum1 equ $0569 usersum2 equ $13eb ;emulated equ 0 ;testagent equ 0 ;------------------------------------------------------------------------------- ; ; mc908rf2 reference board software ; ;------------------------------------------------------------------------------- ; ; source : uk509.asm ; controller : 68hc908gp32 ; clock : 9.8304 mhz ; ; version : b.00 04 ago 2001 ; ;------------------------------------------------------------------------------- ; ; #$-view:schematics-$ revision equ $0100 plugver equ 3 include "c:\metrowerks\lib\hc08c\inc\h908gp32.inc" ; #$-view:register declarations-$# ;------------------------------------------------------------------------------- ; ; port a ; ; port a is used as 8 bit data bus ; ; ; pull down : a(7) ; ddrainit equ %00000000 ; portainit equ %00000000 ; ;------------------------------------------------------------------------------- ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 61 ; port b ; ; port b bits ; ; cde : hn29f12814a command data enable ; sc : hn29f12814a serial clock ; oe : hn29f12814a output enable ; bank0 : bank0 0/1 selct ; bank1 : bank1 0/1 selct ; we : hn29f12814a write enable ; sclp : i2c bus pod scl ; sdap : i2c bus pod sda ; ; hardware changes ; ; none ; ; porta b cde equ 0 ; sc equ 1 ; oe equ 2 ; bank0 equ 3 ; bank1 equ 4 ; we equ 5 ; sclp equ 6 ; sdap equ 7 ; ddrbinit equ %11111111 ; portbinit equ %11111101 ; ;------------------------------------------------------------------------------- ; ; port c ; ; port c bits ; ;key : select switch : 0=pushed 1=not pushed ;evhh : enable mon08 vhh ;rst : mon08 reset ;hold : main power supply hold (1=hold,0=power off) ;evcc : enable mon08 vcc ;ndac : max533 dac enable (active low) ;le : switch led (0=on,1=off) ; ; hardware changes ; ; none f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 62 source code motorola source code ; porta c key equ 0 ; evhh equ 1 ; rst equ 2 ; hold equ 3 ; evcc equ 4 ; ndac equ 5 ; led equ 6 ; ddrcinit equ %01111110 ; portcinit equ %01101000 ; ;------------------------------------------------------------------------------- ; ; port d ; ; port d bits ; ;slave : spi slave pin ;podirq : mon08 irq ;mosi : spi mosi ;poddata : mon08 data ;pushbut : encoder push button (0=pushed,1=not pushed) ;encb : encoder phase b ;scl : i2c bus clock ;sda : i2c bus data ; ; hardware changes ; ; none ; ; porta d slave equ 0 ; podirq equ 1 ; mosi equ 2 ; poddata equ 3 ; pushbut equ 4 ; encb equ 5 ; scl equ 6 ; sda equ 7 ; ddrdinit equ %11000011 ; portdinit equ %11000101 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 63 flashram: section short linelen ds.b 1 ; linesum ds.b 1 ; startaddr ds.b 2 ; endaddr ds.b 2 ; bytecount ds.b 1 ; numlines ds.b 2 ; flashtop ds.b 2 ; dly30uspod equ $20 ;20us @ fbus=2.4576mhz biosram: section short rfflags ds.b 1 bufferrf ds.b 8 bitcount ds.b 1 rfcrc ds.b 1 bufptr ds.b 1 lasttim ds.w 1 cell0 ds.b 1 deltat ds.w 1 enccnt ds.b 1 encstep ds.b 1 curx ds.b 1 cury ds.b 1 max ds.b 1 min ds.b 1 curitem ds.b 1 curmenuptr ds.b 2 tmpptr ds.b 2 rs232st ds.b 1 crc232 ds.b 1 sflags ds.b 1 buffercnt ds.b 1 sourceptr ds.b 2 destptr ds.b 2 vhh ds.b 1 rs232tmo ds.b 2 dispdump1 ds.b 14 echoflags ds.b 1 lastv ds.b 1 updatetmo ds.b 1 mflags ds.b 1 cr1 ds.b 1 cr2 ds.b 1 cr3 ds.b 1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 64 source code motorola source code buffers: section buffersize equ $50 ;size of rs232 buffer rxbuffer ds.b 50 stringbuffer ds.b 18 stringbuffer1 ds.b 18 stringbuffer2 ds.b 18 flashbuffer ds.b 50 eebuf equ stringbuffer ; bit of rs232status escrec equ 1 ;esc received (receiving packet) ; bit of sflags userc equ 0 ;user commands enabled txfile equ 1 ;1=tx code present userp equ 2 ;programming code enabled ; bit of mflags cod equ 0 ;0=fixed,1=rolling modemsk equ %00000001 ; ; bit of rfflags crcp equ 0 ;flag crc pending endframe equ 1 ;flag lern ok edgrf equ 2 ;flag rf edge blankw equ 3 ;flag sync waiting loadrf equ 4 ;flag received status syncw equ 5 ;flag waiting sync lockd equ 6 ;flag rf locked rfmask equ %00000100 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 65 ;bit of cr1 he equ 0 ;0=write crx dme equ 1 ; sr0 equ 2 ; sr1 equ 3 ; soe equ 4 ; mod equ 5 ; cf equ 6 ; rw equ 7 ; cfmsk equ %01000000 ; ;------------------------------------------------------------------------------- ; ; time contants dly5us equ $04 ;5us @ fbus=2.4576mhz dly10us equ $08 ;10us @ fbus=2.4576mhz dly30us equ $28 ;30us @ fbus=2.4576mhz dly100us equ $51 ;100us @ fbus=2.4576mhz minsync equ 75 ; maxcell equ 60 ; ;------------------------------------------------------------------------------- ; ;------------------------------------------------------------------------------- ; ; blink frequency divider ; ; this value is used to set the blinking frequency of the cursor during input blinkdiv equ %00001000 ;------------------------------------------------------------------------------- usercode: section usercodesum dc.w usersum dc.w usercodeend f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 66 source code motorola source code userprog ifndef testagent jsr clr ; jmp mainmenu ; warning pshx ; pshh ; jsr clr ; pulh ; pulx ; jsr printstr1 ; jsr waitinput ; rts ; ;hex to string convesion ; ;on entry ; x,a=pointer to string ; sp-3=data ;on exit ; x,a=pointer to end of string hextostr pshx ; pulh ; tax ; lda 3,sp ; nsa ; and #$0f ; bsr setnibble ; lda 3,sp ; and #$0f ; bsr setnibble ; clr ,x ;null terminate string pshh ; txa ; pulx ; rts ; setnibble add #$30 ; cmp #$39 ;convert to ascii bls noalfa1 ; add #$07 ; noalfa1 sta ,x ; aix #$0001 ; rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 67 ;char to hex nibble ; ;on entry ; a=char ;on exit ; a=hex value chartohex sub #$30 ; cmp #$09 ; bls nibbleok ; sub #$07 ; nibbleok rts ; ;****************************************************************************** ; ; rs232 user routines ; ;****************************************************************************** ;*********************************************** ; init romeo register command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "irr" ; 04 packet checksum ($0e) ;*********************************************** cmdirr jsr chkromeo ; beq cmdirr1 ; lda #$01 ; jmp errcode ; cmdirr1 jsr initromeo ; jmp cmdok ; ;*********************************************** f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 68 source code motorola source code ; read romeo register command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "rrr" ; 04 packet checksum ($05) ;*********************************************** cmdrrr jsr chkromeo ; beq cmdrrr1 ; lda #$01 ; jmp errcode ; cmdrrr1 jsr readromeo ; lda cr1 ; jsr putrs232 ; lda cr2 ; jsr putrs232 ; lda cr3 ; jsr putrs232 ; jmp cmdok ; ;*********************************************** ; write romeo registers command ; ; buffer status; ; ; 00 packlen (packet length 07) ; 01-03 "wrr" ; 04 cr1 ; 05 cr2 ; 06 cr3 ; 07 packet checksum ($xx) ;*********************************************** cmdwrr jsr chkromeo ; beq cmdwrr1 ; lda #$01 ; jmp errcode ; cmdwrr1 lda rxbuffer+4 ; and #$7f ; sta cr1 ; lda rxbuffer+5 ; sta cr2 ; lda rxbuffer+6 ; sta cr3 ; jsr writeromeo ; jsr savenvcr ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 69 cmdok lda #?y? ; jsr putrs232 ; clr buffercnt ; clr rs232st ; rts ; ;*********************************************** ; send error code ; ; 01=no romeo module ; ;*********************************************** errcode psha ; lda #?e? ; jsr putrs232 ; pula ; jsr senddec ; clr buffercnt ; clr rs232st ; rts ; ;****************************************************************************** ; ; romeo2 driver ; ;****************************************************************************** readromeo pshh ; pshx ; psha ; mov #%00101010,spcr ;init spi as master bclr bank0,portb ;cs3 must be low bclr bank1,portb ; lda #$80 ; jsr sendromeo ; jsr getromeo ; sta cr1 ; lda #$00 ; bsr sendromeo ; bsr getromeo ; sta cr2 ; lda #$00 ; bsr sendromeo ; bsr getromeo ; sta cr3 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 70 source code motorola source code bset bank0,portb ;cs3 must be high bset bank1,portb ; pula ; pulx ; pulh ; rts ; chkromeo jsr readromeo ; lda cr2 ; psha ; lda #$aa ; sta cr2 ; bsr writeromeo ; jsr readromeo ; lda cr2 ; ldx 1,sp ; sta 1,sp ; stx cr2 ; bsr writeromeo ; pula ; cmp #$aa ; rts ; initromeo lda nvregs ; sta cr1 ; lda nvregs+1 ; sta cr2 ; lda nvregs+2 ; sta cr3 ; bsr writeromeo ; jsr readromeo ; mov #%10001010,spcr ;init spi slave bset bank0,portb ;cs2 must be low bclr bank1,portb ; rts ; romeosetid jsr readromeo ; sta cr2 ; writeromeo pshh ; pshx ; psha ; mov #%00101010,spcr ;init spi as master bclr bank0,portb ;cs3 must be low bclr bank1,portb ; lda cr1 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 71 and #$7f ;we bit low bsr sendromeo ; bsr getromeo ; lda cr2 ; bsr sendromeo ; bsr getromeo ; lda cr3 ; bsr sendromeo ; bsr getromeo ; bset bank0,portb ;cs3 must be high bset bank1,portb ; pula ; pulx ; pulh ; rts ; sendromeo brclr spte,spscr,* ;wait transmitter empty sta spdr ; rts ; getromeo brclr sprf,spscr,* ; lda spdr ; rts ; spiproc tst spscr ; lda spdr ; rti ; ;****************************************************************************** ; ; reception routines without data manager enabled ; ;****************************************************************************** initcode jsr home ; ldhx #frame1 ; brclr cod,mflags,printframe ; ldhx #frame2 ; printframe jsr printstr1 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 72 source code motorola source code initrf lda #$08 ; sta bitcount ; lda #$07 ; sta bufptr ; bset syncw,rfflags ; bset blankw,rfflags ; bclr lockd,rfflags ; bclr crcp,rfflags ; clr rfcrc ; rts ; ; check of the rf signal edges getrf brclr endframe,rfflags,noteof ;end frame ? jmp eof ; noteof lda portd ; eor rfflags ;change in rf input signal ? and #rfmask ; bne newedge ; rts ; ; calculation of deltat, update of lastrtcc, reset of offset ; and change of edge newedge ldhx t1cnth ; ; brclr edgrf,rfflags,newedge1 ;rising edge ? ; lda #$50 ; ; dbnza $ ; ; lda portd ; ; eor rfflags ;rf input changed? ; and #rfmask ; ; bne newedge1 ; ; rts ; newedge1 txa ; sub lasttim+1 ;if yes, determine deltat sta deltat+1 ; pshh ; pula ; sbc lasttim ; sta deltat ; sthx lasttim ; lda #rfmask ;change of edge eor rfflags ; sta rfflags ; brset edgrf,rfflags,riserf ;rising edge ? f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 73 ;falling edge: if don ? t wait for sync determine the bit bclr led,portc ; bset lockd,rfflags ;syncronization signal brclr syncw,rfflags,bitcalc ;sync waiting ? brset blankw,rfflags,exitrf ;yes,sync waiting ? ldhx deltat ;yes,check if sync is correct cphx #$0060 ; bhi initrf ; cphx #$0020 ; blo initrf ; bclr syncw,rfflags ;sync flag reset exitrf rts ;go out ;rising edge : cell0=deltat riserf bset led,portc ; brclr lockd,rfflags,exitrf ;locked ? brclr blankw,rfflags,riserf1 ;yes,sync waiting ? ldhx deltat ;yes,check if sync is correct cphx #$0060 ; bhi initrf ; cphx #$0020 ; blo initrf ; bclr blankw,rfflags ;sync flag reset rts ; riserf1 lda deltat ; bne exitrf ; lda deltat+1 ; sta cell0 ; rts ; ;calcola bit bitcalc clrh ; lda deltat ;yes, check if the cell is correct bne exitrf ; lda deltat+1 ; cmp #maxcell ; bhi frameerr1 ; lda cell0 ;calculation of the cell rapport sub deltat+1 ; ldx bufptr ; ror bufferrf,x ;bit insertion brclr crcp,rfflags,nocrc ;crc pending ? lda rfcrc ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 74 source code motorola source code rora ; ror rfcrc ; lda rfcrc ; eor bufferrf,x ; and #%10000000 ; bclr 7,rfcrc ; beq nocrc ; bset 7,rfcrc ; lda #%00001100 ; eor rfcrc ; sta rfcrc ; nocrc dbnz bitcount,exitrf ;next bit ;next byte lda #$08 ; sta bitcount ;yes, next byte dec bufptr ; bset crcp,rfflags ; lda bufptr ; bpl exitrf ; bset endframe,rfflags ;yes,end frame signal rts ;no, go out frameerr1 jmp frameerr ; ; end frame: initialization and enable rf signal research eof bclr led,portc ; bclr endframe,rfflags ;yes,reset end frame lda bufferrf+7 ; nsa ; sta bufferrf+7 ; lda bufferrf+7 ; rola ; rol bufferrf+7 ; lda rfcrc ;check crc cmp bufferrf+7 ; bne frameerr1 ; brclr cod,mflags,noroll ; lda #$00 ; ldx #$02 ; jsr gotoxy ; lda bufferrf+2 ; ldx bufferrf+1 ; jsr printshort ; lda bufferrf+3 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 75 jsr printhex ; lda bufferrf+4 ; jsr printhex ; lda bufferrf+5 ; jsr printhex ; lda bufferrf+7 ; jsr printhex ; noroll ldhx #bufferrf ; lda 4,x ; eor 5,x ; sta 5,x ; lda 3,x ; eor 4,x ; sta 4,x ; lda 2,x ; eor 3,x ; sta 3,x ; lda 1,x ; eor 2,x ; sta 2,x ; lda 0,x ; eor 1,x ; sta 1,x ; lda bufferrf+6 ; and #$0f ; beq norotate ; tax ; nextrotate lda bufferrf ; rola ; rol bufferrf+5 ; rol bufferrf+4 ; rol bufferrf+3 ; rol bufferrf+2 ; rol bufferrf+1 ; rol bufferrf ; dbnzx nextrotate ; norotate brclr cod,mflags,showfix ; showroll lda #$00 ; ldx #$01 ; jsr gotoxy ; lda bufferrf+2 ; ldx bufferrf+1 ; jsr printshort ; lda bufferrf+3 ; jsr printhex ; lda bufferrf+4 ; jsr printhex ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 76 source code motorola source code clra ; jsr printhex ; lda bufferrf+6 ; jsr printhex ; jmp initrf ; showfix lda #$06 ; ldx #$00 ; jsr gotoxy ; lda bufferrf+2 ; ldx bufferrf+1 ; jsr printshort ; lda bufferrf+3 ; jsr printhex ; lda #$06 ; ldx #$01 ; jsr gotoxy ; lda bufferrf+4 ; bpl keydx ; lda # ? d ? ; jsr printchar1 ; lda # ? x ? ; jsr printchar1 ; lda # ? ? ; jsr printchar1 ; bra keynum ; keydx lda # ? s ? ; jsr printchar1 ; lda # ? x ? ; jsr printchar1 ; lda # ? ? ; jsr printchar1 ; keynum lda bufferrf+4 ; and #$0f ; tax ; lda #$34 ; cbeqx #$01,key4 ; cbeqx #$06,key3 ; cbeqx #$04,key2 ; key1 deca ; key2 deca ; key3 deca ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 77 key4 jsr printchar1 ; lda #$06 ; ldx #$02 ; jsr gotoxy ; lda bufferrf+5 ; jsr printhex ; nop frameerr jmp initrf ; ;------------------------------------------------------------------------------- ; ; menu handling procedures ; ;------------------------------------------------------------------------------- ;------------------------------------------------ ; ; main menu routines ; ;------------------------------------------------ mainmenu ldhx #menu1 ; pshx ; pshh ; ldhx #$0200 ; clra ; jsr menu ; ais #$02 ; bra mainmenu ;endless loop on main menu ;------------------------------------------------ ; ; level 1 menu routines ; ;------------------------------------------------ rxmenu jsr chkromeo ; beq romeofound ; jsr clr ; ldhx #noromeomsg ; jsr printstr1 ; jsr waitinput ; rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 78 source code motorola source code romeofound jsr initromeo ; ldhx #menu11 ; pshx ; pshh ; ldhx #$0200 ; clra ; jsr menu ; ais #$02 ; rts ; txmenu ldhx #menu12 ; pshx ; pshh ; ldhx #$0000 ; clra ; jsr menu ; ais #$02 ; rts ; ;------------------------------------------------ ; ; level 1.1 menu routines ; ;------------------------------------------------ ;level 1.1 menu do routines doreceive ldhx #menu11a ; pshx ; pshh ; ldhx #$0101 ; lda #$01 ; jsr menu ; ais #$02 ; jsr waitnotpush ; jsr initromeo ; jsr initcode ; rfloop jsr getrf ; jsr pushok ; cbeqa #$00,rfloop ; bset led,portc ; rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 79 romeomenu ldhx #menu112 ; pshx ; pshh ; ldhx #$0200 ; clra ; jsr menu ; ais #$02 ; rts ; rxmode lda #modemsk ; eor mflags ; sta mflags ; rts ; bandsel lda #cfmsk ; eor cr1 ; sta cr1 ; jmp savenvcr ; menu11ai2 clra ; ldx #$01 ; jsr gotoxy ; ldhx #fixedmsg ; brclr cod,mflags,printmode ; ldhx #rollmsg ; printmode jsr printstr1 ; rts ; menu11i3 clra ; ldx #$02 ; jsr gotoxy ; ldhx #band315msg ; brclr cf,cr1,printband ; ldhx #band434msg ; printband jsr printstr1 ; rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 80 source code motorola source code ;------------------------------------------------ ; ; level 1.2 menu routines ; ;------------------------------------------------ ;level 1.1 menu do routines doprogram brset txfile,sflags,txok ; jsr clr ; ldhx #nofilemsg1 ; jsr printstr1 ; jsr waitinput ; rts ; txok brset userp,sflags,txok1 ; jsr clr ; ldhx #badprogmsg ; jsr printstr1 ; jsr waitinput ; rts ; txok1 jsr progtx ; rts ; menu12i3 clra ; ldx #$02 ; jsr gotoxy ; bsr chkfilename ; brset txfile,sflags,printname ; printnoname ldhx #nofilemsg ; printname jsr printstr1 ; rts ; chkfilename bclr txfile,sflags ; lda filename ; cbeqa #$ff,noname ; ldhx #filename ; jsr strlen ; cmp #$0c ; bhs noname ; bset txfile,sflags ; noname rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 81 ;------------------------------------------------ ; ; level 1.1.2 menu routines ; ;------------------------------------------------ editcr1 lda cr1 ; clr cury ; mov #$05,curx ; jsr inputbyte ; sta cr1 ; bra savenvcr ; editcr2 lda cr2 ; mov #$01,cury ; mov #$05,curx ; jsr inputbyte ; sta cr2 ; bra savenvcr ; editcr3 lda cr3 ; mov #$02,cury ; mov #$05,curx ; jsr inputbyte ; sta cr3 ; savenvcr lda cr1 ; sta flashbuffer ; lda cr2 ; sta flashbuffer+1 ; lda cr3 ; sta flashbuffer+2 ; ldhx #nvregs ; sthx sourceptr ; jsr erasefpage ;erase parameter flash page ldhx #nvregs ; sthx sourceptr ; aix #$03 ; sthx destptr ; jsr progfrange ;program parameter flash page jsr initromeo ; rts ; ;level 1.2 draw routines f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 82 source code motorola source code menu112i1 jsr readromeo ; lda #$05 ; clrx ; jsr gotoxy ; lda cr1 ; jsr printhex ; rts ; menu112i2 jsr readromeo ; lda #$05 ; ldx #$01 ; jsr gotoxy ; lda cr2 ; jsr printhex ; rts ; menu112i3 jsr readromeo ; lda #$05 ; ldx #$02 ; jsr gotoxy ; lda cr3 ; jsr printhex ; rts ; nil equ $0000 menu1msg dc.b " rx menu " dc.b " tx menu " dc.b " power off ",$00 menu11amsg dc.b "coding type " dc.b " fixed " dc.b "esc to exit ",$00 menu11msg dc.b " receive " dc.b " set mc3359x ",$00 menu12msg dc.b " program tx " dc.b "file name: ",$00 menu112msg dc.b " cr1= " dc.b " cr2= " dc.b " cr3= ",$00 band315msg dc.b " 315mhz ",$00 band434msg dc.b " 434/868mhz ",$00 fixedmsg dc.b " fixed ",$00 rollmsg dc.b " rolling ",$00 noromeomsg dc.b "rx board not " dc.b "found ! ",$00 nofilemsg dc.b "no file ",$00 nofilemsg1 dc.b "no file in " dc.b "memory ! ",$00 badprogmsg dc.b "programming " dc.b "firmware not " dc.b "valid ! ",$00 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 83 ;------------------------------- ;menu 1 (main menu) ;------------------------------- menu1 dc.w menu1msg ;menu text dc.w nil ;draw item 1 dc.w nil ;draw item 2 dc.w nil ;draw item 3 dc.w nil ;draw item 4 dc.w rxmenu ;do item 1 dc.w txmenu ;do item 2 dc.w poweroff ;do item 3 dc.w nil ;do item 4 ;------------------------------- ;menu 1.1a (coding menu) ;------------------------------- menu11a dc.w menu11amsg ;menu text dc.w nil ;draw item 1 dc.w menu11ai2 ;draw item 2 dc.w nil ;draw item 3 dc.w nil ;draw item 4 dc.w nil ;do item 1 dc.w rxmode ;do item 2 dc.w nil ;do item 3 dc.w nil ;do item 4 ;------------------------------- ;menu 1.1 (rx menu) ;------------------------------- menu11 dc.w menu11msg ;menu text dc.w nil ;draw item 1 dc.w nil ;draw item 2 dc.w menu11i3 ;draw item 3 dc.w nil ;draw item 4 dc.w doreceive ;do item 1 dc.w romeomenu ;do item 2 dc.w bandsel ;do item 3 dc.w nil ;do item 4 ;------------------------------- ;menu 1.1 (tx menu) ;------------------------------- menu12 dc.w menu12msg ;menu text dc.w nil ;draw item 1 dc.w nil ;draw item 2 dc.w menu12i3 ;draw item 3 dc.w nil ;draw item 4 dc.w doprogram ;do item 1 dc.w nil ;do item 2 dc.w nil ;do item 3 dc.w nil ;do item 4 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 84 source code motorola source code ;------------------------------- ;menu 1.1.2 (romeo menu) ;------------------------------- menu112 dc.w menu112msg ;menu text dc.w menu112i1 ;draw item 1 dc.w menu112i2 ;draw item 2 dc.w menu112i3 ;draw item 3 dc.w nil ;draw item 4 dc.w editcr1 ;do item 1 dc.w editcr2 ;do item 2 dc.w editcr3 ;do item 3 dc.w nil ;do item 4 frame1 dc.b "tx id " dc.b "key " dc.b "crc ",$00 frame2 dc.b "--id--kkrrrr" dc.b " " dc.b " ",$00 endif usercodeend ;****************************************************************************** ; ; hc908rf2 fast programming algorithm ; ;****************************************************************************** progcode: section progsum dc.w usersum2 dc.w progtxend progtx ifndef testagent jsr clr ; ldhx #noprogmsg ; jsr printstr1 ; jsr waitinput ; rts ; noprogmsg dc.b "programming " dc.b "fimware not " dc.b "loaded ! ",$00 endif progtxend f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 85 ;****************************************************************************** ; ; remote user commands jump table ; ;****************************************************************************** usercmd: section usercmdsum dc.w usersum1 dc.w usercmdtabend usercmdnum dc.b $03 usercmdtab ifndef testagent dc.b "irr" ; dc.w cmdirr ; dc.b "rrr" ; dc.w cmdrrr ; dc.b "wrr" ; dc.w cmdwrr ; endif usercmdtabend txcode: section filename dc.b $ff ; ;------------------------------------------------------------------------------- ; ; software del loader agent rev a0.0 ; ;------------------------------------------------------------------------------- xdef lainit xdef lairqproc xdef lagetrs232 loader: section lainit mov #%00000001,config1 ; mov #portainit,porta ; mov #ddrainit,ddra ; mov #portbinit,portb ; mov #ddrbinit,ddrb ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 86 source code motorola source code mov #portcinit,portc ; mov #ddrcinit,ddrc ; mov #%00100001,ptcpue ; mov #ddrdinit,ddrd ; mov #portdinit,portd ; mov #%00110000,ptdpue ; ;clear ram ldhx #0040 ; clrram clr ,x ; aix #$01 ; cphx #$0240 ; bne clrram ; mov #%01000000,scc1 ; mov #%00101100,scc2 ; mov #%00000010,scbr ; mov #%00000110,t1scr ; mov #%000000001,spscr ;set spi baud rate ldhx #$099a ;init timer2 modulo register sthx t2modh ; lawarmstart ldhx #$0240 ;init stack pointer txs ; ;init rs232 variables clr buffercnt ; clr rs232st ; ldhx #$0400 ; sthx rs232tmo ; ;init input device clr enccnt ; mov #$01,encstep ; clr min ; clr curitem ; ;init output device jsr lasetcontrast ; jsr lainit7123 ; ;init vhh clr vhh ; jsr lasetvhh ; jsr lawait200ms ; ldhx #devname ;startup screen f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 87 jsr laprintstr1 ; jsr lawait1s ; jsr laclr ; ldhx #agentmsg ;blic agent screen jsr laprintstr1 ; jsr lawait1s ; jsr laclr ; ldhx #summsg ;blic agent screen jsr laprintstr1 ; ;test user command table mov #$02,cury ; lda usercmdsum+2 ; sta tmpptr ; lda usercmdsum+3 ; sta tmpptr+1 ; ldhx #usercmdtab ; jsr lacalcusersum ; cmp usercmdsum+1 ; bne labadusercmd ; cpx usercmdsum ; bne labadusercmd ; lda # ? ? ; bset userc,sflags ; bra latestpg ; labadusercmd bclr userc,sflags ; lda # ? x ? ; ;test programming algorithm code latestpg jsr laprintchar1 ; mov #$01,cury ; lda progsum+2 ; sta tmpptr ; lda progsum+3 ; sta tmpptr+1 ; ldhx #progtx ; jsr lacalcusersum ; cmp progsum+1 ; bne labadprog ; cpx progsum ; bne labadprog ; lda # ? ? ; bset userp,sflags ; bra latestuc ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 88 source code motorola source code labadprog bclr userp,sflags ; lda # ? x ? ; ;test user code latestuc jsr laprintchar1 ; clr cury ; lda usercodesum+2 ; sta tmpptr ; lda usercodesum+3 ; sta tmpptr+1 ; ldhx #userprog ; jsr lacalcusersum ; cmp usercodesum+1 ; bne labadusercode ; cpx usercodesum ; bne labadusercode ; jsr lawait1s ; jmp userprog ; labadusercode lda # ? x ? ; jsr laprintchar1 ; jsr lawait1s ; laupdateum1 jsr laeraseum ; laupdateum2 jsr laclr ; ldhx #firmupdmsg ; jsr laprintstr1 ; jsr lawait1s ; cli ; bra $ ;wait rs232 commands ;calculate user checksum and print it ; ;on entry ; h,x=start address ; tempptr=endaddress ;on exit ; x,a=checksum lacalcusersum clra ; psha ; psha ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 89 lanextcodesum lda ,x ; add 2,sp ; sta 2,sp ; clra ; adc 1,sp ; sta 1,sp ; aix #$01 ; cphx tmpptr ; bne lanextcodesum ; lda #$06 ; ldx cury ; jsr lagotoxy ; ldx 1,sp ; lda 2,sp ; jsr laprintshort ; lda # ? ? jsr laprintchar1 ; pulx ; pula ; rts ; ;software reset ; lasoftreset lda $fffe ; psha ; pulh ; ldx $ffff ; jmp ,x ; ;power off ; lapoweroff brclr key,portc,* ;wait until button released bclr hold,portc ;power off bra $ ; ;delay of 1ms ;this delay is indipendent from ppl because timer2 modulo ;is recalculated each time pll is changed ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 90 source code motorola source code ladly1ms mov #%00110000,t2scr;stop and reset timer2 bclr 7,t2scr ;clear tof bclr 5,t2scr ;start timer2 brclr 7,t2scr,* ;wait overflow bset 5,t2scr ;stop timer2 rts ; ;delay of n ms ;hx=n ; ladlynms jsr ladly1ms ;delay of 1ms aix #$ff ; cphx #$0000 ; bne ladlynms ; rts ; ;delay of 20ms ; lawait20ms pshx ; pshh ; ldhx #$14 ; bsr ladlynms ; pulh ; pulx ; rts ; ;delay of 200ms ; lawait200ms pshx ; pshh ; ldhx #$c8 ; bsr ladlynms ; pulh ; pulx ; rts ; ;delay of 1s ; lawait1s pshx ; pshh ; ldhx #$3e8 ; bsr ladlynms ; pulh ; pulx ; rts ; ;delay of 5us ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 91 lawait5us ;15+4*dly5us including jsr pshx ;[2] save x ldx #dly5us ;[2] dbnzx $ ;[4*dly5us] pulx ;[2] restore x rts ;[4] ;****************************************************************************** ; ; max533 dac device driver ; ; max533 parameters ; ; x=dac control byte 0000aacc ; aa=dac number,cc=01=load inp.register dac aa ; aa=dac number,cc=11=load inp.register dac aa and load all dacs ; aa=01,cc=00 load all dacs ; ; a=dac value ; ; out0=contrast control ; out1=vmcu control voltage ; out2=vhh control voltage ; out3=not used ; ; ;****************************************************************************** ; max533 control register values ; max533 daclcd equ %00000111 dacvhh equ %00000011 lasetcontrast lda contrast ; ldx #daclcd ;get control register value bra lawritedac ; lasetvhh lda vhh ; ldx #dacvhh ; lawritedac bclr ndac,portc ;cs low for programming mov #%00100000,spcr ;init spi as master bset spe,spcr ;enable spi stx spdr ;send to spi brclr sprf,spscr,* ;wait end of frame ldx spdr ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 92 source code motorola source code brset sprf,spscr,* ;wait sprf low sta spdr ;send second byte brclr sprf,spscr,* ;wait end of frame ldx spdr ; brset sprf,spscr,* ;wait sprf low bset ndac,portc ;rise cs to execute instruction bclr spe,spcr ;disable spi rts ; ;****************************************************************************** ; ; ea7123 lcd device driver ; ; times to be rispected: ; 1) t(buf)>4.7us bus free time (sda=h scl=h) ; 2) t(hdsta)> 4us start hold time (sda=l minimum time with scl=h) ; 3) t(low)>4.7us scl low time ; 4) t(high)>4us scl high time ; 5) t(susto)> 4us stop setup time (scl=h minimum time before sda rise) ; ;****************************************************************************** eeaddr equ %10100000 ;24c00 i2c bus address ea7123addr equ %01110100 ;ea7123 i2c bus address i2crwmsk equ %00000001 ;i2c bus r/w mask ea7123wreg equ %00000000 ;write ea7123 redgister ea7123rbusy equ %00100000 ;read ea7123 busy flag ea7123wdata equ %01000000 ;write ea7123 data ea7123rdata equ %01100000 ;read ea7123 data ea7123clr equ %00000001 ;read ea7123 clear display ea7123home equ %00000010 ;read ea7123 go home ea7123mode equ %00000100 ;read ea7123 mode set ea7123off equ %00001000 ;read ea7123 display off ea7123cursoff equ %00001100 ;read ea7123 display on cusror off ea7123curson equ %00001110 ;read ea7123 display on cusror on blink off ea7123blinkon equ %00001111 ;read ea7123 display on cusror on blink on ea7123cursmove equ %00010100 ;read ea7123 cursor move right ea7123init equ %00101110 ;read ea7123 init display functions 12charx4row,vlcd=v0-0.8 ea7123caddr equ %01000000 ;read ea7123 cgram addr ea7123daddr equ %10000000 ;read ea7123 ddarm addr lasendctrlbyte bclr sda,portd ;sda h->l lasendbyte ldx #$08 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 93 lanextbit jsr lawait5us ;meet start hold time and scl high time bclr scl,portd ;change sda with scl low bset sda,ddrd ;sda in output lsla ;copy bit 7 in carry bcc lasdalow ;copy carry in sda bset sda,portd ; bra larisescl ; lasdalow bclr sda,portd ; larisescl jsr lawait5us ;meet scl low time bset scl,portd ;rise scl dbnzx lanextbit ; jsr lawait5us ;meet scl high time bclr scl,portd ;controlla ack bclr sda,ddrd ;sda in input brn $ ; jsr lawait5us ;meet scl low time bset scl,portd ; brclr sda,portd,laexitbyte ;se ack a=0 lda #$01 ;se nack a=1 laexitbyte rts ; laread7123 lda #(ea7123addr+i2crwmsk) ;read ea7123 jsr lasendctrlbyte ; cbeqa #$01,lastopbit ; lanextread ldx #$08 ;x as bit counter lanextbitin jsr lawait5us ;meet scl high time bclr scl,portd ; bclr sda,ddrd ;sda in input jsr lawait5us ;meet scl low time bset scl,portd ; clc ; brclr sda,portd,lasdalowin ; sec ; lasdalowin rola ; dbnzx lanextbitin ; jsr lawait5us ;meet scl high time bclr scl,portd ;ack out bset sda,ddrd ;sda in output bclr sda,portd ; jsr lawait5us ;meet scl low time bset scl,portd ; rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 94 source code motorola source code lalastread ldx #$08 ;x as bit counter lanextbitin1 jsr lawait5us ;meet scl high time bclr scl,portd ; bclr sda,ddrd ;sda in input jsr lawait5us ;meet scl low time bset scl,portd ; clc ; brclr sda,portd,lasdalowin1 ; sec ; lasdalowin1 rola ; dbnzx lanextbitin1 ; jsr lawait5us ;meet scl high time bclr scl,portd ;nack out bset sda,ddrd ;sda in output bset sda,portd ; jsr lawait5us ;meet scl low time bset scl,portd ; rts ; laputchar7123 psha ;save register value lda #ea7123addr ;send startbit and address jsr lasendctrlbyte ; cbeqa #$01,laerror7123 ;if not ack exit with error lda #ea7123wdata ;send writedata control register bra lasendreg ; lawritereg7123 psha ;save register value lda #ea7123addr ;send startbit and address jsr lasendctrlbyte ; cbeqa #$01,laerror7123 ;if not ack exit with error lda #ea7123wreg ;send writeregister control register lasendreg jsr lasendbyte ; cbeqa #$01,laerror7123 ;if not ack exit with error pula ;recover register value jsr lasendbyte ;put it on the bus pshx ;dummy push laerror7123 pulx ;pull out stacked value lastopbit bclr scl,portd ;change sda with scl low bclr sda,portd ; bset sda,ddrd ;sda in output bset scl,portd ;sda in output jsr lawait5us ;meet stop hold time bset sda,portd ; jsr lawait5us ;meet bus free time rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 95 lawaitbusy7123 lda #ea7123addr ;send startbit and address jsr lasendctrlbyte ; cbeqa #$01,lastopbit ;if not ack exit with error lda #ea7123rbusy ;send readbusyflag control register jsr lasendbyte ; cbeqa #$01,lastopbit ;if not ack exit with error bsr lastopbit ;send stopbit jsr laread7123 ;read busyflag,first read is not valid labusy7123 jsr lanextread ;read busyflag bmi labusy7123 ;busy flag is in bit7 (bit7=1 lcd busy) bsr lalastread ;last read without aknowledge bra lastopbit ;send stopbit lahome clr curx ; clr cury ; lda #ea7123home ; bra lawritereg7123 ; lainit7123 lda #ea7123init ; bsr lawritereg7123 ; cbeqa #$01,laendinit ;if not ack exit with error lda #ea7123cursmove ; bsr lawritereg7123 ; laclr clr curx ; clr cury ; lda #ea7123clr ; bsr lawritereg7123 ; cbeqa #$01,laendinit ; bsr lawaitbusy7123 ; lda #ea7123cursoff ; bra lawritereg7123 ; laendinit rts ; lacurson lda #ea7123curson ; jmp lawritereg7123 ; lacursoff lda #ea7123cursoff ; jmp lawritereg7123 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 96 source code motorola source code lablinkon lda #ea7123blinkon ; jmp lawritereg7123 ; lagotoxy sta curx ;save x coordinate stx cury ; psha ; txa ; and #%00000011 ;y coordinate modulo 4 lsla ; nsa ; tax ; pula ;restore x coordinate pshx ;save y coordinate ldhx #$000e ; div ; pshh ;h = x coordinate modulo 0x0e pula ;move in a add 1,sp ;add y coordinate pulx ;take it out of the stack add #ea7123daddr ;add register mask jmp lawritereg7123 ;set cursor address laprintstr pshx ;load pointer pulh ; tax ; laprintstr1 lda ,x ; beq laendstring ; ora #$80 ; aix #1 ; pshh ;save pointer pshx ; bsr laprintchar ; pulx ;restore pointer pulh ; bra laprintstr1 ; laendstring rts ; laprintchar1 ora #$80 ; laprintchar jsr laputchar7123 ;print char inc curx ;increment cursor position lda curx ;check if new line clrh ; ldx #$0c ; div ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 97 pshh ; pulx ; stx curx ; cbeqa #$00,laendprintchar ; add cury ;new line clrh ; ldx #$3 ; div ; pshh ; pulx ; stx cury ; lda curx ; bsr lagotoxy ; laendprintchar rts ; laprintdec ldx #$0a ; clrh ; div ; pshh ; clrh ; div ; pshh ; tsta ; bne ladigit3 ; lda # ? ? ; jsr laprintchar1 ; pula ; tsta ; bne ladigit2 ; lda # ? ? ; jsr laprintchar1 ; bra ladigit1 ; ladigit3 add #$30 ; jsr laprintchar1 ; pula ; ladigit2 add #$30 ; jsr laprintchar1 ; ladigit1 pula ; add #$30 ; jsr laprintchar1 ; rts ; laprinthex psha ; pshx ; bra laprintlowbyte ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 98 source code motorola source code laprintshort psha ;save low byte pshx ;save high byte txa ; nsa ; and #$0f ; jsr laprintnibble ; lda 1,sp ; and #$0f ; jsr laprintnibble ; laprintlowbyte lda 2,sp ; nsa ; and #$0f ; jsr laprintnibble ; lda 2,sp ; and #$0f ; jsr laprintnibble ; pulx ; pula ; rts ; laprintnibble add #$b0 ; cmp #$b9 ;convert to ascii bls lanoalfa ; add #$07 ; lanoalfa jsr laprintchar ; rts ; lagetchar7123 lda #ea7123addr ;send startbit and address jsr lasendctrlbyte ; cbeqa #$01,lastopbit1 ;if not ack exit with error lda #ea7123rdata ;send readbusyflag control register jsr lasendbyte ; cbeqa #$01,lastopbit1 ;if not ack exit with error jsr lastopbit ;send stopbit jsr laread7123 ;read data rts ; lastopbit1 jmp lastopbit ; lainputhex psha ;space for local var psha ; lda min ; psha ;save min lda max ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 99 psha ;save max lda enccnt ; psha ;save enccnt lda encstep ; psha ;save encstep mov #$30,min ; mov #$46,max ; mov #$ff,encstep ; jsr lagetchar7123 ; sta 6,sp ;save char sta 5,sp ;set last char sta enccnt ; jsr lasamepoint ; jsr lawaitnotkeyok ; jsr lawaitnotpush ; jsr lasamepoint ; lainputhexloop bset 1,intscr ; lda enccnt ; cmp #$3a ; blo lainphexok ; cmp #$40 ; bhi lainphexok ; lda 5,sp ; cmp enccnt ; bhi lachar39 ; lda #$41 ; sta enccnt ; bra lainphexok ; lachar39 lda #$39 ; sta enccnt ; lainphexok lda 5,sp ; cbeq enccnt,lanonewinp ; lda enccnt ; bclr 1,intscr ; sta 5,sp ; jsr laputchar7123 ; jsr lasamepoint ; lanonewinp bclr 1,intscr ; jsr lapushok ; cbeqa #$01,laendinphex ; jsr lakeyok ; cbeqa #$00,lainputhexloop ; jsr lagetchar7123 ; sta 6,sp ; jsr lasamepoint ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 100 source code motorola source code laendinphex pula ; sta encstep ; pula ; sta enccnt ; pula ; sta max ; pula ; sta min ; pula ; lda 1,sp ; jsr laputchar7123 ; jsr lasamepoint ; pula ; sub #$30 ; cmp #$0a ; blo laexitinphex ; sub #$07 ; laexitinphex rts ; lasamepoint lda curx ; ldx cury ; jsr lagotoxy ; rts ; ;****************************************************************************** ; ; menu manager ; ;****************************************************************************** arrow equ $2e ;menu selection char ;redraw current menu ; ;on entry ; curmenuptr ponter to menu template ; a=current item ;on exit ; no parameter lamenuredraw psha ;save curitem lda #$04 ;init counter psha ; jsr laclr ;clear screen ldhx curmenuptr ;get text pointer into hx lda ,x ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 101 psha ; lda 1,x ; psha ; pulx ; pulh ; jsr laprintstr1 ;print menu mask ldhx curmenuptr ; aix #$02 ; lamenudrawloop pshx ; pshh ; lda ,x ;use drawitem routine if pointer not null bne ladrawitem ; lda 1,x ; beq lanextitemdraw ; ladrawitem lda ,x ; psha ; ldx 1,x ; pulh ; lda 4,sp ;get curitem jsr ,x ; lanextitemdraw pulh ; pulx ; aix #$02 ; dbnz 1,sp,lamenudrawloop ; clra ;print arrow at current item ldx enccnt ; jsr lagotoxy ; lda #arrow ; jsr laprintchar ; pula ;free stack pula ; rts ; ;menu rotine handles menu n ; ;on entry ; curmenuptr ponter to menu template ; a=current item ; h=item max ; x=item min ;on exit ; no parameter f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 102 source code motorola source code lamenu psha ;save curitem pshx ;save min pshh ;save max sei ; jsr lapushencoder ;push encoder status lainitmenu sei ; lda 6,sp ; sta min ; lda 5,sp ; sta max ; mov #$01,encstep ; lda $0a,sp ; sta curmenuptr ; lda $0b,sp ; sta curmenuptr+1 ; lda 7,sp ; sta enccnt ; bsr lamenuredraw ;draw menu (a=curitem) cli ; jsr lawaitnotkeyok ; jsr lawaitnotpush ; laselectloop jsr lakeyok ; cbeqa #$01,laselected ;if select do item action jsr lapushok ; cbeqa #$01,laescaped ;else exit menu jsr ladly1ms ; ldhx rs232tmo ; cphx #$0000 ; bne lanotmo ; clr rs232st ; clr buffercnt ; ldhx #$0401 ; lanotmo aix #$ff ; sthx rs232tmo ; lda 7,sp ; cbeq enccnt,laselectloop ; tax ;if arrow position changes clra ; jsr lagotoxy ; lda # ? ? ; jsr laprintchar1 ;clear the old one lda enccnt ; sta 7,sp ; clra ; ldx 7,sp ; jsr lagotoxy ; lda #arrow ; jsr laprintchar ;and draw the new one bra laselectloop ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 103 laselected lda 7,sp ;get item doprocptr asla ; add #$0a ; add curmenuptr+1 ; tax ; clra ; adc curmenuptr ; psha ; pulh ; lda ,x ; bne ladoitem ; lda 1,x ; beq ladonotitem ; ladoitem lda ,x ; psha ; ldx 1,x ; pulh ; jsr ,x ; ladonotitem jmp lainitmenu ; laescaped jsr lapullencoder ;resore old encoder status pula ; ais #$02 ; rts ; ;****************************************************************************** ; ; input device driver ; ;****************************************************************************** ;input 2 digit hex value ; ;on entry ;a=start value ;on exit ;a=selected value lainputbyte psha ; lda curx ; ldx cury ; jsr lagotoxy ; lda 1,sp ; jsr laprinthex ; sei ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 104 source code motorola source code jsr lapushencoder ;save encoder status clr min ; mov #$ff,max ; lda 5,sp ; sta enccnt ; psha ; lda #$01 ; sta encstep ; cli ; jsr lawaitnotkeyok ; jsr lablinkon ; lasamehex jsr lakeyok ; cbeqa #$01,laselhex ; lda enccnt ; cbeq 1,sp,lasamehex ; sta 1,sp ; ldx cury ; lda curx ; deca ; deca ; jsr lagotoxy ; lda 1,sp ; jsr laprinthex ; bra lasamehex ; laselhex sei ; lda enccnt ; sta 6,sp ; pula ; jsr lapullencoder ; jsr lacursoff ; jsr lawaitnotkeyok ; pula ; rts ; ;wait input wait for select or escape ; ;on exit ;carry=1 select, carry=0 escape ; lawaitinput jsr lawaitnotkeyok ; jsr lawaitnotpush ; waitinput1 jsr lakeyok ; sec ; cbeqa #$01,waitinputend ; jsr lapushok ; cbeqa #$00,waitinput1 ; clc ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 105 waitinputend rts ; lakeyok clra ; brset key,portc,exitok ;if key not pressed return false lda #dly100us ; dbnza $ ;else wait 100us brset key,portc,exitok ;if noise return false inca ;else return true exitok rts ; lawaitkeyok clrx ; keydown bsr lakeyok ; cbeqa #$00,lawaitkeyok ; dbnzx keydown ; rts ; lawaitnotkeyok clrx ; keydown1 bsr lakeyok ; cbeqa #$01,lawaitnotkeyok ; dbnzx keydown1 ; rts ; lawaitnotpush clrx ; pushdown bsr lapushok ; cbeqa #$01,lawaitnotpush ; dbnzx pushdown ; rts ; lawaitpush clrx ; pushdown1 bsr lapushok ; cbeqa #$00,lawaitpush ; dbnzx pushdown1 ; rts ; lapushok clra ; brset pushbut,portd,exitpush ;if key not pressed return false lda #dly100us ; dbnza $ ;else wait 100us brset pushbut,portd,exitpush ;if noise return false inca ;else return true exitpush rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 106 source code motorola source code ;save current encoder status into the stack ;on entry ; no parameter ;on exit ; no parameter lapushencoder pulh ; pulx ; lda min ;save encoder status psha ; lda max ; psha ; lda enccnt ; psha ; lda encstep ; psha ; jmp ,x ; ;restore encoder status from the stack ;on entry ; no parameter ;on exit ; no parameter ;stack status ; sp-1,sp-2=return address ; sp-3=encstep ; sp-4=enccnt ; sp-5=max ; sp-6=min lapullencoder pulh ; pulx ; sei ;disable interrupt during pula ;encoder status restore sta encstep ; pula ; sta enccnt ; pula ; sta max ; pula ; sta min ; cli ;enable interrupt jmp ,x ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 107 ; irq handling procedures ; ; lairqproc psha ;save a pshx ;save x ldx #dly100us ;wait 100us for anti-debouncing encdly dbnzx encdly ; bih endirq ;if irq1=1 the interrupt isn ? t correct lda enccnt ;enccnt value loaded in accumulator tax ; brclr encb,portd,encup ;if encb=1 then increase sub encstep ;otherwise decrase sta enccnt ; lda encstep ; bpl chkencmin ; chkencmax cpx enccnt ; bhi settomax ; lda enccnt ; cmp max ;if less than max is ok bls endirq ; settomax lda max ; sta enccnt ; bra endirq ; encup lda encstep ; add enccnt ;increase enccnt sta enccnt ; lda encstep ; bpl chkencmax ; chkencmin cpx enccnt ; blo settomin ; lda enccnt ; cmp min ; bhs endirq ;if bigger than min is ok settomin lda min ; sta enccnt ; endirq bset 2,intscr ;delete wrong irq pulx ;reload x pula ;reload a rti ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 108 source code motorola source code ;****************************************************************************** ; ; rs232 device driver ; ;****************************************************************************** lagetrs232 pshh ;save h ldhx #$0400 ; sthx rs232tmo ; clrh ; tst scs1 ;read received byte and clear flag lda scdr ; brclr escrec,rs232st,lachkesc ;check if $1b already received bra laescok ; lachkesc cmp #$1b ;if char is esc=$1b init buffer bne la232nocode ;if not skip bset escrec,rs232st ;set flag clr buffercnt ; bra la232nocode ; laescok ldx buffercnt ; sta rxbuffer,x ; cbeqx #$00,lainitpack ;if first byte clear crc cpx rxbuffer ; beq lachkpack ;if last byte validate packet bra lanext232 ;else store into rx buffer lainitpack clr crc232 ; cmp #low(buffersize) ;if packet too big exit with error bhs labadpack ; cmp #$04 ;if packet too small exit with error blo labadpack ; lanext232 add crc232 ; sta crc232 ; inc buffercnt ; bra la232nocode ; lachkpack coma ; cbeq crc232,ladecode ;if crc ok decode command labadpack lda # ? n ? ;exit with bad packet message clr rs232st ; clr buffercnt ; jsr laputrs232 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 109 la232nocode pulh ; rti ; ;decode command ladecode bclr escrec,rs232st ; ldhx #cmdtab ;search command in bios table lda cmdnum ; bsr lasrccmd ; cphx #$0000 ;if not found beq lasrcusercmd ;search user command jsr ,x ;else execute it bra la232nocode ; lasrcusercmd brclr userc,sflags,labadpack ; ldhx #usercmdtab ;search command in bios table lda usercmdnum ; bsr lasrccmd ; cphx #$0000 ;if not found beq labadpack ;error jsr ,x ;else execute it bra la232nocode ; ;search a command in the table pointed by hx ; ;on entry ; hx=tableptr ; a=num commands in the table ; rxbuffer+1->rxbuffer+3 command ;on exit ; hx=command routine pointer lasrccmd psha ;save number of commands pshx ;save table addr pshh ; clra ; psha ;init command counter psha ;space for char counter nextcmd clr 1,sp ;init char counter nextcmdchar lda 4,sp ; add 1,sp ; tax ; lda 3,sp ; adc #$00 ; psha ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 110 source code motorola source code pulh ; lda ,x ;get cmd char clrh ; ldx 1,sp ; inc 1,sp ; cbeqx #$03,cmdfound ;if 4th char cmd found cmp rxbuffer+1,x ; beq nextcmdchar ;loop for oll cmd char inc 2,sp ;if not equal next cmd lda 2,sp ; cmp 5,sp ; bhs cmdtableend ;untill last cmd lda #$05 ;next cmd add 4,sp ; sta 4,sp ; clra ; adc 3,sp ; sta 3,sp ; bra nextcmd ; cmdfound lda 4,sp ; tax ; lda 3,sp ; psha ; pulh ; lda 3,x ; psha ; ldx 4,x ; pulh ; ais #$05 ; rts ; cmdtableend ldhx #$0000 ; ais #$05 ; rts ; laputrs232 brclr 7,scs1,* ; sta scdr ; rts ; lasenddec ldx #$0a ; clrh ; div ; pshh ; clrh ; div ; pshh ; add #$30 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 111 bsr laputrs232 ; pula ; add #$30 ; bsr laputrs232 ; pula ; add #$30 ; bsr laputrs232 ; rts ; lasendstr1 lda ,x ; beq laendstring1 ; aix #$01 ; pshh ;save pointer pshx ; bsr laputrs232 ; pulx ;restore pointer pulh ; bra lasendstr1 ; laendstring1 rts ; ;get the length of a string ; ;on entry ; hx=string pointer ;on exit ; a=len (max 254 char) a=ff length error ; hx=string end pointer lastrlen pshx ;save string pointer pshh ; clra lanextstrlen tst ,x ; beq lastrlenend ; aix #$01 ; inca ; cbeqa #$ff,lastrlenend ; bra lanextstrlen ; lastrlenend pulh ; pulx ; rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 112 source code motorola source code ;****************************************************************************** ; ; remote commands ; ;****************************************************************************** ;*********************************************** ; programmer identify command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "pid" ; 04 packet checksum ($1e) ;*********************************************** cmdpid ldhx #pidstr ; pid1 jsr lasendstr1 ; rts ; ;*********************************************** ; erase user memory command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "eum" ; 04 packet checksum ($14) ;*********************************************** cmdeum jsr laclr ; ldhx #erasefirmmsg ; jsr laprintstr1 ; jsr laeraseum ; jmp lacmdok ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 113 ;*********************************************** ; erase programming code memory command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "epg" ; 04 packet checksum ($1f) ;*********************************************** cmdepg jsr laerasepg ; bclr userp,sflags ; jmp lacmdok ; ;*********************************************** ; erase tx memory command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "etx" ; 04 packet checksum ($0a) ;*********************************************** cmdetx jsr laerasetx ; jmp lacmdok ; ;*********************************************** ; load tx memory command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "ltx" ; 04 packet checksum ($03) ;*********************************************** cmdltx jsr laupdatetx ; jmp lacmdok ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 114 source code motorola source code ;*********************************************** ; load program code memory command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "lpg" ; 04 packet checksum ($18) ;*********************************************** cmdlpg jsr laupdatepg ; lacmdok lda # ? y ? ; clr rs232st ; clr buffercnt ; jsr laputrs232 ; rts ; ;*********************************************** ; update user code command ; ; buffer status; ; ; 00 packlen (packet length 04) ; 01-03 "uuc" ; 04 packet checksum ($0e) ;*********************************************** cmduuc jsr laclr ; ldhx #loadfirmmsg ; jsr laprintstr1 ; jsr laupdateum ; bcc cmduuc3 ; jsr laclr ; ldhx #errfirmmsg ; jsr laprintstr1 ; jsr lawaitinput ; jmp lasoftreset ; cmduuc3 lda scdr ; jmp lasoftreset ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 115 ;**************************************************** ; ; flash programming routine ; ;**************************************************** ;sourceptr=address of page (128bytes) to be erased laerasepage ldhx sourceptr ; lda #%00000010 ; sta flcr ;erase to 1 lda flbpr ; sta ,x ; lda #dly10us ;wait 10us dbnza $ ; lda #%00001010 ; sta flcr ;hven to 1 ldx #$0a ; erasedly lda #dly100us ; dbnza $ ; dbnzx erasedly ; lda #%00001000 ; sta flcr ;erase to 0 lda #dly100us ; dbnza $ ; clra ; sta flcr ; rts ; laerasepageend laerasepagelen equ low(laerasepageend-laerasepage) ;sourceptr=start address ;destptr=end address ;flashbuffer=data buffer laprogrange ldhx sourceptr ; clra ; psha ; nextrow lda #%00000001 ; sta flcr ;pgm to 1 lda flbpr ; sta ,x ;dummy write in a flash location lda #dly10us ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 116 source code motorola source code dbnza $ ;wait 10us lda #%00001001 ; sta flcr ;hven to 1 lda #dly5us ; dbnza $ ;wait 5us nextrowbyte ldx 1,sp ; clrh ; lda flashbuffer,x ; ldhx sourceptr ; sta ,x ; inc 1,sp ; aix #$01 ; sthx sourceptr ; cphx destptr ; beq endrow ; txa ; and #%00111111 ;check if end of row beq endrow ; lda #dly30us ; dbnza $ ;wait 30us bra nextrowbyte ;next byte endrow lda #dly30us ; dbnza $ ;wait 30us lda #%00001000 ; sta flcr ;pgm to 0 lda #dly10us ; dbnza $ ;wait 10us sta flcr ; cphx destptr ; bne nextrow ; pula ; rts ; laprograngeend laprograngelen equ low(laprograngeend-laprogrange) laloadram psha ; clra ; psha ; laloadramloop lda ,x ; aix #$01 ; pshx ; pshh ; clrh ; ldx 3,sp ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 117 sta rxbuffer,x ; pulh ; pulx ; inc 1,sp ; dbnz 2,sp,laloadramloop ; pula ; pula ; rts ; laerasefpage ldhx #laerasepage ; lda #laerasepagelen ; jsr laloadram ;load routine in ram jsr rxbuffer ; rts ; laprogfrange ldhx #laprogrange ; lda #laprograngelen ; jsr laloadram ;load routine in ram jsr rxbuffer ; rts ; laloadupdate ldhx #$0000 ; laupdateloop lda lafirmupdate,x ; sta $100,x ; aix #$01 ; cphx #lafirmupdatelen ; bne laupdateloop ; rts ; laloaderase ldhx #$0000 ; laeraseloop lda laeraseuser,x ; sta $100,x ; aix #$01 ; cphx #laeraseuserlen ; bne laeraseloop ; rts ; laupdateum bsr laloadupdate ; ldhx #$d700 ; sthx endaddr ; ldhx #$8000 ; sthx flashtop ; jsr $100 ; rts ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 118 source code motorola source code laeraseum bsr laloaderase ; ldhx #$8000 ; sthx startaddr ; ldhx #$d700 ; sthx endaddr ; jsr $100 ; rts ; laupdatepg bsr laloadupdate ; ldhx #$e700 ; sthx endaddr ; ldhx #$d700 ; sthx flashtop ; jsr $100 ; rts ; laerasepg bsr laloaderase ; ldhx #$d700 ; sthx startaddr ; ldhx #$e700 ; sthx endaddr ; jsr $100 ; rts ; laupdatetx bsr laloadupdate ; ldhx #$f000 ; sthx endaddr ; ldhx #$e700 ; sthx flashtop ; jsr $100 ; rts ; laerasetx bsr laloaderase ; ldhx #$e700 ; sthx startaddr ; ldhx #$f000 ; sthx endaddr ; jsr $100 ; rts ; laeraseuser tpa ;save status register psha ; sei ; ldhx startaddr ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 119 laeraseuserloop sthx startaddr ; lda #%00000010 ; sta flcr ;erase to 1 lda flbpr ; sta ,x ; lda #dly10us ;wait 10us dbnza $ ; lda #%00001010 ; sta flcr ;hven to 1 ldx #$0a ; laerasedly lda #dly100us ; dbnza $ ; dbnzx laerasedly ; lda #%00001000 ; sta flcr ;erase to 0 lda #dly100us ; dbnza $ ; clra ; sta flcr ; ldhx startaddr ; aix #$40 ; aix #$40 ; cphx endaddr ; bne laeraseuserloop ; pula ; tap ; rts ; laeraseuserend lafirmupdate tpa ;save status register psha ; sei ; bsr lasendyes ; lafirmupdate1 bsr laget232 ; cbeqa # ? s ? ,lafirm1 ; lda # ? n ? ; bsr laput232 ; bra lafirmupdate1 ; lafirm1 bsr laput232 ; bsr laget232 ; psha ; bsr laget232 ; tax ; pulh ; bra lanextl ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 120 source code motorola source code laget232 brclr 5,scs1,* ; lda scdr ; rts ; laprogerr lda # ? n ? ; bsr laput232 ; pula ; tap ; sec ; rts ; lasendyes lda # ? y ? ; laput232 brclr 7,scs1,* ; sta scdr ; rts ; lanextl sthx numlines ; bsr laget232 ; sta linelen ;save line length sta bytecount ; clr linesum ; bsr laget232 ; sta startaddr ; bsr laget232 ; sta startaddr+1 ; ldhx #$0090 ; nextlinebyte bsr laget232 ; sta ,x ; add linesum ; sta linesum ; incx ; dbnz linelen,nextlinebyte ; bsr laget232 ; cmp linesum ; bne laprogerr ; ldhx startaddr ; lda #$90 ; sta lasourcedata ; lanextrow lda #%00000001 ; sta flcr ;pgm to 1 lda flbpr ; sta ,x ;dummy write in a flash location lda #dly10us ;wait 10us dbnza $ ; lda #%00001001 ; sta flcr ;hven to 1 lda dly5us ; dbnza $ ;wait 10us f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 121 lanextrowbyte lda $90 ; cphx endaddr ; bhs skipbyte ; cphx flashtop ; blo skipbyte ; sta ,x ; skipbyte lda #dly30us ; dbnza $ ;wait 30us aix #$01 ; txa ; and #%00111111 ;check if end of row beq laendrow ; lda lasourcedata ; inca ; sta lasourcedata ; dbnz bytecount,lanextrowbyte ; laendrow lda #%00001000 ; sta flcr ;pgm to 0 lda #dly10us ;wait 10us dbnza $ ; sta flcr ; cbeq bytecount,laendrow1 ; dbnz bytecount,lanextrowbyte ; laendrow1 bsr lasendyes ; ldhx numlines ; aix #$ff ; cphx #$0000 ; bne lanextl ; pula ; tap ; brclr 5,scs1,* ; lda scdr ; clc ; rts ; lafirmupdateend laeraseuserlen equ low(laeraseuserend-laeraseuser) lafirmupdatelen equ low(lafirmupdateend-lafirmupdate) lasourcedata equ lanextrowbyte-lafirmupdate+$101 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 122 source code motorola source code ;**************************************************** ; ; rom data section for loader agent ; ;**************************************************** firmupdmsg dc.b "waiting for " dc.b "firmware... ",$00 erasefirmmsg dc.b "erasing " dc.b "firmware... ",$00 loadfirmmsg dc.b "loading " dc.b "firmware... ",$00 errfirmmsg dc.b "error ! " dc.b "press a kay ",$00 devname dc.b " 68hc908rf2 " dc.b " reference " dc.b " board ",$00 agentmsg dc.b "blic agent " dc.b "rev 1.0 ",$00 summsg dc.b "code : " dc.b "prog : " dc.b "table: ",$00 firmokmsg dc.b ":pass ",$00 badfirmmsg dc.b ":fail ",$00 dc.b "no firmware ",$00 contrast dc.b $60 vhhval dc.b $ff pidstr dc.b "rfb a0.0 ",$00 cmdnum dc.b $07 cmdtab dc.b "pid" ; dc.w cmdpid ; dc.b "epg" ; dc.w cmdepg ; dc.b "etx" ; dc.w cmdetx ; dc.b "eum" ; dc.w cmdeum ; dc.b "lpg" ; dc.w cmdlpg ; dc.b "ltx" ; dc.w cmdltx ; dc.b "uuc" ; dc.w cmduuc ; cmdtabend f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code mother board firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 123 ;****************************************************************************** ; ; bios jump table ; ;****************************************************************************** ifndef testagent biosvectors: section waitinput jmp lawaitinput ; keyok jmp lakeyok ; waitkeyok jmp lawaitkeyok ; waitnotkeyok jmp lawaitnotkeyok ; waitnotpush jmp lawaitnotpush ; pushok jmp lapushok ; waitpush jmp lawaitpush ; pushencoder jmp lapushencoder ; pullencoder jmp lapullencoder ; inputbyte jmp lainputbyte ; poweroff jmp lapoweroff ; dly1ms jmp ladly1ms ; dlynms jmp ladlynms ; wait20ms jmp lawait20ms ; wait200ms jmp lawait200ms ; wait1s jmp lawait1s ; setcontrast jmp lasetcontrast ; setvhh jmp lasetvhh ; writedac jmp lawritedac ; wait5us jmp lawait5us ; home jmp lahome ; curson jmp lacurson ; cursoff jmp lacursoff ; blinkon jmp lablinkon ; clr jmp laclr ; gotoxy jmp lagotoxy ; printstr jmp laprintstr ; printstr1 jmp laprintstr1 ; printchar jmp laprintchar ; printchar1 jmp laprintchar1 ; printhex jmp laprinthex ; printshort jmp laprintshort ; printdec jmp laprintdec ; inputhex jmp lainputhex ; putrs232 jmp laputrs232 ; getrs232 jmp lagetrs232 ; senddec jmp lasenddec ; sendstr1 jmp lasendstr1 ; erasefpage jmp laerasefpage ; progfrange jmp laprogfrange ; updateum jmp laupdateum1 ; menu jmp lamenu ; softreset jmp lasoftreset ; strlen jmp lastrlen ; endif f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 124 source code motorola source code ;****************************************************************************** ; ; parameter flash ; ;****************************************************************************** param: section nvregs dc.b $d4 dc.b $a1 dc.b $00 end a.2.2 uk509 prm names ansi.lib /* other object files to link are passed from the idf with the linker -add option */ end sections direct_ram = read_write 0x40 to 0xff; buff_ram = read_write 0x0100 to 0x01ff; stack_ram = read_write 0x0200 to 0x023f; my_rom = read_only 0x8000 to 0xefff; loader_rom = read_only 0xf000 to 0xfbff; biosvec_rom = read_only 0xfc00 to 0xfcff; param_rom = read_only 0xfd00 to 0xfdff; end placement default_rom, rom_var, strings into my_rom; default_ram into direct_ram; buffers into buff_ram; biosvectors into biosvec_rom; loader into loader_rom; param into param_rom; sstack into stack_ram; end stacksize 0x40 init lainit vector address 0xfffe lainit vector address 0xfffa irqproc vector address 0xffe4 getrs232 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code transmitter firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 125 a.3 transmitter firmware ;emulated equ 0 ; ;------------------------------------------------------------------------------- ; ; uk804 : transmitter sw (inside the mc68hc908rf2) ; ;------------------------------------------------------------------------------- ; ; source : uk804.asm ; controller : 68hc908rf2 ; clock : 8 mhz ; ; versione : 1.00 28 feb 2001 ; ;------------------------------------------------------------------------------- ; ; ; #$-view:uk804 schematics-$# include "c:\metrowerks\lib\hc08c\inc\h908rk2.inc" ; #$-view:rk2 registers declarations-$# ;############################################################################### ;# # ;# transmission frame composition # ;# # ;# nnnnnnme-iiiiiiii-iiiiiiii-iiiiiiii-dgggtttt-rrrrrrrr # ;# | extra |--------id number--------| codice | --crc--| # ;# # ;# i=id number -> fix identification code (3 bytes) # ;# g=group -> selected group # ;# d=direction -> 1=increase 0=decrease # ;# m=mode -> 1=toggle 0=normal # ;# t=button -> button selected code # ;# r=crc -> crc # ;# e=extra -> commutation flag (1-> commutation 0-> it changes) # ;# n=unused -> they must be 0 # ;# # ;# # ;# temporizations # ;# # ;# duration time of the sync signal = 6ms # ;# duration time of a bit = 2ms # ;# bit 0 -> lowtime=1.33ms hightime=0.66ms # ;# bit 1 -> lowtime=0.66ms hightime=1.33ms # ;# # ;############################################################################### f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 126 source code motorola source code ; keyboard buttons codification ; col0 col1 ; 02 82 row0 ; 04 84 row1 ; 06 86 row2 ; 01 81 row3 ; porta a pllen equ 0 ;tango pll enable row0 equ 1 ;keyboard row 0 row1 equ 2 ;keyboard row 1 row2 equ 3 ;keyboard row 2 row3 equ 4 ;keyboard row 3 col0 equ 5 ;keyboard column 0 col1 equ 6 ;keyboard column 1 led equ 7 ;led ddrainit equ %10000001 ; portainit equ %00000000 ; ; porta b data equ 2 ;data out to tango dclk equ 3 ;data clock from tango ddrbinit equ %00000100 ; portbinit equ %00000000 ; org $80 buffer0 ds.b 1 ;control byte buffer1 ds.b 1 ;id0 buffer2 ds.b 1 ;id1 buffer3 ds.b 1 ;id2 buffer4 ds.b 1 ;key buffer5 ds.b 1 ;rc0 buffer6 ds.b 1 ;rc1 crc ds.b 1 ; bitcount ds.b 1 ; lastrow ds.b 1 ; lastcol ds.b 1 ; txcnt ds.b 1 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code transmitter firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 127 ; costanti dly300ms equ $03 ;300ms@8mhz mintx equ $03 ;minimum number of frame transmitted framedly equ $20 ;delay between frames (771*framedly cycles) codesec: section xdef main xdef keybirq main mov #%00000011,config1 ;diasble cop and enable stop instruction rsp ;init stack pointer warmstart mov #ddrainit,ddra ;init porta mov #portainit,porta ; mov #ddrbinit,ddrb ;init portb mov #portbinit,portb ; bset pllen,porta ;start pll of tango ; ; warning !!!!! imaskk is inverted in emulation with mmds/mmevs ; ifdef emulated mov #%00000011,intkbscr ;init keyboard else mov #%00100001,intkbscr ; endif mov #%00011110,intkbier ; sleep bset ackk,intkbscr ;clear possible keyboard interrupt before stop bset led,porta ;power off led bclr pllen,porta ;stop pll of tango ; ; warning !!!!! stop instruction does not work with mmds/mmevs ; ifdef emulated f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 128 source code motorola source code stopproc cli ;emulated stop instruction nop ; bra stopproc else stopproc stop ; nop ; bra stopproc endif keybirq brclr 7,intkbscr,keyboardproc ;check if irq intetrrupt jmp irqproc ; keyboardproc bset 2,intkbscr ;reset keyboard flag bclr led,porta ;led on clrx ; waitrow lda porta ;read key row coma ; and #%00011110 ; lsra ; bne rowok ; dbnza $ ; dbnzx waitrow ;if row=0 wait until timeout jmp exitkeyb ;row timeout rowok sta lastrow ;save row number clr intkbier ;clear keyboard interrupt enable bits lda #%00011110 ;all rows to 1 ora ddra ; sta ddra ; lda #%00011110 ; ora porta ; sta porta ; clrx ; mov #$10,bitcount ; colloop lda #$40 ; keyloop dbnzx keyloop ; dbnza keyloop ;wait 49152 cycles f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code transmitter firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 129 waitcol lda porta ;get column and #%01100000 ; nsa ; lsra ; bne colok ; dbnz bitcount,colloop ;if row=0 wait until timeout jmp exitkeyb ;column timeout colok sta lastcol ;save column lda #$02 ;decode key brset 0,lastrow,setcol ; lda #$04 ; brset 1,lastrow,setcol ; lda #$06 ; brset 2,lastrow,setcol ; lda #$01 ; setcol brclr 1,lastcol,setkey ; ora #$80 ; ;init transmission buffer setkey sta buffer4 ;init key code clr buffer0 ; lda id0 ;init id sta buffer1 ; lda id1 ; sta buffer2 ; lda id2 ; sta buffer3 ; lda #dly300ms ;wait for the time specified in accumulator psha ; clra ; clrx ; toggledly dbnzx $ ;[3*256=768] dbnza toggledly ;[256*771] dbnz 1,sp,toggledly ;[197379*dly300ms] pula ; lda porta ;check if key still down and #%01100000 ; nsa ; lsra ; bne notoggle ; bset 0,buffer0 ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 130 source code motorola source code notoggle lda #$01 ; add buffer6 ; sta buffer6 ; clra ; adc buffer5 ; sta buffer5 ; lda buffer6 ; and #$0f ; beq norotate ; tax ; nextrotate lda buffer5 ; rora ; ror buffer0 ; ror buffer1 ; ror buffer2 ; ror buffer3 ; ror buffer4 ; ror buffer5 ; dbnzx nextrotate ; norotate ldhx #buffer0 ; lda ,x ; eor 1,x ; sta 1,x ; eor 2,x ; sta 2,x ; eor 3,x ; sta 3,x ; eor 4,x ; sta 4,x ; eor 5,x ; sta 5,x ; ; calculate crc clr crc ; ldhx #buffer6 ; nextcrcbyte mov #$08,bitcount ; nextcrcbit lda 0,x ; eor crc ; lsr crc ; and #$01 ; beq noxor ; lda #%10001100 ; eor crc ; sta crc ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code transmitter firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 131 noxor lda 0,x ; rora ; ror 0,x ; dbnz bitcount,nextcrcbit ; decx ; cpx #buffer0-1 ; bne nextcrcbyte ; lda crc ; ror crc ; rora ; nsa ; sta crc ; ;################################################################################ ;# # ;# data timing # ;# # ;# timing is derived from tango dataclock signal (tango xtal/64) that is # ;# 212khz@13.560mhz (4.717 us period). # ;# tango dataclock is used as timer module clock by mcu. when external clock # ;# is used by timer module the prescaler is not available and the clock is # ;# directly to the timer counter. # ;# # ;################################################################################ ;transmission loop mov #ddrainit,ddra ; mov #portainit,porta ; mov #%00011110,intkbier ; mov #mintx,txcnt ; bset pllen,porta ; mov #%00110111,tascr ;stop and reset timer nextframe bset data,portb ; ldx #framedly ; clra ; frameblank clr tasc0 ; dbnza $ ; dbnzx frameblank ; mov #%00110111,tascr ;stop and reset timer bclr data,portb ; mov #%00010010,tasc0 ; ldhx #$0300 ;timer modulo=$0300 (3.622ms) sthx tamodh ; ldhx #$0180 ;compare value=$0180 (0.603ms) sthx tach0h ; bclr 7,tasc0 ;clear flag f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 132 source code motorola source code mov #%00011110,tasc0 ;set on compare and toggle on overflow bclr 7,tascr ;clear flag bclr 5,tascr ;start timer brclr 7,tascr,* ;wait mov #%00110111,tascr ;stop timer ldhx #$00d2 ;timer modulo=$00d2 (990us) sthx tamodh ; clr tach0h ; lda #$46 ; sta tach0l ;compare value=1/3 bit time ldhx #crc ;hx points to crc psha ;space in stack for bit counter mov #%00011110,tasc0 ;set on compare and toggle on overflow bclr 5,tascr ;start timer nexttxbyte lda #$08 ;init bit counter sta 1,sp ; nexttxbit lda 0,x ; rora ; ror 0,x ; clr tach0h ; lda #$46 ;compare value=1/3 bit time if bit=1 bcs bit1 ; lsla ;compare value=2/3 bit time if bit=0 bit1 sta tach0l ; brclr 7,tascr,* ;wait bclr 7,tascr ;clear flag dbnz 1,sp,nexttxbit ; decx ; cpx #buffer0-1 ; bne nexttxbyte ; mov #%00110111,tascr ;stop timer pula ;free stack clra ; dbnza $ ; tst txcnt ; beq chkkey ; dbnz txcnt,nextframe ; chkkey lda porta ; coma ; and #%00011110 ; bne nextframe ; bclr pllen,porta ; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
source code transmitter firmware remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola source code 133 exitkeyb mov #ddrainit,ddra ; mov #portainit,porta ; mov #%00011110,intkbier ; waitkeyup lda porta ; coma ; and #%00011110 ; bne waitkeyup ; bset ackk,intkbscr ; bset led,porta ; tst 5,sp ;test return address low bne declow ; dec 4,sp ; declow dec 5,sp ; rti ; irqproc bset 6,intkbscr ;reset irq flag rti id0 dc.b $54 id1 dc.b $23 id2 dc.b $f4 end f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 134 source code motorola source code f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola schematics 135 designer reference manual ? remote keyless entry appendix b. schematics this appendix includes:  mother board schematic ? figure b-1  receiver schematic ? figure b-2  transmitter schematic ? figure b-3 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 136 schematics motorola schematics figure b-1. mother board schematic f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola schematics 137 schematics figure b-2. receiver schematic 25 28 32 cn2 cn4 24 cn2 cn5 23 cn2 cn6 33 cn2 cn7 cn2 cn2 17 16 15 14 21 20 1 2 3 18 23 19 vcc vcc1 vdcl vdc0 mikout dmdat ic2 mc33591 5 6 8 9 19 22 12 24 7 11 10 cr1 c5 c3 c8 c11 r3 c10 c12 c4 7 cn2 cn8 gnd 500p 00g 500m xja xja 10n 6p cdg 180k b8n x7a 1u y5v 1u y6v 100 p cdg c8 4 1.4 ? 3 pf 3 mm c19 vcc gndl gnds gnd gnd1 gnd0 cafc cagc dmixago pfd x2 x1 sclk mosi miso resetb strobe robgap 36 cn3 r5 r2 10 k 470 k 1uh cn2 rfin f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 138 schematics motorola schematics figure b-3. transmitter schematic 87 cr1 2 1 bat1 c42032 sw7 sw6 sw3 sw1 sw8 sw5 sw4 sw2 ld1 tl0u1002 330 r14 10 r20 10k r18 10k r22 2 1 32 31 30 28 29 27 3 4 5 20 19 18 17 16 15 pta0 pta1/kbd1 pta2/kbd2 pta3/kbd3 pta4/kbd4 pta5/kbd5 pta6/kbd6 pta7 ptb0/mclk ptb1 ptb2/tcho ptb3/tclk dclk data band pllen mode osc1 21 1u ybv c8 r18 r16 1k 1k cne 10 10k 10 r21 r19 r23 cn5 cn4 gnd osc2 vss x0 x1 cfbk pext gndpf gnd 22 23 10 9 13 6 8p c0g c5 12k r17 10n x7r c8 8p c0g c3 22 nh l1 c8 c2 c7 3 mm 1.4 ? 3 pf 100p cob 1u y5v 12 rfout 25 26 24 14 11 irq reset vdd vccpf vcc ic1 hc908rf2rev1 vcc cn1 cn2 cn3 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola board layouts 139 designer reference manual ? remote keyless entry appendix c. board layouts this appendix includes pictorials of the board layouts (top and bottom views) for:  transmitter ? figure c-1 and figure c-2  receiver ? figure c-3 and figure c-4  mother board ? figure c-5 and figure c-6 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 140 board layouts motorola board layouts figure c-1. transmitter layout (top view) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
board layouts remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola board layouts 141 figure c-2. transmitter layout (bottom view) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 142 board layouts motorola board layouts figure c-3. receiver layout (top view) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
board layouts remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola board layouts 143 figure c-4. receiver layout (bottom view) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 144 board layouts motorola board layouts figure c-5. mother board layout (top view) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola board layouts 145 board layouts figure c-6. mother board layout (bottom view) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 146 board layouts motorola board layouts f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola bill of materials 147 designer reference manual ? remote keyless entry appendix d. bill of materials d.1 contents d.2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 d.3 transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148 d.4 receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 d.5 mother board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150 d.2 introduction this appendix provides the remote keyless entry (rke) reference design bill of materials. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 148 bill of materials motorola bill of materials d.3 transmitter transmitter partlist title tx customer motorola author andrea martini rev a1.0 pws rev a0.0 date 09 nov 2001 components ref value package function bat1 pih battery contact c2 100p 0603 capacitor c3 8p 0603 capacitor c5 6p 0603 capacitor c6 1u 0603 capacitor c7 1u 0603 capacitor c8 10n 0603 capacitor c9 1.4-3pf smd trimmer cr1 13.560mhz hc49smx xtal ic1 hc908rf2rev1 lqfp32 micro l1 22nh 008 inductors ld1 led0805 0805 led r14 330 0603 resistor r15 1k 0603 resistor r16 1k 0603 resistor r17 12k 0603 resistor r18 10k 0603 resistor r19 10k 0603 resistor r20 10 0603 resistor r21 10 0603 resistor r22 10k 0603 resistor r23 10 0603 resistor sw keyboard f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
bill of materials receiver remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola bill of materials 149 d.4 receiver receiver partlist title rx board customer motorola author andrea martini rev a1.0 pws rev a0.0.0 date 09/11/01 components ref value package function c10 1u 0603 capacitor c11 6p 0603 capacitor c12 1u 0603 capacitor c13 1.4-3pf 1008 trimmer c3 100n 0603 capacitor c4 68n 0603 capacitor c5 100p 0603 capacitor c6 10n 0603 capacitor c8 100p 0603 capacitor cr1 13.5806mhz smd3118 xtal ic2 mc33591 lqfp24 ic l1 1uh 1008 inductors r2 470k 0603 resistor r3 180k 0805 resistor r5 10k 0603 resistor f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 150 bill of materials motorola bill of materials d.5 mother board motherboard partlist title motherboard customer motorola author andrea martini rev a0.0 pws rev a0.0.0 date 09/11/00 components ref value package function c34 1u 0603 capacitor c51 100n 0603 capacitor c52 1u 0603 capacitor c57 100n 0603 capacitor c58 470uf 8/16-vert capacitor c59 100n 0603 capacitor c60 10uf 5/11-vert capacitor c61 10uf 5/11-vert capacitor c62 1u 0603 capacitor c63 1u 0603 capacitor c64 1u 0603 capacitor c65 1u 0603 capacitor c66 1u 0603 capacitor cn12 fh40 connector cn13 fh40 connector cn14 fh40 connector cn15 plug2.5mm connector cn29 db9 connector cr1 9.8304mhz dip8 osc d1 1ss355 sod323 diode d2 zra250f01 sot23 reference d3 mbrd835 dpack diode d4 mmsz5225b sod123 zener ic13 mic4416 sot143 mosfet ic14 mic5206bmm msop8 regulator ic15 mic5206 sot23-5 regulator ic16 mic4416 sot143 mosfet ? continued on next page ? f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
bill of materials mother board remote keyless entry (rke) reference design using the mc68hc908rf2 DRM005 motorola bill of materials 151 ref value package function ic17 ea7123i2c lcd ic29 hc908gp32 qfp44 mcu ic30 hn29w128 48tsop memory ic31 74hc04d so14 logic ic33 max533bcee ssop16 dac ic34 lmv321 sc70 operational ic35 74hc125d so14 logic ic36 max232so so16w interface ic37 74hc139d so16 logic mos1 irl9024 d-pack mosfet q1 smbt3904 sot23 bjt r12 10k 0603 resistor r13 10k 0603 resistor r17 10k 0603 resistor r2 56k 0603 resistor r21 10k 0603 resistor r22 10k 0603 resistor r24 1k 0603 resistor r25 1k 0603 resistor r26 10k 0603 resistor r27 100k 0603 resistor r28 100k 0603 resistor r3 10k 0603 resistor r30 10k 0603 resistor r31 10k 0603 resistor r32 10k 0603 resistor r33 10k 0603 resistor r34 10k 0603 resistor r35 10k 0603 resistor r36 470 0603 resistor r37 1k 0603 resistor r38 1k 0603 resistor r39 1k 0603 resistor r7 10k 0603 resistor r9 10k 0603 resistor sw4 ec11b15242 oriz switches sw5 sw5511m1x pih switches f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
DRM005 remote keyless entry (rke) reference design using the mc68hc908rf2 152 bill of materials motorola bill of materials f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
how to reach us: usa/europe/locations not listed: motorola literature distribution; p.o. box 5405, denver, colorado 80217 1-303-675-2140 or 1-800-441-2447 japan: motorola japan ltd.; sps, technical information center, 3-20-1, minami-azabu minato-ku, tokyo 106-8573 japan 81-3-3440-3569 asia/pacific: motorola semiconductors h.k. ltd.; silicon harbour centre, 2 dai king street, tai po industrial estate, tai po, n.t., hong kong 852-26668334 technical information center: 1-800-521-6274 home page: http://www.motorola.com/semiconductors information in this document is provided solely to enable system and software implementers to use motorola products. there are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. ? typical ? parameters which may be provided in motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. all operating parameters, including ? typicals ? must be validated for each customer application by customer ? s technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and the stylized m logo are registered in the u.s. patent and trademark office. digital dna is a trademark of motorola, inc. all other product or service names are the property of their respective owners. motorola, inc. is an equal opportunity/affirmative action employer. ? motorola, inc. 2002 DRM005/d f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .


▲Up To Search▲   

 
Price & Availability of DRM005

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X