Panteltje's fm_pic page

Panteltje's fm_pic page


A PIC 18F14K22 programmed to control a small BH1415F based FM transmitter module (ebay item nr: 230608931311) via RS232, also a LCD display shows the selected settings.

fm.asm and fm_test.c are released under the GPL license.




A tgz archive with the asm source code for the 18F14K22 for gpasm, will likely not work without modification in MPLAB.
Also included is fm_test.c, a test program to program the FM module via 4 pins from the PC par port (using SPI), in case you have no PIC.
Click here to download fm_pic-0.1.tgz


The circuit diagram.
This uses a 7805 5 V regulator, a switcher would be better here, the 7805 gets quite hot when the display brightnes is maximum.

fm_pic circuit diagram


The hardware, here shown connected to my Creative Labs muvo mp3 player, of course you can use a PC soundcard from the media PC:
fm_pic in action


The backside of the PCB, note the litte module:
fm_pic PCB backside



RS232 commands, this is the 'help' response from fm_pic, if you type 'h':
Panteltje (c) fm_pic-0.1

RS232 commands 115200 Bd 1 start bit, 8 data bits, 1 stop bit:

BnnnENTER set LCD brightness, from 0(min) to 255(max), default 128, saved in EEPROM.
C mute (cut) audio, saved in EEPROM.
c unmute audio, default, saved in EEPROM.
D debug on, prints SPI bits.
d debug off, default.
E flash clock separator, default off, saved in EEPROM.
e do not flash clock separator, default off, saved in EEPROM.
GnnnENTER set clock calibration, set timer1 reload, default 175, saved in EEPROM.
FnnnENTER set frequency MHz, default 107, saved in EEPROM.
.nnENTER set frequency in .1 MHz steps, default 2 (makes 107.2 MHz), saved in EEPROM.
HnnENTER set hour.
h help, this help.
MnnENTER set minute.
O power to transmitter on, default, saved in EEPROM.
o power to transmitter off, saved in EEPROM.
Pn set phase comparator output, p0 = normal, p1 = high, p2 = low, p3 = tristate, default is p0, saved in EEPROM.
S select stereo mode, default, saved in EEPROM
s select mono mode, saved in EEPROM.
v print status: power mode, frequency, mute mode, stereo mode, phase comparator mode, time, clock calibration, LCD brightness.

This is what the status command looks like (if you type 'v'):
Frequency = 107.2 MHz
Stereo
Not muted
Phase comparator mode = normal
TX power = on
Clock separator = not flashing
Clock calbration = 175
Time = 0:18
PWM = 255

fm_pic in box, been on for more than 6 hours here:
fm_pic in box


Click here for some programs I make available under the GPL.

Click here to send mail