Jump to content

Search the Community

Showing results for tags 'rfm12b'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 1 result

  1. Hello, I hope this is the right forum to post in, I'm a new user here... So, I have been trying to get the RFM12b module to work with my MSP430F5529. The connections are as follows for transmission: VDD --> 3.3V GND--> GND SDO-->P6.5 nIRQ-->P3.4 nSEL-->P3.3 SCK-->P1.6 SDI-->P6.6 Now, I have the following code, in which I only configure the module and try to read its status register: #include "main.h" void WriteCMD(unsigned int CMD); void Write1(); void Write0(); int check_status(); void main() { //init ports P6DIR |= BIT5; //set SDO as output on P6.5 P3DIR &= ~BIT4; //set nIRQ as input on P3.4 P3REN |= BIT4; P3DIR |= BIT3; //set nSEL as output on P3.3 P1DIR |= BIT6; //set SCK as output on P1.6 P6DIR &= ~BIT6; //set SDI as input on P6.6 P6REN &= ~BIT6; //init rfm12b WriteCMD(0x80D8);//enable register,433MHz,12.5pF WriteCMD(0x82D8);//enable receive,!PA WriteCMD(0xA640);// WriteCMD(0xC647);// WriteCMD(0x94A0);//VDI,FAST,134kHz,0dBm,-103dBm WriteCMD(0xC2AC); WriteCMD(0XCC77);// WriteCMD(0xCA80); WriteCMD(0xCA83);//FIFO8,SYNC, WriteCMD(0xC49B); WriteCMD(0x9850);//!mp,9810=30kHz,MAX OUT WriteCMD(0xE000);//NOT USE WriteCMD(0xC800);//NOT USE WriteCMD(0xC000);//1.0MHz,2.2V //statusregister auslesen int cnt = 16; int result = 0; int temp = 0; P3OUT &= ~BIT3; //set nSEL low P6OUT &= ~BIT5; //set SDO low while(cnt--) { __delay_cycles(10); temp = P6IN; temp = temp <<2; result |= temp; result = result <<1; P1OUT |= BIT6; // set SCK high __delay_cycles(10); __no_operation(); P1OUT &= ~BIT6; //set SCK low __delay_cycles(10); P3OUT |= BIT3; //set nSEL high; } __no_operation(); while(1) { __no_operation(); result= result-1; result = result+1; } } void WriteCMD( unsigned int CMD ) { unsigned char n=16; P1OUT &= ~ BIT6; //set SCK low P3OUT &= ~BIT3; //set nSEL low, selecting the rfm12b __delay_cycles(10); while(n--) { if(CMD&0x8000) { Write1(); } else { Write0(); } CMD=CMD<<1; } P1OUT &= ~ BIT6; //set SCK low P3OUT |= BIT3; //set nSEL high, deselecting the rfm12b __delay_cycles(10); } void Write0 (void) { P1OUT &= ~BIT6; //set SCK low __delay_cycles(10); P6OUT &= ~BIT5; //set SDO low __delay_cycles(10); P1OUT |= BIT6; //set SCK high, rfm now reads SDO __delay_cycles(10); P1OUT &= ~BIT6; //set SCK low } void Write1(void) { P1OUT &= ~BIT6; //set SCK low __delay_cycles(10); P6OUT |= BIT5; //set SDO high __delay_cycles(10); P1OUT |= BIT6; //set SCK high, rfm now reads SDO __delay_cycles(10); P1OUT &= ~BIT6; //set SCK low } Now, the status register should read "0x4000", but I always get "0xFFF8" and this makes me nervous. I have also tried simply connecting two modules and sending data between the two with a bit different programms, but that also didn't yield any results. Can anyone here help me? I've been to the 10th site of Google search results and haven't found anything that could help me. I got my instructions from the following site: https://gobotronics.wordpress.com/2010/10/07/rfm12-programming/. Thanks in advance!
×
×
  • Create New...