Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Rfm12b + pic18f452 programming issues

Status
Not open for further replies.

selim007

Newbie level 1
Joined
Aug 22, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Beirut, Lebanon, Lebanon
Activity points
11
I've spent a while trying to communicate with the RFM12B but still unable to make it work.
Circuit schema is attached.
RFM.png
Checked my connections many times and testing on 2 similar circuits.
Wasn't able to find a decent documentation for the RFM12. only got those 2 PDF published on their site HOPERF.
Now the first step is to make sure that SPI is working and able to communicate with RFM.
the only available command is the status read command (0x0000) which is supposed to return several RFM settings. but am always receiving zeros.
i need to know the following:
1- Is there anything wrong with the schema ? (RFM is powered with 5V)
2- Is there a problem while initializing the SPI or Writing/Reading in the following code (using XC8)


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
TRISC7 = 1;                                 
    TRISC6 = 0;
    TRISC3 = 0;
    TRISC4 = 1;
    TRISC5 = 0;
    RFM_FSK = 1;
    PIE1bits.SSPIE = 0;
    OpenSPI(SPI_FOSC_16, MODE_11, SMPMID);
    __delay_us(100);
    RFM_CS = 0;
    WriteSPI(0x0);
    RFM_CS = 1;
 
    RFM_CS = 0;
    unsigned char xH = ReadSPI();
    RFM_CS = 1;

RFM.png

thank you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top