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

    Looking at the PLL, so I modified the init to debug if PLL is locked"
    Code:
                'Verify PLL Lock Flag
                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 "PLL Lock=",bin1 PLL_LOCK,13
    Debug shows a '0' so its not locked..... not real sure what that means...... MC site for support on this is thin indeed.
    I can't believe no one who has read this thread has not done this, I can't believe I am the only one!
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

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


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Well, I attempted to modify MC's Radiodriver software to match your attempts.
    Perhaps you should drop back to exactly what they are doing.
    In essence they are running in Packet mode, variable length packets with a buffer threshold of 1 packet.
    They also use a (4) byte SYNC sequence.

    Here are the register settings they use.
    Code:
         RF_Init_Values[0] = $2E                                                   'Standby mode, 915-928 MHz, VTune by inductors, ENABLE R1/P1/S1
         RF_Init_Values[1] = $84                                                   'FSK, max IF gain, Packet Mode
         RF_Init_Values[2] = $0B                                                   'Change from 200KHz Freq Dev to 33KHz Dev
         RF_Init_Values[3] = $63                                                   '2KBps
         RF_Init_Values[4] = $0C                                                   'for OOK mode, not apliable
         RF_Init_Values[5] = $C1                                                   '16Bytes FIFO, 3 Bytes threshold FIFO transmit 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] = $C8                                                  'PLREADY, CRCOK, TXDONE, FIFO Not Full, FIFO Empty, No FIFO Overrun
                                                                                   'TX: mostly normal
         RF_Init_Values[14] = $0B                                                  '00111001
         RF_Init_Values[15] = $00                                                  '
         RF_Init_Values[16] = $41                                                  'default filters config
         RF_Init_Values[17] = $38                                                  'default filters config
         RF_Init_Values[18] = $38                                                  '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] = $69                                                  '"S" 1st byte of sync word
         RF_Init_Values[23] = $81                                                  '"C" 2nd byte of sync word
         RF_Init_Values[24] = $7E                                                  '"S" 3rd byte of sync word  - my initials!
         RF_Init_Values[25] = $96                                                  '
         RF_Init_Values[26] = $F0                                                  'utoff fcy = 200KHz, output power = 13dBm 0b000
         RF_Init_Values[27] = $80                                                  'clk out by default 427KHz
         RF_Init_Values[28] = $40                                                  '3 bytes payload
         RF_Init_Values[29] = $00                                                  'initial MAC ADDRESS, only for test
         RF_Init_Values[30] = $E8                                                  '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     for (i = 0; i < 32; i++)
    Then alter your XMIT: to handle variable length packets.

    Code:
    'Try sending something
    debug "Try sending 3 bytes",13
    XMIT:       TxPacket[0] = $04   'Number of payload bytes + address byte
                TxPacket[1] = $00   'Hard coded address byte
                TxPacket[2] = $A1
                TxPacket[3] = $B1
                TxPacket[4] = $C1
                TxPacketLen = 5
                gosub Send_Packet
                bRF_Mode = RF_STANDBY
                gosub SetRFMode
                goto XMIT                                                          'Remark this line to be receive all the time, othewrwise its xmitting all the time
    I believe the key here is to make sure that the PLL Lock flag is setting.
    This lets you know that the Radio has turned on correctly.
    Regards,
    TABSoft

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


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Are you using this module?
    MRF89XAM9A
    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

    Yes, trying to.
    "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

    Okay.
    Reading the MRF89XAM9A datasheet on page 7 "1.3.5 VCO TANK TRIM VALUE", it says you need to set VCOT<1:0> = ‘01’.
    From Datasheet:
    1.3.5 VCO TANK TRIM VALUE
    The VCO Trim bits (VCOT<1:0>) in the
    GCONREG<2:1> should be set for VCOT<1:0> = ‘01’
    for the inductor values of the module.

    That would change MC's value of Register 00 from $2E to $2A, and your value of Register 00 from $28 to $2A.

    That might explain why the PLL won't lock.
    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

    OK, changed all registers to your last post.
    Added the changes to the 'send something' portion.
    Still no received data.
    Lost the IRQ0 pulses on the transmitter.
    No IRQ0 or IRQ1 pulses on the receiver - have never had any.
    Pulses going into SDI and SCK on transmitter.
    No pulses on SDO or SCK on the receiver - no surprise there, if it doesn't trip an IRQ line.

    I'll look into how to setup the unit for receive all the time?
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

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


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Crossed posts.....
    I changed the Register 00 to $2A and it still reports PLL bit as '0'.
    BUT, on page 30 of the DS it shows $00 for VTune to be determined by the inductors - not $01 ???
    Forget it, I was still reading the 140 page DS not the 36 page one for the module.
    I get it.....

    The RESET pin is tied to an IO on the proc, it is currently held low, but the module datasheet says in a high impedance state.
    Wonder if this is my issue? Should I let it float?
    Last edited by ecoli-557; - 16th February 2015 at 23:36.
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

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


    Did you find this post helpful? Yes | No

    Default Re: MRF90XAM9A interfacing help

    Made PORTA.1 an input which is tied to the RESET pin, no help either.......

    Went back to earlier code and changed register $00 to $2A and have my pulses out of IRQ0 on the transmitter, but still nothing on the receiver.......
    Need a sniffer that works!
    Last edited by ecoli-557; - 16th February 2015 at 23:55.
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

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 : 0

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