Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 4:b51ca6ee9136
- Parent:
- 3:b2acafb06072
- Child:
- 5:3d447f4786f1
--- a/main.cpp Sat Aug 15 17:04:45 2015 +0000
+++ b/main.cpp Sat Oct 03 23:08:09 2015 +0000
@@ -131,9 +131,10 @@
writereg(RF22_REG_69_AGC_OVERRIDE1,0x60);
//check...//also depends on 0x70[5]
- writereg(RF22_REG_6E_TX_DATA_RATE1,0x01);//TX at 0.123kbps=:6E=0x01; 6F=0x02
- writereg(RF22_REG_6F_TX_DATA_RATE0,0x06);//TX at 1.2kbps: 6E=0x09; 6F=0xd5 //Formula: tx_datarate*(2^21)/10^6
- //
+ writereg(RF22_REG_6E_TX_DATA_RATE1,0x02);//TX at 0.123kbps=:6E=0x01; 6F=0x06
+ writereg(RF22_REG_6F_TX_DATA_RATE0,0x9F);//TX at 1.2kbps: 6E=0x09; 6F=0xd5 //Formula: tx_datarate*(2^21)/10^6
+ //For 0.160kbps 6E = 01 6F=50
+ //for 0.320kbps 029F
writereg(RF22_REG_70_MODULATION_CONTROL1,0x2c);
writereg(RF22_REG_71_MODULATION_CONTROL2,0x21);//ook = 0x21 //fsk = 0x22
@@ -250,11 +251,13 @@
//writing again
cs = 0;
spi.write(0xFF); //FIFO write access
- for(i=0; i<bar; i++,u++)
+ //for(i=0; i<bar; i++,u++)
+ for(i=0; i<(bar/2); i++)
{
-
+ u=u+2;
//spi.write(data[i]);
- spi.write(0xAA) ;
+ spi.write(0xFF);
+ spi.write(0x00);
pc.printf("%d\n",u);
}
//u = u + i;