Zacząłem walkę z dwoma modułami RFM12b. Oba moduły podłączone do ATMega16 w sposób opisany w PDF:
nIRQ -> INT0 (PD2)
nSEL <- SS (PB4)
SDI <- MOSI (PB5)
SDO -> MISO (PB6)
SCK -> SCK (PB7)
Moduły są 868MHz, uP taktowany kwarcem 16MHz.
Nie bardzo rozumiem konfigurację modułów a różne (niby działające) przykłady są przeważnie albo w C (nie znam C i pozostałą część programu mam w Bascom), albo na inne częstotliwości.
Próbuję takiej konfiguracji:
Czy ktoś pomoże mi rozszyfrować ustawienie bitów w komendach 7,8,9,11,12,13?
nIRQ -> INT0 (PD2)
nSEL <- SS (PB4)
SDI <- MOSI (PB5)
SDO -> MISO (PB6)
SCK -> SCK (PB7)
Moduły są 868MHz, uP taktowany kwarcem 16MHz.
Nie bardzo rozumiem konfigurację modułów a różne (niby działające) przykłady są przeważnie albo w C (nie znam C i pozostałą część programu mam w Bascom), albo na inne częstotliwości.
Próbuję takiej konfiguracji:
2. configuration setting command (default = h8008)
1000 0000 1110 0111 - ustawiam h80e7
|||| |_____ load capacitor" = 12pF
|||________ 10 - band = 868MHz
||_________ enable RX FIFO
|__________ enable TX
3. power management command (default = h8208)
1000 0010 1111 1001
|||| ||||__ disable clock output of CLK pin
|||| |||___ enable wake up-timer
|||| ||____ enable low-battery detector
|||| |_____ enable crystal oscilator
||||_______ enable synthetizer
|||________ enable transmitter
||_________ enable base band block
|__________ eneble receiver
4. frequency setting command (default = hA680)
1010 0110 1010 0100
|____________|__ operation frequency - 1700 dla 868,5 MHz
F=(Fc-860)/0,005 - F=(868,5-860)/0,005 - F=1700
5. data rate command (default = hC623)
1100 0110 0 010 0011
| |______|_ data rate (9600 bps)
|__________ cs?
R=((10.000.000/29)/BR)-1 - R=10000000/29/9600-1 - R~=35
6. receiver control command (default = h9080)
1001 0000 1000 0000 - nie rozumiem ustawień - zostawiam default h9080
||| | || ||_|__ DRSSI threshold - 000= -103 dBm
||| | ||_|_____ LNA gain - 00=0 dBm
||| |_|________ baseband bandwidth 100=200kHz
|||____________ VDI response time - 00=fast
|______________ function of pin16 - 0=interrupt input
7. data filter command (default = hC22C)
1100 0010 xx10 1xxx
|||| ||_|__ DQD threshold
|||| |_____ zawsze 1
||||_______ filter type - 0=digital filter
|||________ zawsze 1
||_________ enable clock recovery fast mode
|__________ enable clock recovery auto-lock
8. FIFO and Reset mode command (default = hCA80)
1100 1010 xxxx x000
| | ||||__ disable high sensitivity reset mode
| | |||___ enable FIFO fill
| | ||____ select FIFO fill start condition
| | |_____ select length of synchro pattern 0 = h2DD4
|__|_______ length of synchro pattern
9. synchron pattern command (default = hCED4)
1100 1110 xxxx xxxx
|_______|__ ?
10. Receiver FIFO read command (default = hB000)
1011 0000 0000 0000 - zostawiam bez konfigurowania
11. AFC command (default = hC4F7)
1100 0100 xxxx xxxx
|||| ||||__ enable AFC function
|||| |||___ enable AFC output register
|||| ||____ enable AFC high accuracy mode
|||| |_____ ?
||||_______ range limit 11 = +3-4
||_________ AFC auto mode 11 = niezależne od VDI
12. TX configuration control command (default = h9800)
1001 100x xxxx 0xxx
| |__| ||_|__ output power 000 = 0 dBm
| |__| |_____ zawsze 0
| |__|_______ frequency deviation 0000 = 15kHz
|____________ modulation polarity 0 = ?
13. PLL setting command (default = hCC67)
1100 1100 000x xx1x
||| || |__ PLL bandwidth 1 = max bit rate=256, phase noice -107
||| ||____ disables the dithering in the PLL loop
||| |_____ phase detector delay enable
|||_______ select low power mode of the crystal oscillator
||________ Microcontroller output clock buffer rise and fall time control
14. transmitter register write command (default = hB8AA)
rejestr do wysyłki danych - bez konfigurowania
15. wake up timer command (default = hE196)
111x xxxx xxxx xxxx - zostawiam bez konfigurowania - timer wyłączony w pkt 3
16. low duty-cycle command (default = hC8E0)
1100 1000 xxxx xxxx - zostawiam bez konfigurowania?
17. low battery detector and clock divider command (default = hC000)
1100 0000 xxx0 xxxx
||| ||||__ threshold voltage of Low battery detector - wyłączone w pkt 3
|||________ frequency od CLK pin - wyłączony w pkt 3Czy ktoś pomoże mi rozszyfrować ustawienie bitów w komendach 7,8,9,11,12,13?