MRF90XAM9A interfacing help


Closed Thread
Results 1 to 40 of 64

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Changed the registers one more time - still no PLL lock being reported.
    Below:
    Code:
         RF_Init_Values[0] = $2A                                                   'Standby mode, 915-928 MHz, VTune by inductors, ENABLE R1/P1/S1
         RF_Init_Values[1] = $8C                                                   'FSK, max IF gain, Packet Mode
         RF_Init_Values[2] = $03                                                   '100KHz Freq Dev
         RF_Init_Values[3] = $07                                                   '25kbps
         RF_Init_Values[4] = $0C                                                   'for OOK mode, not apliable
         RF_Init_Values[5] = $01                                                   '16Bytes FIFO, 1 byte threshold FIFO interrupt
         RF_Init_Values[6] = $77                                                   '915MHz R1 Reg
         RF_Init_Values[7] = $64                                                   '915MHz P1 Reg
         RF_Init_Values[8] = $32                                                   '915MHz S1 Reg
         RF_Init_Values[9] = $74                                                   '920MHz R2 Reg
         RF_Init_Values[10] = $62                                                  '920MHz P2 Reg
         RF_Init_Values[11] = $32                                                  '920MHz S2 Reg
         RF_Init_Values[12] = $38                                                  'config mode for OOK, not apliable
         RF_Init_Values[13] = $00                                                 'RCV:IRQ0=payload ready + IRQ1=CRC OK
                                                                                   'TX: IRQ1=TXdone
         RF_Init_Values[14] = $01                                                  'FIFO starts filling when SYNC detected,TXDONE goes hi when done,
                                                                                   'RSSI IRQ when is above level set, enable PLL lock
         RF_Init_Values[15] = $00                                                  'RSSI interupt level zero - minimum
         RF_Init_Values[16] = $A3                                                  'default filters config
         RF_Init_Values[17] = $38                                                  'default filters config
         RF_Init_Values[18] = $30                                                  'sync word ON, 24bits, 0 errors tolerance
         RF_Init_Values[19] = $07                                                  'reserved reg
         RF_Init_Values[20] = $00                                                  'RSII status read register, 0.5dB / bit
         RF_Init_Values[21] = $00                                                  'OOK config reg
         RF_Init_Values[22] = $53                                                  '"S" 1st byte of sync word
         RF_Init_Values[23] = $53                                                  '"S" 2nd byte of sync word
         RF_Init_Values[24] = $53                                                  '"S" 3rd byte of sync word  - my initials!
         RF_Init_Values[25] = $53                                                  '"S" just in case
         RF_Init_Values[26] = $72                                                  'Cutoff fcy = 200KHz, output power = 13dBm 0b000
         RF_Init_Values[27] = $3C                                                  'clk out disabled - default 427KHz
         RF_Init_Values[28] = $03                                                  '3 bytes payload
         RF_Init_Values[29] = $01                                                  'initial MAC ADDRESS, only for test
         RF_Init_Values[30] = $5E                                                  'Fix Packet Lenght, 3 bytes preamble, whitening ON, CRC ON, Node ADDR|0x00|0xFF filtering
         RF_Init_Values[31] = $00                                                  'FIFO autocreal enable if CRC fails, Write to FIFO in stby mode
    I'm frustrated ......
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  2. #2
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    I now get a PLL lock indication, I put a wait until PLL lock bit was true before moving on.
    Code:
                'Verify PLL Lock Flag
    PLLwait:    bReg_Address = $0E                                                  'FTPRIREG
                gosub RegisterRead
                PLL_LOCK = 0
                PLL_LOCK = bReg_Value.1
                         'You can test this bit to see if PLL Is Locked
    debug "waiting for PLL lock",13
                if PLL_LOCK=0 then PLLwait
    PLLdone:
    debug "PLL Lock=",bin1 PLL_LOCK,13
    Still no received data or IRQs however.
    Transmitter gives both IRQ0 and IRQ1 outputs - making some progress.
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  3. #3
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Progress for sure.
    When in TX mode your IRQ0 says you have crossed the FIFO Input threshold and IRQ1 says FIFOFull.

    Why don't you try changing your definition of IRQ1 for TX (IRQ1TX) from 0 = FIFOFULL (default) to 1 = TXDONE. This is your RF_Init_Values[13] value.
    Then in the Send_Packet: routine after changing the mode to RF_TRANSMITTER, instead of a hard pause 5, use a loop to test for IRQ1 to go high (TXDONE).
    This way you can explicitly test for the Transmitter to complete.
    Regards,
    TABSoft

  4. #4
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Thanks for the additional input TABSoft, I had already changed the $0D register to $08, and still saw no interrupt.
    One thing I had noticed, In the Send_Packet routine, I saw you re-write the registers. I had changed your original code changing registers $1F, $0D, $0E, in which you re-wrote the registers to the original value, I changed to read the register 1st, then performed the logic manipulation thinking it may have been an oversight on your part. Still no output:
    Code:
    Send_Packet:    
                'Set Standby mode
                bRF_Mode = RF_STANDBY
                gosub SetRFMode
        
                'Enable FIFO access in Standby mode
                bReg_Address = $1F  'Register 31
                gosub RegisterRead
                bReg_Value = ((bReg_Value & $BF) | $00)
    '            bReg_Value = (RF_Init_Values(bReg_Address) & $BF) | $00
                gosub RegisterSet
                'Clear FIFO Overrun
                bReg_Address = $0D  'Register 13
                gosub RegisterRead
                bReg_Value = bReg_Value | $01
    '            bReg_Value = (RF_Init_Values(bReg_Address) | $01)
                gosub RegisterSet
                'Set PLL Locked
                bReg_Address = $0E  'Register 14
                gosub RegisterRead
                bReg_Value = bReg_Value | $02                                       'Set LSTLPLL to 1
    '            bReg_Value = (RF_Init_Values(bReg_Address) | $02)
                gosub RegisterSet
    'debug "Send Packet: waiting for PLL lock",13
    '            gosub PLLchk  'Verify PLL Lock Flag
    'debug "Send Packet: PLL locked",13
        
                For i = 0 to (TxPacketLen-1)
                'Wite the Packets to the FIFO
                wr_FIFO_Val = TxPacket[i]
                gosub WriteFIFO
                Next i 
       
                'Set RFMode to Transmit
                bRF_Mode = RF_TRANSMITTER
                gosub SetRFMode
                return
    Then as you can also see, I also added a bit test to see if in fact the PLL locked - it never did. Just sat there and spun waiting. I don't know what that is telling me. The 2 other places I have the wait until PLL lock do seem to change; the initial initialization and the RCV loop. Don't know what that is telling me either......

    I like your advice, and I had thought of doing something similar but my observations in the no IRQ0 or IRQ1 being set, I was looking for a way to test the register to see if the FIFO was ready. Some kind of flag I could use.
    I still haven't found it - an easy one.

    I have been on MC site and found numerous people grumbling over this radio - I can't believe this is so hard! One guy could never get the packet to work and went for the buffered approach. Many, Many posters have had interrupt issues as well. Seems I am not alone. All the more reason to post actual working code.

    My current drain is higher on the transmitter, so I think it is transmitting, and I actually believe the receiver is receiving - I just don't have it set to flag me so I can get the data!

    Thanks again for the assist, I owe you several beers! Any other ideas?
    Regards.
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  5. #5
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Sorry I've been busy on other items.
    Have you made any further headway or are you still stuck?
    Regards,
    TABSoft

  6. #6
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Thanks for asking, I haven't done any more on it. I don't have a spectrum analyzer to see if its transmitting, so its really frustrating.
    It looks like it should work, but it doesn't so I am still missing something basic I feel.
    I appreciate your help, but, I am stuck and like you, I have things I should be doing besides this 'fun' item.
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    these rfm69 chips are easy to use and have loads of working examples to draw information from and are really cheap too

    http://www.ebay.com.au/itm/RFM69CW-HopeRF-433Mhz-Wireless-Transceiver-with-RFM12B-compatible-Footprint-/181643908981?pt=LH_DefaultDomain_0&hash=item2a4ad2 1775

    I started out with the rfm12b modules and now have developed code that can successfully network the rfm69's with the old rfm12b's . I had similar issues to you trying to get the rfm69's up an running , not having the right gear to see what is really happening makes life difficult . in my case the known working rfm12b net allowed me to get pkt reception code working first after that the tx side just fell into place.

Similar Threads

  1. Interfacing LC75854
    By MR2010 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 18th July 2010, 02:42
  2. Keypad Interfacing
    By uaf5000 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 15th June 2010, 02:35
  3. Interfacing with the ISD4003
    By lerameur in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd June 2008, 15:25
  4. SPI Interfacing
    By toofastdave in forum Serial
    Replies: 8
    Last Post: - 18th November 2007, 11:15
  5. interfacing LCD
    By husakhalid in forum mel PIC BASIC
    Replies: 3
    Last Post: - 30th May 2006, 22:53

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts