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.
Bookmarks