Part Number Hot Search : 
AQV204AX MC543050 CIL10NR3 A1205 LR40993 FW250 F103M PE91006
Product Description
Full Text Search
 

To Download TRW-24G Datasheet File

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


  Datasheet File OCR Text:
  http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datashee t p. 1 wenshing ?? t r w - 24g rf module wireless high frequency transceiver module (rf gfsk) version history version date changes v1.01 jun 13 , 2007 1 st. edition v1.02 aug 20 , 2007 2 nd. edition v1.0 3 mar 15 , 2008 3 rd. edition v1.04 may 7, 2008 4 th. edition v1.05 feb 28, 2011 5 th edition v2.00 may 12 , 2011 add in direct mode
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 2 content 1 product de scription ................................ ................................ ................................ ....... 3 1.1 key feature ................................ ................................ ................................ ................... 3 2 block diagram ................................ ................................ ................................ ............... 4 3 pin function ................................ ................................ ................................ .................. 4 4 hardware specification ................................ ................................ ................................ .. 5 4.1 specification ................................ ................................ ................................ .................. 5 4.2 reference schematics ................................ ................................ ................................ ... 6 5 configuration and operation modes ................................ ................................ ............. 7 5.1 configuration mode ................................ ................................ ................................ ....... 8 5. 1. 1 configuration of shockburst tm operation: ................................ ................................ .... 8 5.1.2 configuration for direct mode operation ................................ ................................ ....... 8 5.1.3 configuration word detailed description ................................ ................................ ...... 9 5.2 shockburst tm configuration ................................ ................................ ......................... 10 5.3 general device configuration ................................ ................................ ...................... 12 5.4 data packa ge description ................................ ................................ ............................ 14 5.5 shockburst tm ................................ ................................ ................................ ............... 15 5.5.1 shockburst tm principle ................................ ................................ ................................ 15 5.5.2 trw - 24g shockburst tm transmit ................................ ................................ ................ 16 5.5.3 trw - 24g shockburst tm receive ................................ ................................ ................. 18 5.5.4 duoceiver tm simultaneous two channel receive mode ................................ .............. 18 5.6 direct mode ................................ ................................ ................................ ................. 20 5.6.1 direct mode transmit: ................................ ................................ ................................ . 20 5.6.2 direct mod e receive: ................................ ................................ ................................ ... 20 5.6.3 duoceiver? simultaneous two channel receive mode ................................ ............. 20 6 important timing data ................................ ................................ ................................ . 31 6.1 configuration mode timing ................................ ................................ .......................... 33 6.1. 1 shockburst tm mode timing ................................ ................................ .......................... 33 6.1.1.1 shockburst tm tx : ................................ ................................ ................................ ........ 33 6.1.1.2 shockburst tm rx ................................ ................................ ................................ ......... 34 6.2 output power adjustment ................................ ................................ ............................ 34 7 trw - 24g mechanical drawing ................................ ................................ ..................... 35 appendix 1 demo program - em78p 156e mcu ................................ ................................ .............. 37 2 demo program - c8051f330 mcu ................................ ................................ ................ 54
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 3 1 product description trw - 24g is a wireless transceiver module which adopts 2.4g ism band with printed ant enna on board to provide the optimal transmission and reception in signal. trw - 24g is a good solution for short and medi an range applications, such as wireless joysticks, cordless phone, wireless earphone, wireless mo use and key board, due to its adjustable transmission power level. it is also suitable for surveillance system because of its frequency hopping technology which provides a safe 1.1 key feature ? frequency range: 2.4~2.527ghz ? modulation: gfsk ? work voltage: 3v ? c hannel no.: 128 ch ? output power: max. 0 dbm. ? active mode : shockburst mode and direct mode ? data rate: 1 mbps at shockburst mode 250 kbps at direct mode ? transmission range : 150m at shockburst mode 280m at direct mode ? max two channels active simultaneously ? built - in antenna. ? low power consumption: active@1mbps: 25 ma standby: 12 ua ? operating temperature: - 10 ~+ 70 ? application : wireless joysticks, wireless speaker, wireless earphone , wireless cell phone , wireless intercom , wireless mouse, wireless keyboard surveillance and security system and data communication.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 4 2 block diagram this block diagram details the whole structure of this module which allows user to adopt two channels simultaneously without adding any extra components except micro - controller. we shall have reference schematic how this module works with micro - controller in the subsequence. 3 pin fu nction pin name category i/o description 1 clk1 digital input/output for channel 1 clock tx : clock input rx: clock input/output 2 cs digital input chip selection activates configuration mode 3 clk2 digital input/output for channel 2 clock rx: clock inpu t/output 4 ce digital input chip enable to active rx / tx mode h: tx mode l: rx mode 5 gnd power ground 6 vcc power power supply 7 dr2 digital output data ready for channel 2 to output (*) h: data ready for accessing 8 dout digital output channel 2 data output 9 dr1 digital output data ready for channel 1 to output (*) h: data ready for accessing 10 data power input/output data pin can act as channel 1 data output and configuration data input pin. cs = h, configuration data input cs = l, channel 1 data output * dr1 & dr2 are only available for shockburst mode.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 5 4 hardware specification 4.1 specification conditions: vdd = +3v, vss = 0v, ta = - 40oc to + 85oc 1) usable band is determined by local regulations 2) the crystal frequency may be chosen from 5 different values (4, 8, 12, 16, and 20mhz) which are specified in the configuration word, see table 9. 16mhz are required for 1mbps operation. 3) data rate must be either 250kbps or 1000kbps. 4) antenna load imped ance = 100w+j175w 5) antenna load impedance = 100w+j175w. effective data rate 250kbps or 1mbps. 6) antenna load impedance = 100w+j175w. effective data rate 10kbps. 7) current if 4 mhz crystal is used. 8) 250kbps / 1000kbps.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 6 4.2 reference schematics attached reference schematics give an example how to have trw - 24g module to work with micro - controller, it might be 8051, chips of microchip or any embedded soc, to communicate with host through rs - 232 interface. u4 is rs - 232 transceiver chip which converts signal s level.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 7 5 configuration and operation modes trw - 24g 2.4ghz module has three modes, active, configuration and stand by; which depends on the setting of signal ce and cs. the following table details the setting. mode ce cs active (rx/tx) 1 0 configuration 0 1 stand by 0 0 device allows user to have two communication models in active mode C direct mode and shockburst to transmit and receive data from remote parties. it depends on the content of configuration to set up the working models . configuration mode allows user to setup the following settings: 1. communication mode : direct mode shockburst mode 2. transmit power 3. frequency selection for channel 1 & 2 4. data rate 5. one / two receiving simultaneously stand - by mode is used t o minimize average c urrent cons umption while maintaining short start up times . the configuration word content is maintained during stand by. the following introduction shall commence from configuration setting
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 8 5.1 configuration mode all configuration of thetrw - 24g is done via 3 - wire interface to a single configuration register. the configuration word can be up to 15 bytes long for shockburst tm . 5.1 .1 configuration of shockburst tm operation: the configuration word in shockburst tm enables thetrw - 24g to handle the rf protocol. once the p rotocol is completed and loaded intotrw - 24g only one byte, bit [7:0], needs to be updated during actual operation. the configuration blocks dedicated to shockburst tm is as follows: 1. payload section width: specifies the number of payload bits in a rf package . this enables thetrw - 24g to distinguish between payload data and the crc bytes in a received package. 2. address width: sets the number of bits used for address in the rf package, this enables thetrw - 24g to distinguish between address and payload data. 3. addr ess (rx channel 1 and 2): destination address for received data. 4. crc: enables trw - 24g on - chip crc generation and de - coding. note these configuration blocks, with the exception of the crc, are dedicated for the packages that a trw - 24g is to receive. in tx mode, the mcu must generate an address and a payload section that fits the configuration of the trw - 24g that is to receive the data. when using thetrw - 24g on - chip crc feature ensure that crc is enabled and uses the same length for both the tx and rx devic es. pre - amble address payload crc figure 1 data packet set - up 5.1.2 configuration for direct mode operation for direct mode operation only the two first bytes (bit[15:0]) of the configuring word are relevant. configuration word overview bit position number of bits name function shockburst? configuration 143:120 24 test reserved for testing 119:112 8 data2_w length of data payload section rx channel 2 111:104 8 data1_w length of data payload section rx channel 1 103:64 40 a ddr2 up to 5 byte address for rx channel 2 63:24 40 addr1 up to 5 byte address for rx channel 1 23:18 6 addr_w number of address bits (both rx channels). 17 1 crc_l 8 or 16 bit crc 16 1 crc_en enable on - chip crc generation/checking.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 9 b it position number of bits name function general device configuration 15 1 rx2_en enable two channel receive mode 14 1 cm communication mode (direct or shockburst?) 13 1 rfdr_sb rf data rate (1mbps requires 16mhz crystal) 12:10 3 xo_f crys tal frequency 9:8 2 rf_pwr rf output power 7:1 7 rf_ch# frequency channel 0 1 rxen rx or tx operation table 1 table of configuration words the configuration word is shifted in msb first on positive clk 1 edge, n ew configuration is enabled on the falling edge of cs. note on the falling edge of cs, the trw - 24g updates the number of bits actually shifted in during the last configuration. ex ample if the trw - 24g is to be configured for 2 channel rx in shockburst tm , a total of 120 bits must be shifted i n during the first configuration after vdd is applied. once the wanted protocol, modus and rf channel are set, only one bit (rxe n) is shifted in to switch between rx and tx. 5.1.3 configuration word detailed description the following describes the function of t he 144 bits (bit 143=msb) that is used t o configure the trw - 24g general device configuration: bit [15:0] shockburst tm configuration: bit [119:0] test configuration: bit [143:120]
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 10 table 2 configuration data word the msb bit should be loaded first into the configuration register. default configuration word: h8e08.1c20.2000.0000.00e7.0000.0000.e721.0f04. 5.2 shockburst tm configuration the section b[119:16] contains the segments of the configuration register dedicated to shockburst tm operational prot o col. after vdd is turned on s hockburst tm configuration is done once and remains set whilst vdd is present, during operation only the first byte for frequency channel and rx/tx switching need to be changed. pll_ctrl pll ctrl d121 d120 pll 0 0 open tx / c losed rx 0 1 open tx / open rx 1 0 closed tx / closed rx 1 1 closed tx / open rx table 3 pll setting bit 121 - 120: pll_ctrl: controls the setting of the pll for test purposes. with closed pll in tx no deviation will be present. for normal operational mode these two bits must both be low. datax_w table 4 number of bits in payload bit 119 - 112: data2_w: length of rf package payload section for receive - channel 2. bit 111 - 104: data1_w: length of rf package payload section for receive - channel 1. data2_w 119 118 117 116 115 114 113 112 data1_w 111 110 109 108 107 106 105 104
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 11 note the total number of bits in a shockburst tm rf package may not exceed 256! maximum length of payload section is hence given by: datax_w(bits)=256 - addr_w - crc where: addr_w: length of rx address set in configuration word b[23:18] crc: check sum, 8 or 16 bits set in configuration word b[17] pre: preamble, 4 or 8 bits are automatically included shorter address and crc leaves more room for payload data in each package. addrx a ddr2 103 102 101 .. 71 70 69 68 67 66 65 64 addr1 63 62 61 .. 31 30 29 28 27 26 25 24 table 5 address of receiver #2 and receiver #1 bit 103 - 64: addr2: receiver address channel 2, up to 40 bit. bit 63 - 24: addr1: receiver address channel 1, up to 40 bit. note bits in addrx exceeding the address width set in addr_w are redundant and can be set to logic 0. addr_w & crc addr_w crc_l crc_en 23 22 21 20 19 18 17 16 table 6 number of bits reserved for rx address + crc setting bit 23 - 18: addr_w: number of bits reserved for rx address in shockburst tm packages. note maximum number of address bits is 40 (5 bytes). values over 40 in a ddr_w are not valid. bit 17: crc_l: crc length to be calculated by trw - 24g in s hockburst. logic 0: 8 bit crc logic 1: 16 bit crc bit 16: crc_en: enables on - chip crc generation (tx) and verification (rx). logic 0: on - chip crc generation/checking disabled logic 1: on - chip crc generation/checking enabled note an 8 bit crc will increase the number of payload bits possible in each s hockburst tm data packet, but will also reduce the system integri t y.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 12 5.3 general device configuration this section of the configuration word handles rf and device related parameters m odes: rx2_en cm rfdr_sb xo_f rf_pwr 15 14 13 12 11 10 9 8 table 7 rf ope rational settings bit 15: rx2_en: logic 0: one channel receive logic 1: two channels receive note in two channels receive, the trw - 24g receives on two, separate frequency channels simultaneously. the frequency of receive channel 1 is set in the configurati on word b[7 - 1], receive channel 2 is always 8 channels (8 mhz) above receive channel 1. bit 14: communication mode: logic 1: operates in shockburst tm mode bit 13: rf data rate: logic 0: 250 kbps logic 1: 1 mbps note utilizing 250 kbps instead of 1 mbps w ill improve the receiver sensitivity by 10 db. 1 mbps requires 16mhz crystal. bit 12 - 10: xo_f: selects the crystal frequency to be used. default to be 16mhz. xo frequency selection d12 d11 d10 mhz 0 0 0 4 0 0 1 8 0 1 0 12 0 1 1 16 1 0 0 20 table 8 crystal frequency setting bit 9 - 8: rf_pwr: sets trw - 24g rf output power in transmit mode:
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 13 rf output power d9 d8 p[dbm] 0 0 - 20 0 1 - 10 1 0 - 5 1 1 0 table 9 rf output power setting rf channel & direction rf ch# rxen 7 6 5 4 3 2 1 0 table 10 frequency channel + rx/tx setting bit 7 - 1: rf_ch#: sets the frequency channel the nrf2401 operates on. the channel frequency in transmit is given by: channel rf = 2400 mhz + rf_ch# ? 1.0 mhz rf_ch # : between 2400mhz and 2527mhz may be set. the c hannel frequency in data channel 1 is given by: channel rf = 2400 mhz + rf_ch# ? 1.0 mhz (receive at pin#8) rf_ch # : between 2400mhz and 2524mhz may be set. note the channels above 83 can only be utilized in certain territories (ex: japan) the channel fre quency in data channel 2 is given by: channel rf = 2400 mhz + rf_ch# ? 1.0 mhz + 8mhz (receive at pin#4) rf_ch # : between 2408mhz and 2524mhz may be set. bit 0: set active mode: logic 0: transmit mode logic 1: receive mode
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 14 5.4 data package description t he data packet for both shockburst tm mode and direct mode communic ation is divided into 4 sections. these are: figure 2 data package diagram hereby is the information in detail about these 4 sections. pre - amble address payload crc 1. preamble ? the prea mble field is required in shockburst and direct mode ? preamble is 8 bits in length and is dependent of the first data bit in direct mode. preamble 1st addr - bit 01010101 0 10101010 1 2. address ? the address field is required in sho ckburst mode. ? 8 to 40 bits length. ? address automatically removed from received packet in s hockburst mode . in direct mode mcu must handle address 3. payload ? the data to be transmitted ? in shock - burst mode payload size is 256 bits minus the f ollowing: (a ddress: 8 to 40 bits. + crc 8 or 16 bits). 4. crc ? the crc is optional in shockburst? mode, and is not used in direct mode ? 8 or 16 bits length ? the crc is removed from the received output data in shockburst? rx. .
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 15 5.5 shockburst tm the shockbu rst tm technology uses on - chip fifo to clock in data at a low data rate and transmit at a very high rate thus enabling extremely power reduction. when operation t he trw - 24g in s hockburst tm ,you gain access to the high data rates(1 mbps)offered by the 2.4ghz band without the need of a costly, high - speed micro controller (mcu) for data processing. by putting all high speed signal processing related to rf protocol on - chip, the trw - 24g offers the following benefits: 1. highly reduced current consumption. 2. lower syst em cost (facilitates use of less expensive micro controller). 3. greatly reduced risk of on - air collisions due to short transmission time. the trw - 24g can be programmed using a simple 3 - wire interface where the data rate is decided by the speed of the micro controller. by allowing the digital part of the application to run at low speed while maximizing the data rate on the rf link, the nrf shockburst tm mode reduces the average current consumption in applications considerably. 5.5.1 shockburst tm principle when the trw - 24g is configured in shockburst tm , tx or rx operation is conducted in the following way (10 kbps for the example only). figure 3 clocking in data with mcu and sending with shockburst tm technology time ms figure 4 current consumptio n with & without shockburst tm technology
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 16 figure 5 flow chart shockburst tm transmit of trw - 24g 5.5.2 trw - 24g shockburst tm transmit mcu interface pins:ce,clk1,data 1. when the application mcu has data to send, set ce high. this activates trw - 24g on - board dat a processing. 2. the address of the receiving node(rx address) and payload data is clocked into the trw - 24g. the application protocol or mcu sets the speed <1mbps(ex:10kbps)>. 3. mcu sets ce low, this activates a trw - 24g shockburst tm transmission. 4. trw - 24g shockb urst tm : ? rf front end is powered up. ? rf package is completed (preamble added, crc calculated). ? data is transmitted at high speed (250kbps or 1 mbps configured by user). ? trw - 24g return s to stand - by when finished.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 17 figure 6 flow char t shockburst tm receive of trw - 24g.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 18 5.5.3 trw - 24g shockburst tm receive mcu interface pins: ce, dr1, clk1 and data (one rx channel receive) 1. correct address and size of payload of incoming rf packages are set when trw - 24g is configured to shockburst tm rx. 2. to act ivate rx , set ce high. 3. after 200us settling, trw - 24g is monitoring the air for incoming communication. 4. when a valid package has been received (correct address and crc found), trw - 24g removes the preamble, address and crc bits. 5. trw - 24g then notifies (inter rupts) the mcu by setting the dr1 pin high. 6. mcu may (or may not) set the ce low to disable the rf front end (low current mode). 7. the mcu will clock out just the payload data at a suitable rate (ex,10 kbps). 8. when all payload data is retrieved trw - 24g sets dr 1 low again, and is ready for new incoming data package if ce is kept high during data download. if the ce was set low, a new start up sequence can begin, see figure 12. 5.5.4 duoceiver tm simultaneous two channel receive mode in shockburst tm mode the trw - 24g c an facilitate simultaneous reception of two parallel independent frequency channels at the maximum data rate. this means: 1. trw - 24g can rec eive data from two 1mbps transmitters (ex: trw - 24g or trw - 24g) 8mhz (8 frequency channels) apart through one antenna in terface. 2. the output from the two data channels is fed to two separate mcu interfaces. 3. data channel 1:clk1,data,and dr1 4. data channel 2:clk2,dout2,and dr2 5. dr1 and dr2 are available only in shockburst tm . the trw - 24g duoceiver tm technology provides 2 separat e dedicated dat a channels for rx and replaces the need for two, stand alone receiver systems. figure 7 simultaneous 2 channel receive on trw - 24g
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 19 there is one absolute requirement for using the second data channel. for the trw - 24g to be able to receive at the sec ond dat a channel the frequency channel must be 8mhz higher than the frequency of dat a channel 1. the trw - 24g must be programmed to receive at the frequency of data channel 1. no time multiplexing is used in trw - 24g to fulfil this function. in di rect mode the mcu must be able to handle two simultaneously incoming data packets if it is not multiplexing between the two dat a channels. in shockburst tm it is possible for the mcu to clock out one data channel at a time while data on the other data chann el waits for mcu availability, without any lost data packets, and by doing so reduce the needed performance of the mcu. figure 8 duoceiver tm with two simultaneously independent receive channels
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 20 5.6 direct mode in direct mode the nrf2401 works like a traditional rf device. data must be at 1mbps 200ppm, or 250kbps 200ppm at low data rate setting, for the receiver to detect the signals. 5.6.1 direct mode transmit mcu interface pins: ce, data 1. when application mcu has data to send, set ce high 2. the nrf2401 rf front end is now immediately activated, and after 200 ms settling time, data will modulate the carrier directly. 3. all rf protocol parts must hence be implemented in mcu firmware (preamble, address and crc). 5.6.2 direct mode receive mcu interface pins: ce, clk1, and data 1. once the nrf2401 is configured and powered up (ce high) in direct rx mode, data will start to toggle due to noise present on the air. 2. clk1 will also start to toggle as nrf2401 is trying to lock on to the incoming data stream. 3. once a valid preambl e arrives, clk 1 and da ta will lock on to the incoming signal and the rf package will appear at the da ta pin with the same speed as it is transmitted. 4. to enable the demodulator to re - generate the clock, the preamble must be 8 bits toggling hi - low, starting with low if the first data bit is low. 5. in this mode no dat a ready (dr) signals is available. address and checksum verification must also be done in the receiving mcu . 5.6.3 duoceiver? simultaneous two channel receive mode in direct mode , it can facilitate simult aneous reception of two parallel independent frequency channels as shockburst tm mode. please refer to section 5.5. 4 .
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 21 trw - 24g shockburst mode configuration data start s from msb . example 1 : shockburst transmitting mode channel freq: 2410m h z, dat a rate : 1 mbps bit143 bit142 bit141 bit140 bit139 bit138 bit137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit1 17 bit116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit2 5 bit24 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 0 1 1 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 0
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 22 example 2 : shockburst receiving mode channel freq: 2410m h z, data rate : 1 mbps bit143 bit142 bit141 bit140 bit139 bit138 bit137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit 92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 b it61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit24 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 0 1 1 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 1
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 23 exa mple 3 : shockburst transmitting mode channel freq: 2410m h z, data rate : 250 kbps bit143 bit142 bit141 bit140 bit139 bit138 bit137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bi t96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit3 5 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit24 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 0 1 0 0 1 1 1 1 bit7 bit6 bit5 bit4 bi t3 bit2 bit1 bit0 0 0 0 1 0 1 0 0
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 24 example 4 : shockburst receiving mode channel freq: 2410m h z, data rate : 250 kbps bit143 bit142 bit141 bit140 bit139 bit138 bit137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit 128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit10 2 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit24 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 0 1 0 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 1
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 25 example 5 : shockburst due - channel transmitting mode channel freq: 2410m h z, data rate : 250 kbps bit143 bit142 bit141 bit140 bit139 bit138 bit1 37 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bi t48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit24 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 1 1 1 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 1
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 26 example 6 : shockburst due - channel receiving mode channel freq: 2410m h z, data rate : 250 kbps bit143 bit142 bit141 bit140 bit139 bit138 bit137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit 116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit2 4 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 1 1 0 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 1
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 27 trw - 24g direct mode configuration da ta start s from msb . example 7 : direct mode transmitting mode channel freq: 2410m h z, data rate : 250 kbps bit143 bit142 bit141 bit140 bit139 bit138 bit137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit 70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 b it39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit24 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 0 0 0 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 0
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 28 example 8 : direct mode receiving mode channel freq: 2410m h z, data rate: 250 kbps bit143 bit142 bit141 bit140 bit139 bit138 bit137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit 42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit24 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 b it11 bit10 bit9 bit8 0 0 0 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 1
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 29 example 9 : direct mode due - channel transmitting mode channel freq: 2410m h z, data rate : 250 kbps bit143 bit142 bit141 bit140 bit139 bit138 bi t137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit1 11 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit24 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit1 8 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 1 0 0 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 1
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 30 example 1 0 : direct mode due - channel receiving mode channel freq: 2410m h z, data rate : 250 kbps bit143 bit142 bit141 bit140 bit139 bit138 bit137 bit136 1 0 0 0 1 1 1 0 bit135 bit134 bit133 bit132 bit131 bit130 bit129 bit128 0 0 0 0 1 0 0 0 bit127 bit126 bit125 bit124 bit123 bit122 bit121 bit120 0 0 0 1 1 1 0 0 bit119 bit118 bit117 bit 116 bit115 bit114 bit113 bit112 1 1 0 0 1 0 0 0 bit111 bit110 bit109 bit108 bit107 bit106 bit105 bit104 1 1 0 0 1 0 0 0 bit103 bit102 bit101 bit100 bit99 bit98 bit97 bit96 1 1 0 0 0 0 0 0 bit95 bit94 bit93 bit92 bit91 bit90 bit89 bit88 1 0 1 0 1 0 1 0 bit87 bit86 bit85 bit84 bit83 bit82 bit81 bit80 0 1 0 1 0 1 0 1 bit79 bit78 bit77 bit76 bit75 bit74 bit73 bit72 1 0 1 0 1 0 1 0 bit71 bit70 bit69 bit68 bit67 bit66 bit65 bit64 0 1 0 1 0 1 0 1 bit63 bit62 bit61 bit60 bit59 bit58 bit57 bit56 1 0 1 0 1 0 1 0 bit55 bit54 bit53 bit52 bit51 bit50 bit49 bit48 0 1 0 1 0 1 0 1 bit47 bit46 bit45 bit44 bit43 bit42 bit41 bit40 1 0 1 0 1 0 1 0 bit39 bit38 bit37 bit36 bit35 bit34 bit33 bit32 0 1 0 1 0 1 0 1 bit31 bit30 bit29 bit28 bit27 bit26 bit25 bit2 4 1 0 1 0 1 0 1 0 bit23 bit22 bit21 bit20 bit19 bit18 bit17 bit16 1 0 1 0 0 0 1 1 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 1 0 1 0 1 1 1 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 0 0 1 0 1 0 1
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 31 6 important timing data the following timing app lies for operation of trw - 24g module trw - 24g timing information: table 11 switching times for trw - 24g when the trw - 24g is in power down it must always settle in stand - by(tpd2sby) before it can enter configuration or one of the active modes. figure 9 timing diagram for trw - 24g (or vdd off) to stand by mode. figure10 vdd off to active mode
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 32 note that the configuration word will be lost when vdd is turned off and that the device then must be configured before going to one of the active modes. if the device is configured one can go directly from power down to the wanted active mode. note ce and cs may not be high at the same time. setting one or the other decides whether configuration or activ e mode is entered.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 33 6.1 configuration mode timing when one or more of the bits in the configuration word needs to be changed the following timing apply. figure 11 timing diagram for configuration of trw - 24g if configuration mode is ente red from power down, cs can be set high aft er tpd2sby as shown in figure 8 6.1.1 shockburst tm mode timing 6.1.1.1 shockburst tm tx figure 12 t iming of shockburst tm in tx
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 34 the package length and the data rate give the delay toa (time on air), as shown in the equation. t oa = 1/ datarate(#databits + 1) 6.1.1.2 shockburst tm rx figure 13 timing of shockburst tm in rx the ce may be kept high during downloading of data, but the cost is higher c urrent consumption (18ma) and the benefit is no start - up time(200s) after the dr1 goes low. 6.2 output power adjustment conditions: vdd= 3.0v, vss= 0v, t a = 27 , load impedance =400
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 35 7 trw - 24g mechanical drawing
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 36 appendix
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 37 1 demo program - em78p156e mcu TTTTTTT TTTTTTTTTTTTTTTTTT TTTTTtrw - 24g test programTTTTTTTTT TTTTT mcu: em78p156eTTTTTTT TTTTTmcu crystall:6mhzTTTTT TTTTTrf crystall:20mhzTTTTTT TTTTTTTTTTTTTTTTTTTTTTTTT ; ; ________________ ; pw -- p52 p51 -- t_led1 ; -- p53 p50 -- r_led1 ; -- tcc osci -- ; -- /rst osco -- ; -- vss vcc -- ; key_1 -- p60 p67 -- cs ; key_2 -- p61 p66 -- dr1 ; -- p62 p65 -- clk1 ; ce -- p63 p64 -- data ; ; em78p156e ; ; ------------------------------------------------------- tcc equ 0x1 p5 equ 0x5 p6 equ 0x6 flag equ 0x1f byte equ 0x1e r0 equ 0x1d
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 38 dly_reg equ 0x1c key_reg equ 0x1b timer_reg equ 0x1a ; ------------------------------------------------------- org 0x0 jmp reset jmp int_0 org 0x8 jmp int_1 rf_config_table: mov a, r0 add 0x2, a retl 0x8e ; test ret l 0x08 retl 0x1c retl 0x20 ; data2_w retl 0x0d0 ; data1_w retl 0x0bb ; addr2 retl 0x0bb retl 0x0bb retl 0x0bb retl 0x0bb
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 39 retl 0x12 ; addr1 retl 0x34 retl 0x56 retl 0x78 retl 0x9a retl 0x0a1 ; addr_w/crc retl 0x53 ; rf - programming retl 0x02 ; ----------------------------------------------- address_table: mov a, r0 add 0x2, a retl 0x12 ; addr1 retl 0x34 retl 0x56 retl 0x78 retl 0x9a ; --------- -------------------------------------- reset: mov a, @0x0 iow 0xf iow 0xe mov a, @0x0ff iow 0xb mov a, @0x0f8
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 40 iow 0xd mov a, @0x08 ; p5, 0 - led p5,1 - led p5,2 - pw p5,3 - crystall_slect iow 0x5 mov a, @0x47 ; p6, 0 - key p6,1 - key p6,2 - key p6,3 - ce iow 0x6 ; p6,4 - data p6,5 - clk1 p6,6 - dr1 p6,7 - cs bc p6, 3 ; ce bc p6, 7 ; cs mov a, @0x0d ;wdt contw mov a, @0x80 iow 0xe ; watchdog enable mov a, @0x2f mov 0x 3f, a mov a, @0x10 mov 0x4, a clear_reg: clr0x0 inc 0x4 djz 0x3f jmp clear_reg mov a, @0x3 mov 0x10, a
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 41 s_led_test: mov a, @0x0ff mov 0x11, a s_led_test1: call delay1ms call delay1ms wdtc jbs 0x11, 7 jmp s _led_off bs p5, 0 ; led bs p5, 1 ; led jmp s_skip s_led_off: bc p5, 0 ; led bc p5, 1 ; led s_skip: djz 0x11 jmp s_led_test1 djz 0x10 jmp s_led_test ; eni ;============================== ========== ;========= main program ================ ;======================================== main_loop: bs p5, 2 ; pw bc p5, 0 ; r_led bc p5, 1 ; t_led bc p6, 3 ; ce
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 42 call delay1ms mov a, p6 and a, @0x 07 mov key_reg, a jbc p5, 3 ; crystall select< 0 - 16m 1 - 20m> bs key_reg, 3 mov a, key_reg and a, @0x03 xor a, @0x0 jbc 0x3, 2 ; z jmp t_model mov a, key_reg and a, @0x03 xor a, @0x1 jbc 0x3, 2 ; z jmp r_model mov a, key_reg and a, @0x03 xor a, @0x03 jbc 0x3, 2 ; z jmp sleep_model jmp main_loop ;======================================== t_model: bc p5, 0 ; r_led
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 43 bc p5, 1 ; t_led call data_pro mov a , @0x1c ; tx_on rx_off mov 0x22, a mov a, @0x4f ; 250k 0db jbc p6, 2 ; <0 - 250k 1 - 1000k> mov a, @0x6f mov 0x30, a mov a, @0x14 ; 2410 mov 0x31, a call rf_config call delay200us call rf_config call del ay200us t_loop: bs p5, 1 ; t_led call rf_send call delay1ms call delay1ms call delay1ms call delay1ms call delay1ms call delay1ms call delay1ms call delay1ms wdtc mov a, p6 and a, @0x07
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 44 mov byte, a jbc p5, 3 ; key bs byte, 3 mov a, byte xor a, key_reg jbc 0x3, 2 ; z jmp t_loop bc p5, 1 ; t_led jmp main_loop ;======================================== r_model: bc p5, 0 ; r_led bc p5, 1 ; t_led c all data_pro mov a, @0x1f ; tx_off rx_on mov 0x22, a mov a, @0x4f ; 250k 0db jbc p6, 2 ; <0 - 250k 1 - 1000k> mov a, @0x6f mov 0x30, a mov a,@0x15 ; 2410 mov 0x31, a call rf_config mov a, @0x10 mov 0x13, a bs p6, 3 ; ce clr tcc
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 45 bc 0xf, 0 ; timer flag mov a, @0x1 iow 0xf ; timer interrupt enable r_sp1: bc p5, 0 ; r_led r_loop1: mov a, @0x060 mov timer_reg, a bc flag, 0 ; interrup t flag djz 0x1 3 jmp r_loop jmp r_model r_loop: wdtc jbc flag, 0 ;interrupt flag jmp r_sp1 mov a, p6 and a, @0x7 mov byte, a jbc p5, 3 ; key bs byte, 3 mov a, byte xor a, key_reg jbs 0x3, 2 ; z jmp r_r et jbs p6, 6 ; dr1 jmp r_loop bs p5, 0 ; r_led mov a, @0x10
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 46 mov 0x13, a call rf_receive call delay1ms jmp r_loop1 r_ret: bc p6, 3 ; ce bc p5, 0 mov a, @0x0 iow 0xf jmp main_loop ;================= ======================= sleep_model: call data_pro bc p5, 0 ; r_led bc p5, 1 ;t_led call data_pro mov a,@0x1e ;tx_off rx_off mov 0x22, a mov a, @0x4c ;250k 0db jbc p6, 2 ;<0 - 250k 1 - 1000k> mov a, @0x6c mov 0x30, a mov a, @0x15 ;2410 mov 0x31, a call rf_config bc p5, 2 ; pw s_loop: call delay1ms
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 47 wdtc mov a, p6 and a, @0x07 mov byte, a jbc p5, 3 ; key bs byte, 3 mov a, byte xor a, key_reg jbc 0x3, 2 ;z jmp s_loop jmp main_loop ;======================================== data_pro: mov a, @0x20 mov 0x4, a clr r0 mov a, @0x12 ;18 mov 0x10, a data_loop: call rf_config_table mov 0x0, a inc r0 inc 0x4 djz 0x10 jmp data_loop ret ;================================= ;===== rf config subroutine ======
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 48 ;================================= rf_config: bc p6, 3 ;ce bs p6,7 ;cs call delay200us mov a, @0x12 ;18 mov 0x1 0, a mov a, @0x20 mov 0x4, a rf_conf_byte_lp: mov a, @0x8 mov 0x11, a mov a, 0x0 mov byte, a rf_conf_bit_lp: bc p6, 5 ; clk1 jbs byte, 7 bc p6, 4 ; data jbc byte, 7 bs p6, 4 ; data rlc byte bs p6, 5 ; clk1 djz 0x11 jmp rf_conf_bit_lp inc 0x4 djz 0x10 jmp rf_conf_byte_lp call delay5us bc p6, 5 ; clk1 bc p6, 7 ; cs
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 49 ret ;================================= ;======= rf send subroutine ====== ;============== =================== rf_send: bc p6, 7 ; cs bs p6, 3 ; ce call delay5us call delay5us clr r0 mov a, @0x5 ; address bit 5*8=40 bit mov 0x10, a rf_s_add_byte: call address_table mov byte, a mov a, @0x8 mov 0x11, a rf_s_add_bit: bc p6, 5 ; clk1 jbs byte, 7 bc p6, 4 ; data jbc byte, 7 bs p6, 4 ; data rlc byte bs p6, 5 ; clk1 djz 0x11 jmp rf_s_add_bit inc r0 djz 0x10
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 50 jmp rf_s_add_byte mov a, @0x1a ; 208 bit data mov 0x10, a rf_s_d_byte: mov a, @0x8 mov 0x11, a mov a, @0x037 mov byte, a rf_s_d_bit: bc p6, 5 ; clk1 jbs byte, 7 bc p6, 4 ; data jbc byte, 7 bs p6, 4 ; data rlc byte bs p6, 5 ; clk1 djz 0x11 jmp rf_s_d_bit djz 0x10 jmp rf_s_d_byte call delay5us bc p6, 5 ; clk1 bc p6, 3 ; ce ret ;===================================== ; ======= rf receive subroutine ======= ;======= ============================== rf_receive:
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 51 bc p6, 7 ; cs bc p6, 3 ; ce call delay5us call delay5us mov a, @0x20 mov 0x4, a mov a, @0x1a ; 208 bit mov 0x10, a clr byte rf_byte_lp: mov a, @0x8 mov 0x 11, a rf_bit_lp: rlc byte bs p6, 5 ; clk1 jbs p6, 4 ; data bc byte, 0 jbc p6, 4 ; data bs byte, 0 bc p6, 5 ; clk1 djz 0x11 jmp rf_bit_lp inc 0x4 djz 0x10 jmp rf_byte_lp call delay5us call delay5us bs p6, 3 ;ce ret
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 52 ;======================================== ; ========= delay1ms subroutine ========== ;======================================== delay1ms: mov a, @0x0ff jmp dly_skip delay200us: mov a, @0x 32 jmp dly_skip delay5us: mov a, @0x1 dly_skip: mov dly_reg,a dly_loop: nop nop nop djz dly_reg jmp dly_loop ret ;======================================== ;========= interrupt subroutine ========= ;====================================== == int_0: int_1: bc 0xf, 0 ;timer flag
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 53 djz timer_reg jmp int_ret bs flag, 0 ;interrupt flag int_ret: reti
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 54 2 demo program - c8051f330 mcu /* -------------------------------------------------------------------- features: head ers load area --------------------------------------------------- ----------------- */ #include #include "public_variable.h" /* -------------------------------------------------------------------- function: io defined area ------------------- ------------------------------------------------- */ sbit trw_24g_clk = p1^1; sbit trw_24g_da ta = p1^6; sbit trw_24g_cs = p1^2; sbit trw_24g_ce = p1^3; sbit trw_24g_dr1 = p1^4; /* -------------------------------------------------------------------- feature s: trw - 24g is written a byte (includes write the word with configuration information sent a byte) ------------------------------------------------------------------ */ void write_trw_24g_byte(x ) { char i; for(i=0;i<8;i++) { trw_24g_clk = 0; if(x&0x80) trw_24g_data= 1; else trw_24g_data= 0; x<<=1; trw_24g_clk = 1; trw_24g_clk = 1; trw_24g_clk = 1; } } /* -------------------------------------------------------------------- features: reading a byte information from trw - 24g ----------------------------- ----------------------------------------- */ char read_trw_24g_by te (void) { char i,x; for(i=0;i<8;i++) { trw_24g_clk = 0; trw_24g_clk = 0; trw_24g_clk = 0; trw_24g_clk = 1; x<<=1;
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 55 if(trw_24g_da ta ) x|=0x01; else x|=0x00; } return(x); } /* ---------------- ---------------------------------------------------- features: trw - 24g configuration -------------------------------------------------------------------- */ void config_trw_24g(void) { unsigned char i; p1mdout |= 0x4e; trw_24g_ce = 0; trw_24g_cs = 1; for( i=0;i<18;i++) write_trw_24g_byte(rf_b uffer[i]); trw_24g_cs = 0; if(rf_status[0]&&(rf_status[6]==1)) { p1mdout &= 0xbd; p1 |= 0x42; trw_24g_ce = 1; } } /* -------------------------------------------------------------------- function: the trw - 24g send a packet. -------------------------------------------------------------------- */ void send_trw_24g(char x) { unsigned char i; trw_24g_cs = 0; trw_24g_ce = 1; write_trw_24g_byte(0xf0); write_trw_24g_byte(0xf0); for(i=0;i<28;i++) write_trw_24g_byte(x); tr w_24g_ce = 0; } /* -------------------------------------------------------------------- function: trw - 24g read out a packet -------------------------------------------------------------------- */ char receive_trw_24g(void) { unsigned char i=0,rf_data[30]; trw_24g_ce = 1; p1mdout &= 0xbf;
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 56 p1 |= 0x40; trw_24g_clk = 0; if(trw_24g_dr1) { for(i=0;i<28;i++) rf_data[i] = read_trw_24g_by te(); i= rf_data[4]; } return(i); } /* -------------------------------------------------------------------- features: es tablish trw - 24g table -------------------------------------------------------------------- */ const unsigned char code trw_24g_table[18] = { 0x8e,0x08,0x1c,0xe0,0xe0,0x00,0x00,0x00,0xf0, 0xf0,0x00,0x00,0x00,0xf0,0xf0,0x43,0x0f,0x00 }; /* ----------------- --------------------------------------------------- this program is kit_10 to configure trw_24g/trw_24g part. which is used rf_status [7] and rf_buffer [110] array. here's rf_status [7] array of detailed definitions: rf_status[0] = 0 , modules work is in t he state of launch = 1 , modules work is in the receiving state rf_status[1] = neglected rf_status[2][3] = to retain frequencies via 16 - band. if its value = 0x0190, it express operating frequency now is 2400 m. if its value = 0x01b0, it express operating frequency now is 2400 m. rf_status[4] = 0, modules work is in the rate of 1 m = 1 , modules work in the 250 k rate. rf_status[5] = 0, set up the transmitter power modules is for - 20 dbm = 1 , set up the transmitter power modules is for - 0 dbm rf_status[6] = 0, modules work is in the direct model = 1 , modules work is in the shockburth model . ---------------------------------------------------------------------- void control_trw_24g(void) { unsigned char i,send_value = 0x00,receive_time = 0, receive_value=0; unsigned int freq_buffer; freq_buffer = rf_status[2]<<8; freq_buffer += rf_status[3]; if((rf_status[6]==1)&&(rf_status[0]==0)) { for(freq_buffer=0;freq_buffer<10000;freq_buffer++) for(i=0;i<200;i++); }
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 57 else if((freq_buffer>527) ||(freq_buffer<400)) show_freq_error(); else { for(i=0;i<18;i++) rf_buffer[i]=trw_24g_table[i]; if(rf_status[0]) { rf_buffer[2] = 0x1f; rf_buffer[17] |= 0x01; } else { rf_buffer[2] = 0x1c; rf_buffer[17] &= 0x00; } freq_buffer - = 400; freq_buffer <<=1; i=freq_buffer&0xfe; rf_buffer[17] |= i; if(rf_status[6]==0) rf_buffer[16] |= 0x40; if(rf_status[4]==0) rf_buffer[16] |= 0x20; switch(rf_status[5]) { case 0: rf_buffer[16] &= 0xfc; break; case 1: rf_buffer[16] |= 0x01; b reak; default: rf_buffer[16] |= 0x03; break; } config_trw_24n(); if(rf_status[0]&&(rf_status[6]==1)) { lcd_write_string(0x02,0x11,0xb2,"direct output rf",0); lcd_write_string(0x02,0x11,0xb3," data from tp5 8",0); while((key_value&0x08)==0x00) sca n_key(); }
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 58 else { freq_buffer >>= 1; show_24g_image(freq_buffer); while((key_value&0x08)==0x00) { scan_key(); if(rf_status[0]) { rf_buffer[2] |= 0x1f; rf_buffer[17] |= 0x01; config_trw_24g(); for(freq_buffer=0;freq_buffer<500;freq_buf fer++); i =0; while(i==0) i = receive_trw_24g(); ++receive_time; if(receive_value>i) { receive_time = 1; send_value = 0; } receive_value = i; ++send_value; rf_buffer[2] &= 0x1c; rf_buffer[17] &= 0xfe; config_trw_24g(); for(freq_buffer=0;fr eq_buffer<1000;freq_buffer++); send_trw_24g(send_value); for(freq_buffer=0;freq_buffer<1500;freq_buffer++); } else { if(send_value == 100) { for(i=0;i<128;i++) for(freq_buffer=0;freq_buffer<20000;freq_buffer++ send_value = 0; receive_time = 0; } ++se nd_value; rf_buffer[17] &= 0xfe; rf_buffer[2] &= 0x1c; config_trw_24g(); for(freq_buffer=0;freq_buffer<1000;freq_buffer++);
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 24g datasheet p. 59 work_led = 1; send_trw_24g(send_v alue); for(freq_buffer=0;freq_buffer<1500;freq_buffer++); work_led = 0; rf_buffer[17] |= 0x01; rf_ buffer[2] |= 0x1f; config_trw_24g(); for(freq_buffer=0;freq_buffer<500;freq_buffer++); for(freq_buffer=0;freq_buffer<30000;freq_buffer++) { i = receive_trw_24g(); if(i) { ++receive_time; break; } } for(;freq_buffer<30000;freq_buffer++); } set_oled_adre ss(0x02,0x 14,0xb3); chardiv(send_value,0,0,0); set_oled_adress(0x02,0x 14,0xb4); chardiv(receive_time,0,0, 0); } } } }


▲Up To Search▲   

 
Price & Availability of TRW-24G

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