Set a Freq in the FM Radio Module
deanwesterburg
Posts: 25
Has anyone had any success in setting a specific freq in the FM Radio?
I read the PDF but it does not specify if the FREQSET command is expecting MHZ, KHZ, or something else.
I tried using a channel function by figuring the number of 100 khz steps from the base freq (87 MHZ) to the desired freq (107.1) but was unsuccessfuly.
Any help would be appreciated!
Thanks,
Dean
I read the PDF but it does not specify if the FREQSET command is expecting MHZ, KHZ, or something else.
I tried using a channel function by figuring the number of 100 khz steps from the base freq (87 MHZ) to the desired freq (107.1) but was unsuccessfuly.
Any help would be appreciated!
Thanks,
Dean
Comments
PUB Main
FM.Initialize(8, 9) ' Start FM Radio object
FM.SeekThreshold(6) ' Set seek threshold
FM.VolumeSet(1) ' Set volume level to 1
dira[23..16]~~ ' Set LEDs to outputs
Buttons.start(_CLKFREQ / 100) ' Start button object
repeat
outa[23..16] := Buttons.State
if Buttons.State == %00000001 If the farthest right button is presses, goto a specific station
FM.FreqSet(107.1)
if Buttons.State == %10000000 ' If the P7 button is touched,
FM.SeekDown ' auto seek down for a station
if Buttons.State == %01000000 ' If the P6 button is touched,
FM.SeekUp ' auto seek up for a station
if Buttons.State == %00100000 ' If the P5 button is touched,
FM.VolumeDown ' turn the volume down
if Buttons.State == %00010000 ' If the P4 button is touched,
FM.VolumeUp ' turn the volume up
if Buttons.State == %00001000 ' If the P3 button is touched,
vol := FM.CheckVolume ' Store current volume level
LedVol ' Call LedVol Method
outa[23..16]~ ' Turn LEDs off
waitcnt(clkfreq/4 + cnt) ' Short pause
I have tried using the FM.FREQSET command with a specific freqency in MHZ, as well as the number of 100 khz steps from the base freq to the desired freq. The documentation on FM.FreqSet is somewhat non-descript on what it is expecting and I'm running out of things to try!
Thanks!
Dean
Let us know how that works out, and if you need any other help!
Thanks again!