Hope RF RF12B Скачать руководство пользователя страница 5

                                                     

RF12 Program V1.1

 

Tel: +86-755-82973805   Fax: +86-755-82973550  E-mail: [email protected]  http://www.hoperf.com

 

 

 

 

9

 

Synchron pattern Command 

bit 15 14 13 12 11 10 9

8

7 6 5 4

3 2 1 0 POR 

  1 1 0 0 1 1 1

0

b7

b6

b5

b4

b3

b2

b1 

b0 

CED4h 

This command is used to reprogram the synchronic pattern;

 

 

10

 

Receiver FIFO Read Command 

bit 15 14 13 12 11 10 9

8

7  6  5  4  3  2  1  0  POR 

  1 0 1 1

0 0 0

0

0 0 0 0 0 0 0 0 B000h

 

    This command is used to read FIFO data when FFIT interrupt generated. FIFO data 

output starts at 8

th

 SCK period. 

 

11

 

AFC Command 

bit 

15 

14 

13 

12 

11 

10 

9 8 7 6 5 4 3 2 1 0 POR 

  1 1 0 0 0 1 0 0 a1

a0

rl1

rl0

st fi oe 

en 

C4F7h 

 

a1..a0: select AFC auto-mode

 

a1  

a0  

 

0  

0  

Controlled by MCU 

0   

1   

Run once at power on 

1   

0   

Keep offset when VDI hi 

1   

1   

Keeps independently from VDI

 

rl1..rl0: select range limit 

 

r1  

r0  

range

fres

 

0  

0  

No restriction 

0  

1  

+15/-16 

1  

0  

+7/-8 

1  

1  

+3-4 

 

 

fres 

315

433band: 2.5kHz 

868band: 5kHz 

915band: 7.5kHz 

st:      st goes hi will store offset into output register 

fi:   Enable AFC hi accuracy mode 

oe:  Enable AFC output register 

en:  Enable AFC funcition 

 

 

 

 

 

Содержание RF12B

Страница 1: ...eviation output power and also data rate No need any hardware adjustment when using in frequency hopping applications RF12B can be used in applications such as remote control toys wireless alarm wirel...

Страница 2: ...ble base band block et Enable transmitter es Enable synthesizer ex Enable crystal oscillator eb Enable low battery detector ew Enable wake up timer dc Disable clock output of CLK pin 4 Frequency Setti...

Страница 3: ...g1 g0 r2 r1 r0 9080h P16 select function of pin16 P16 0 Interrupt input 1 VDI output i2 i0 select baseband bandwidth Tel 86 755 82973805 Fax 86 755 82973550 E mail sales hoperf com http www hoperf com...

Страница 4: ...l 1 s 1 f2 f1 f0 C22Ch al Enable clock recovery auto lock ml Enable clock recovery fast mode s select data filter type s Filter type 0 Digital filter 1 Analog RC filter f1 f0 Set DQD threshold 8 FIFO...

Страница 5: ...read FIFO data when FFIT interrupt generated FIFO data output starts at 8th SCK period 11 AFC Command bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 POR 1 1 0 0 0 1 0 0 a1 a0 rl1 rl0 st fi oe en C4F7h a1 a...

Страница 6: ...m0 frequency deviation kHz 0 0 0 0 15 0 0 0 1 30 0 0 1 0 45 0 0 1 1 60 0 1 0 0 75 0 1 0 1 90 0 1 1 0 105 0 1 1 1 120 1 0 0 0 135 1 0 0 1 150 1 0 1 0 165 1 0 1 1 180 1 1 0 0 195 1 1 0 1 210 1 1 1 0 225...

Страница 7: ...bandwidth bw0 Max bit rate kbps Phase noise at 1MHz offset dBc Hz 0 86 2 107 1 256 102 14 Transmitter Register Write Command bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 POR 1 0 1 1 1 0 0 0 t7 t6 t5 t4...

Страница 8: ...0 1 0 1 66 0 1 1 2 1 0 0 2 5 1 0 1 3 33 1 1 0 5 1 1 1 10 CLK signal is derive form crystal oscillator and it can be applied to MCU clock in to save a second crystal If not used please set bit dc to di...

Страница 9: ...d data Wait nIRQ low Write a byte Package send over return N Y Tel 86 755 82973805 Fax 86 755 82973550 E mail sales hoperf com http www hoperf com it a byte and pull nIRQ low hen transmit over then MC...

Страница 10: ...www hoperf com Note After RF12B initialization Open FIFO receive mode and wait nIRQ low only then MCU can r ad received and stored in FIFO data For next package receive please reset FIFO e Receive dat...

Страница 11: ...r de o m mple example based on AVR C electronic Co Ltd Contact 86 0755 86106557 MAIL hopefsk hoperf com IDE SS nSEL nIRQ PD6 LED GREEN PD7 LED RED copyright c 2006 Title RF12 TX si Company Hope micro...

Страница 12: ...DO 1 RFXX_SDO i d define DDR_OUT 1 define PORT_SEL PORTB d define DDR_SEL DDRB define PORT_SDI PORTB d define DDR_SDI DDRB define PORT_SCK PORTB d define DDR_SCK DDRB define PORT_SDO PORTB d define DD...

Страница 13: ...ed int aCmd 01 0 define SDO_HI PIN_SDO 1 RFXX_SDO define SCK_OUTPUT DDR_SCK 1 RFXX_SCK d define LOW_SCK PORT_SCK define RF12_DATA 4 PD4 d define HI_DATA PORT_DATA 1 R d define LEDR_OUTPUT DDRD 1 7 def...

Страница 14: ...void RF12_INIT void RFXX_WRT_CMD 0x80D7 EL EF 433band 1 RFXX_WRT_CMD 0x8239 er ebb RFXX_WRT_CMD 0xA640 A140 430 8MHz RFXX_WRT_CMD 0xC647 4 8kbps RFXX_WRT_CMD 0x94A0 VDI FAST 134kHz 0dB RFXX_WRT_CMD 0x...

Страница 15: ...LOW BYTE ATA BYTE 1 LEDR_OFF LEDG_OUTPUT LEDR_OUTPUT for i 0 i 3 i Delay_ms 200 LEDG_ON LEDR_ON Delay_ms 200 L LE LE LEDR_OFF RFXX_PORT_INIT RF12_INIT DDRD 1 RF12_DATA PO DD while 1 LEDR_ON RF RFXX_W...

Страница 16: ...kSum 0x35 RF12_SEND 0x36 ChkSum 0x36 RF12_SEND 0x37 ChkSum 0x37 RF12_SEND 0x38 ChkSum 0x38 RF12_SEND 0x39 ChkSum 0x39 RF12_SEND 0x3A ChkSum 0x3A RF12_SEND 0x3B ChkSum 0x3B RF12_SEND 0x3C ChkSum 0x3C R...

Страница 17: ...0 efine PIN_SEL PINB efine PIN_SDI PINB efine PIN_SCK PINB efine PIN_SDO PINB Current version v1 0 Date 2006 11 17 processor ATMEGA48 Clock 10MHz Crystal E Connections ATMEGA48 SIDE RF12 S SCK SCK MIS...

Страница 18: ...ine PORT_IRQ PORTD d define DDR_IRQ DDRD define PORT_DATA PORTD define define DDR_DATA DDRD define PB7 7 define PB6 6 define RFXX_SCK 5 define RFXX_SDO 4 RF define RFXX_SDI 3 define RFXX_SEL 2 d defin...

Страница 19: ...int aCmd char i 0 1 SEL define LEDG_ON PORTD 1 6 define LEDG_OFF PORTD 1 6 define defin void RFXX_POR HI_SEL HI_SDI LOW_SCK SET nFFS pin HI_DATA SEL_OUTPUT SDI_OUTPUT SDO_INPUT SCK_OUTPUT I DATA_OUT u...

Страница 20: ...0xA640 A140 430 8MHz RFXX_WRT_CMD 0xC647 4 8kbps RFXX_WRT_CMD 0x94A0 VDI FAST 134kHz 0dB RFXX_WRT_CMD 0xC2AC AL ml DIG DQ RFXX_WRT_CMD 0xCA81 FIFO8 SYNC ff DR RFXX_WRT_CMD 0xCED4 SYNC 2DD4 RFXX_WRT_CM...

Страница 21: ...mand port Initialize RF12 chip Init FIFO 81 CMD 0xCA83 16 i ChkSum RF12_RECV eceive Check sum Disable FIFO 1 k ms 200 LEDG_OFF Delay_ms 200 L LE LEDR_OFF RFXX_PORT_INIT RF12_INIT RFXX_WRT_CMD 0xCA whi...

Страница 22: ...557 2006 11 21 pedef unsigned char uchar efine SCK RB5 copyright c 2006 Title RFM12B transmitter Current version v1 0 Function Package send De Processor PIC16F73 Clock 10MHz Cry Operate frequency 434M...

Страница 23: ...nSEL RB4 define SDI_OUT TRISB7 0 define SDO_IN TRISB6 1 d define nSEL_OUT void Init_RF12 void void Write0 void void Write1 void void WriteCMD uint CMD void DelayUs uint us vo void WriteFSKbyte __CONF...

Страница 24: ...0xAA WriteFSKbyte 0xD4 WriteFSKbyte 0x30 DATA0 ChkSum 0x30 WriteFSKbyte 0x31 ChkSum 0x31 WriteFSKbyte 0x32 ChkSum 0x32 WriteFSKbyte 0x33 ChkSum 0x33 WriteFSKbyte 0x34 ChkSum 0x34 WriteFSKbyte 0x35 Chk...

Страница 25: ...com 3F DATA15 AA teCMD 0x8208 CLOSE PA elayMs 1000 0 void CK 1 NOP 1 void ChkSum 0x3E WriteFSKbyte 0x ChkSum 0x3F ChkSum 0x0FF WriteFSKbyte ChkSum WriteFSKbyte 0x Wri D void Write SCK 0 NOP SDI 0 NOP...

Страница 26: ...com CK 1 NOP uint CMD 6 0 0x8000 Write0 MD 1 CK 0 nSEL 1 WriteFSKbyte uchar DATA A 0 1 Polling SDO NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP S void WriteCMD uchar n 1 SCK 0 nSEL while n if CMD...

Страница 27: ...973550 E mail sales hoperf com http www hoperf com 1 1 Loop 0 WriteCMD temp s uint us NOP uint ms ar i 5 DelayUs 1 RGIT else RGIT 0 SCK 0 SDI 1 nSEL if RGIT 0 goto else RGIT void DelayU uint i while u...

Страница 28: ...on Package send De Processor PIC16F73 Clock 10MHz Cry Operate frequency 434MHz Data rate 4 8kbps Package size 23byte Author Robben Company Hope microelectronic C Contact 86 0755 8610 E MAIL hopefsk ho...

Страница 29: ...teCMD 0xC000 1 0MHz 2 2V ar i 0 j 0 void WriteCMD uint CMD uc void Delayus uint __CONFIG 0x3FF2 bank1 uc void LED_OUT nSEL_OUT SDI_OUT SDO_IN SCK_OUT nIRQ_IN nSEL 1 SDI 1 SCK 0 SDO 0 LED 0 WriteCMD 0x...

Страница 30: ...reset FIFO and read to receive next Byte 30 0x3F Sum 0x0FF RF_RXBUF 16 ayus 1 0 0 void while nIRQ RF_RX if i 17 i 0 WriteCMD 0xCA80 WriteCMD 0xCA83 CheckSum 0 for j 0 j 16 j CheckSum RF_RXBUF j add 0x...

Страница 31: ...ales hoperf com http www hoperf com CK 1 NOP 1 void CK 1 NOP uint CMD 6 0 0x8000 Write0 MD 1 CK 0 nSEL 1 S void Write SCK 0 NOP SDI 1 NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP S void...

Страница 32: ...m oid Result 16 i skip status bits read fifo data byte ult Result 1 1 P EL 1 s uint us 0 uchar RF12_RDFIFO v uchar i SCK 0 SDI 0 nSEL 0 for i 0 i SCK 1 NOP NOP SCK 0 NOP NOP Result 0 for i 0 i 8 i Res...

Страница 33: ...ectronics assumes no responsibility or liability for any use of the information contained herein Nothing in this document shall operate as an express or implied license or indemnity under the intellec...

Отзывы: