hi,
i need some help on my codes. the situation is as follows:
Initially, the frequency for each channels are the same at 87.5MHz (also it is the lowest FM range). Now the task is to have different freq for each channels.
I modified the original codes to look like below. But obviously it doesnt work, because I am missing the lower freq (freqs below the defined FM_LOW).
Please help me shed some light on other methods!
i need some help on my codes. the situation is as follows:
Initially, the frequency for each channels are the same at 87.5MHz (also it is the lowest FM range). Now the task is to have different freq for each channels.
I modified the original codes to look like below. But obviously it doesnt work, because I am missing the lower freq (freqs below the defined FM_LOW).
Please help me shed some light on other methods!
#define FM_MAX_1 (FM_LMT - FM_LOW_1)*2 // for ch 1 #define FM_MAX_2 (FM_LMT - FM_LOW_2)*2 // for ch 2 #define FM_LMT 1080 // for all ch available #define FM_LOW_2 879 // for ch 1 #define FM_LOW_3 981 // for ch 2 static uint max (void); static uint min (void); static uint max (void) { switch (ra_getRaBand()) { case FM1: switch (ra_getPCH()) { case 0: break; case 1: return FM_MAX_1; case 2: return FM_MAX_2; default: return FM_MAX_1; } case FM2: return FM_MAX_1; case FM3: return FM_MAX_1; default: return FM_MAX_1; } } static uint min (void) { switch (ra_getRaBand()) { case FM1: switch (ra_getPCH()) { case 0: break; case 1: return FM_LOW_1; case 2: return FM_LOW_2; default: return FM_LOW_1; } case FM2: return FM_LOW_1; case FM3: return FM_LOW_1; default: return FM_LOW_1; } } /*the FM range must start from 87.5MHz and ends at 108.0MHz, therefore the FM_LMT is the highest fm range and FM_LOW is the lowest fm range. Initially, the program has #define FM_LOW 875, and will display on LCD as 87.5MHz. Now the task is to change it to have different frequencies on each channels once the tuner is turned on. By using the method above, I am missing the low frequency (87.5MHz until what is set to be the lowest FM range, in this case, until 87.9MHz and 98.1MHz*/