Page 1
1. Brief description RF12B is a low cost FSK transceiver IC witch integrated all RF functions in a single chip. It only need a MCU, a crystal, a decouple capacitor and antenna to build a hi reliable FSK transceiver system. The operation frequency can cover 400 to 1000MHz.
Page 2
RF12 Program V1.1 b1..b0: select band band[MHz] Reserved x3..x0: select crystal load capacitor load capacitor [pF] 10.0 …… …… 15.5 16.0 3. Power Management Command ebb et ex eb ew dc 8208h er: Enable receiver ebb:Enable base band block et: Enable transmitter es:...
Page 3
RF12 Program V1.1 5. Data Rate Command C623h r6..r0: Set data rate: BR=10000000/29/(R+1)/(1+cs*7) 6. Receiver Control Command P16 d1 9080h P16: select function of pin16 Interrupt input VDI output i2..i0:select baseband bandwidth Baseband Bandwidth [kHz] reserved reserved d1..d0: select VDI response time Response Fast...
Page 4
RF12 Program V1.1 r2..r0: select DRSSI threshold RSSIsetth [dBm] -103 Reserved Reserved The actual DRSSI threshold is related to LNA setup: RSSI = RSSI setth LNA. 7. Data Filter Command C22Ch al: Enable clock recovery auto-lock ml: Enable clock recovery fast mode s: select data filter type Filter type Digital filter...
Page 5
RF12 Program V1.1 9. Synchron pattern Command CED4h This command is used to reprogram the synchronic pattern; 10. Receiver FIFO Read Command B000h This command is used to read FIFO data when FFIT interrupt generated. FIFO data output starts at 8 SCK period.
Page 6
RF12 Program V1.1 12. TX Configuration Control Command m3 m2 m1 m0 p2 p1 p0 9800h m: select modulation polarity m2..m0: select frequency deviation: frequency deviation [kHz] p2..p0: select output power Output power[dBm] Tel: +86-755-82973805 Fax: +86-755-82973550 E-mail: sales@hoperf.com http://www.hoperf.com...
Page 7
RF12 Program V1.1 13. PLL Setting Command ddit CC77h ob1-ob0: Microcontroller output clock buffer rise and fall time control. Selected uC CLK frequency 5 or 10 MHz (recommended) 3.3 MHz 2.5 MHz or less ddy: phase detector delay enable. ddi: disables the dithering in the PLL loop. bw1-bw0: select PLL bandwidth Max bit rate [kbps] Phase noise at 1MHz offset [dBc/Hz]...
Page 8
RF12 Program V1.1 en:Enable low duty cycle mode 17. Low Battery Detector and Microcontroller Clock Divider Command C000h d2..d0: select frequency of CLK pin Clock frequency[MHz] 1.25 1.66 3.33 CLK signal is derive form crystal oscillator and it can be applied to MCU clock in to save a second crystal.
Page 9
Write a byte Package send over? return Note: Initialize RF12B and open transmitter, RF12B will transm it a byte and pull nIRQ low hen transmit over, then MCU can write next byte to transmit Tel: +86-755-82973805 Fax: +86-755-82973550 E-mail: sales@hoperf.com http://www.hoperf.com...
Page 10
Data recive over? return 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. Tel: +86-755-82973805 Fax: +86-755-82973550 E-mail: sales@hoperf.com http://www.hoperf.com...
Page 11
RF12 Program V1.1 4. Example 1(for AVR microcontroller) RF12 transmitter de o: copyright (c) 2006 ;Title RF12 TX si mple example based on AVR C ;Company: Hope micro electronic Co.,Ltd. ;Author: Tank ;Current version: v1.0 ;Date: 2006-11-13 ;processor ATMEGA48 ;Clock: 10MHz Crystal ;Contact: +86-0755-86106557...
Page 22
RF12 Program V1.1 5. Example 2(for PIC microcontroller) transmitter demo: /********************************************************** copyright (c) 2006 Title: RFM12B transmitter simple example based on PIC C Current version: v1.0 Function: Package send De Processor PIC16F73 DIP-28 Clock: 10MHz Cry stal Operate frequency: 434MHz Data rate: 4.8kbps Package size:...
Page 28
RF12 Program V1.1 receiver demo: /********************************************************** copyright (c) 2006 Title: RFM12B transmitter simple example based on PIC C Current version: v1.0 Function: Package send De Processor PIC16F73 DIP-28 Clock: 10MHz Cry stal Operate frequency: 434MHz Data rate: 4.8kbps Package size: 23byte Author: Robben...
Page 29
RF12 Program V1.1 void WriteCMD( uint CMD ); har RF12_RDFIFO(void); void Delayus( uint us ); __CONFIG(0x3FF2); bank1 uc har RF_RXBUF[19]; void Init_RF12(void) LED_OUT(); nSEL_OUT(); SDI_OUT(); SDO_IN(); SCK_OUT() nIRQ_IN( nSEL=1; SDI=1; SCK=0; SDO=0; LED=0; WriteCMD(0x80D8);//en able register,433MHz,12.5pF WriteCMD(0x82D8);//en able receive,!PA WriteCMD(0xA640);// WriteCMD(0xC647);// WriteCMD(0x94A0);//VD ,F I AST,134kHz,0dBm,-103dBm...
Page 32
RF12 Program V1.1 uchar RF12_RDFIFO(v oid) uchar i, Result; SCK=0; SDI=0; nSEL=0; for(i=0;i< 16;i++) //skip status bits SCK=1; NOP(); NOP(); SCK=0; NOP(); NOP(); Result=0; for(i=0;i<8;i++) //read fifo data byte ult=Result<<1; if(SDO) Result |=1; SCK=1; NOP(); NOP(); SCK=0; P(); NOP(); EL=1; return(Result);...
Page 33
RF12 Program V1.1 NOP(); This document may contain preliminary information and is subject to change by Hope Microelectronics without notice. Hope Microelectronics assumes no responsibility or liability for any use of the information contained herein. Nothing in this document shall operate as an express HOPE MICROELECTRONICS CO.,LTD or implied license or indemnity under the intellectual property rights of Add:4/F, Block B3, East I...
Need help?
Do you have a question about the RF12B and is the answer not in the manual?
Questions and answers