QRSS Rx Network receiver. A receiver to sample a segment of RF spectrum and send this data to a server for further processing and display. NXP mbed Design Challenge entry (Honorable Mention). Published in Circuit Cellar, Feb 2012
Dependencies: NetServices mbed DNSResolver
global.h@0:82ff15078322, 2012-01-25 (annotated)
- Committer:
- claytong
- Date:
- Wed Jan 25 20:32:53 2012 +0000
- Revision:
- 0:82ff15078322
1.0 (initial public release)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
claytong | 0:82ff15078322 | 1 | /*--------------------------------------------------------------------------- |
claytong | 0:82ff15078322 | 2 | |
claytong | 0:82ff15078322 | 3 | QRSS Receiver Application |
claytong | 0:82ff15078322 | 4 | |
claytong | 0:82ff15078322 | 5 | by Clayton ZL3TKA/VK1TKA |
claytong | 0:82ff15078322 | 6 | clayton@isnotcrazy.com |
claytong | 0:82ff15078322 | 7 | |
claytong | 0:82ff15078322 | 8 | Header File for global definitions |
claytong | 0:82ff15078322 | 9 | |
claytong | 0:82ff15078322 | 10 | ---------------------------------------------------------------------------*/ |
claytong | 0:82ff15078322 | 11 | #ifndef _GLOBAL_H |
claytong | 0:82ff15078322 | 12 | #define _GLOBAL_H |
claytong | 0:82ff15078322 | 13 | |
claytong | 0:82ff15078322 | 14 | // Definitions |
claytong | 0:82ff15078322 | 15 | |
claytong | 0:82ff15078322 | 16 | // Size of data buffers (in samples) |
claytong | 0:82ff15078322 | 17 | #define BUFFERSYS_SIZE 512 |
claytong | 0:82ff15078322 | 18 | |
claytong | 0:82ff15078322 | 19 | // Number of buffers |
claytong | 0:82ff15078322 | 20 | #define NUM_OF_BUFFERS 4 |
claytong | 0:82ff15078322 | 21 | |
claytong | 0:82ff15078322 | 22 | // Number of co-efficients in the FIR filter |
claytong | 0:82ff15078322 | 23 | #define DSP_FIR_COEFFICIENTS 511 |
claytong | 0:82ff15078322 | 24 | |
claytong | 0:82ff15078322 | 25 | // ADC Clock (13.5MHz) |
claytong | 0:82ff15078322 | 26 | #define ADC_CLOCK 13500000 |
claytong | 0:82ff15078322 | 27 | |
claytong | 0:82ff15078322 | 28 | // Sample Rate (35156 SPS) |
claytong | 0:82ff15078322 | 29 | #define SAMPLE_RATE (ADC_CLOCK/384) |
claytong | 0:82ff15078322 | 30 | |
claytong | 0:82ff15078322 | 31 | // Decimation amount - ratio |
claytong | 0:82ff15078322 | 32 | #define DECIMATION_RATIO 64 |
claytong | 0:82ff15078322 | 33 | |
claytong | 0:82ff15078322 | 34 | // Size of LPF output per Buffer |
claytong | 0:82ff15078322 | 35 | // (BUFFERSYS_SIZE/DECIMATION_RATIO) |
claytong | 0:82ff15078322 | 36 | #define LPF_OUTPUTS_SIZE 8 |
claytong | 0:82ff15078322 | 37 | |
claytong | 0:82ff15078322 | 38 | // Decimation Rate (35156/64 = 549 SPS) |
claytong | 0:82ff15078322 | 39 | #define DECIMATED_RATE (SAMPLE_RATE/DECIMATION_RATIO) |
claytong | 0:82ff15078322 | 40 | |
claytong | 0:82ff15078322 | 41 | // Scale Factor rate of FIR filter result to output sample |
claytong | 0:82ff15078322 | 42 | // 32 bit sample * 16 bit coefficient * 511 scaled down to 32 bits |
claytong | 0:82ff15078322 | 43 | // 32+16+9 bits = 57. Reduce by 25 |
claytong | 0:82ff15078322 | 44 | #define FIR_SHIFT_FACTOR 25 |
claytong | 0:82ff15078322 | 45 | |
claytong | 0:82ff15078322 | 46 | // First LO in the Softrock (10.125MHz) |
claytong | 0:82ff15078322 | 47 | #define FIRST_LO (ADC_CLOCK*3/4) |
claytong | 0:82ff15078322 | 48 | |
claytong | 0:82ff15078322 | 49 | // Test NCO freq - approx 15kHz |
claytong | 0:82ff15078322 | 50 | #define TEST_NCO_FREQ (15600) |
claytong | 0:82ff15078322 | 51 | |
claytong | 0:82ff15078322 | 52 | // Size of each sample set in bytes - size of TDataSample |
claytong | 0:82ff15078322 | 53 | #define SAMPLE_SET_SIZE (8) |
claytong | 0:82ff15078322 | 54 | |
claytong | 0:82ff15078322 | 55 | // QRSS System UDP Port |
claytong | 0:82ff15078322 | 56 | #define QRSS_UDP_PORT 6595 |
claytong | 0:82ff15078322 | 57 | |
claytong | 0:82ff15078322 | 58 | // comments |
claytong | 0:82ff15078322 | 59 | |
claytong | 0:82ff15078322 | 60 | // Macros |
claytong | 0:82ff15078322 | 61 | |
claytong | 0:82ff15078322 | 62 | #endif |
claytong | 0:82ff15078322 | 63 | |
claytong | 0:82ff15078322 | 64 | //--------------------------------------------------------------------------- |
claytong | 0:82ff15078322 | 65 | // END |
claytong | 0:82ff15078322 | 66 | //--------------------------------------------------------------------------- |
claytong | 0:82ff15078322 | 67 |