From 7805e26a729ae96add7d8a467682dd8ccb13fbe2 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 19 May 2012 20:12:36 +0000 Subject: led on only during send git-svn-id: https://svn.spreadspace.org/mur.sat@438 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/hhd70dongle/c1101lib.c | 10 ++++++---- software/hhd70dongle/c1101lib.h | 3 --- software/hhd70dongle/hhd70dongle.c | 5 ++++- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'software') diff --git a/software/hhd70dongle/c1101lib.c b/software/hhd70dongle/c1101lib.c index a29974e..872c211 100644 --- a/software/hhd70dongle/c1101lib.c +++ b/software/hhd70dongle/c1101lib.c @@ -174,7 +174,7 @@ int spi_c1101_write_txfifo(char *buffer, int len) sb = spi_c1101_write_byte_ok_get_status(SPIC1101_ADDR_FIFO_WRITE_BURST); if (sb < 0) return -1; - uint8_t debug_sb[6]; + //~ uint8_t debug_sb[6]; while (len-- > 0 && SPIC1101_SB_FIFO_BYTES_AVAILABLE(sb) > 2) { //~ usb_rawhid_send((uint8_t*)"TXFifo bytes available",255); @@ -214,9 +214,10 @@ void c1101_init(void) // FSCTRL1 Frequency Synthesizer Control spi_c1101_write_register(SPIC1101_ADDR_FSCTRL1, 0x06); // FREQn Frequency Control Words - spi_c1101_write_register(SPIC1101_ADDR_FREQ2, 0x10); - spi_c1101_write_register(SPIC1101_ADDR_FREQ1, 0xD3); - spi_c1101_write_register(SPIC1101_ADDR_FREQ0, 0xB1); + spi_c1101_write_register(SPIC1101_ADDR_FREQ2, 0x10); //should be 435.125 mhz + spi_c1101_write_register(SPIC1101_ADDR_FREQ1, 0xBF); + spi_c1101_write_register(SPIC1101_ADDR_FREQ0, 0xEF); + spi_c1101_write_register(SPIC1101_ADDR_FSCTRL0, 0); //frequency offset // MDMCFGn Modem Configuration spi_c1101_write_register(SPIC1101_ADDR_MDMCFG4, 0xF8); spi_c1101_write_register(SPIC1101_ADDR_MDMCFG3, 0x83); @@ -241,6 +242,7 @@ void c1101_init(void) //c1101_setFrequency(1091741,0,15); } +//f_XOSC = 25,978016865 Mhz // freq: desired_carrier_freq [Hz] *2^16 / f_XOSC // freq_offset: desired frequency offset [Hz] *2^14 / f_XOSC // if_freq: desired intermidiate rx frequency [Hz] *2^10 / f_XOSC diff --git a/software/hhd70dongle/c1101lib.h b/software/hhd70dongle/c1101lib.h index a8045a0..9ecbadb 100644 --- a/software/hhd70dongle/c1101lib.h +++ b/software/hhd70dongle/c1101lib.h @@ -148,7 +148,4 @@ void c1101_transmitData(char *buffer, unsigned int len); //max returned: 64 bytes int c1101_readRXFifo(char *buffer); -//set WakeOnRadio to enabled (true) or disabled(false) -void c1101_setWOR(int enable); - #endif diff --git a/software/hhd70dongle/hhd70dongle.c b/software/hhd70dongle/hhd70dongle.c index 3e64c4f..9c19398 100644 --- a/software/hhd70dongle/hhd70dongle.c +++ b/software/hhd70dongle/hhd70dongle.c @@ -75,7 +75,6 @@ int main(void) for(;;) { _delay_ms(1000); - led_toggle(); usb_rawhid_recv(read_buffer,20); if (read_buffer[0] == 'r') reset(); @@ -126,10 +125,14 @@ int main(void) debug_sprint_int16hex(write_buffer+10, c1101_measureTemp()); usb_rawhid_send(write_buffer+10,255); _delay_ms(250); + led_on(); usb_rawhid_send((uint8_t*)"TX Data: String",255); c1101_transmitData("OE6EOF test mur.sat GFSK r:9k6 fdev:3mhz 1234567890123456789012345678901234567890 End of Test",93); + led_off(); _delay_ms(100); + led_on(); usb_rawhid_send((uint8_t*)"TX Data: Temps",255); c1101_transmitData((char*) write_buffer,14); + led_off(); } } -- cgit v1.2.3