PDA

View Full Version : repeater on/off



kobie c. agosto
- 17th February 2009, 10:44
i am new here and my 1st year in my hobby. I am a ham radio operator
and i like to assemble a simple repeater controller using PIC12F509 and LM567
here is my my program,

@ device pic12f509,intrc_osc,wdt_off,mclr_off,protect_off
Define OSCCAL_1K 1

'pin assignments

ptt var gpio.0
snd var gpio.1 ' sound pin
mute var gpio.2
cor var gpio.3
jumper var gpio.4 ' beep selector
ct var gpio.5 ' connected to pin 8 of LM567

'variables
x var byte

ini:
option_reg.5 = 0
trisio = %111000

pause 1000

begin:
if cor = 0 then tx
ptt = 0 : snd = 0
mute = 1
pause 100
goto start

tx:
mute = 0 : ptt = 1

loop:
if cor = 0 then beep
pause 100
goto loop

beep:
mute = 1: pause 50
sound snd,[ 115,12]

delay:
for x = 0 to 5
if cor = 0 then tx
pause 100 : next x
ptt = 0
goto begin

all i got! really i don't know how to execute when the ct pin low about 30sec(receaves long tone of 1750hz) it will enable/disable the repeater.

73!
kobie

mackrackit
- 17th February 2009, 23:26
What radio are you using? Might be a better way of doing this that is more reliable.

Is this your first time with a PIC?

kobie c. agosto
- 18th February 2009, 06:27
hello there!

well to tell the truth it is my sixth month playing with this little thing. it start with my project in school, well don't know about assembly language,
somebody introduce me this language.
my dad was using alinco dr195 and dx70t before, and it is mine now.

73!
kobie

mackrackit
- 18th February 2009, 14:50
I am not familiar with those rigs. Which one can be configured as a repeater? I ask out of curiosity, the couple of rigs I have setup as repeaters in the past could be controlled remotely via the key pad on the mic.

As a disclaimer... Are you in the US? Have you read and understand the FCC rules regaurding repeater operation? Guess so or you would not be worrying about remote control. :)

I have not used the LM567 either... Gonna be a lot of help, arn't I :D

On to the code...

To start lets assume th LM567 is working as expected, pin 8 goes LOW when 1750hz is detected.

For testing use a momentary push button in place of the LM567. Connect a pull up resistor to GPIO.5, a 10K will be fine.(resistor will go to 5 volt) Connect one side of the push button to ground(zero) and the other to GPIO.5. This will make GPIO.5 idle HIGH, when the button is pushed GPIO.5 is forced LOW. Should simulat the LM567.

Connect an LED to GPIO.1 with a 470 resistor so when GPIO.1 is HIGH the LED lights.



@ device pic12f509,intrc_osc,wdt_off,mclr_off,protect_off
Define OSCCAL_1K 1
'I will assume the config is correct, I have not checked
LOW GPIO.1
START:
IF GPIO.5 = 0 THEN IN_CK
GOTO START

IN_CK:
PAUSE 30000
IF GPIO.5 = 0 THEN LED
GOTO START

LED:
HIGH GPIO.1
STOP

The above is a one shot. If you need to turn the LED off again look at the TOGGLE command, but get the above working and we will go from there.

kobie c. agosto
- 19th February 2009, 07:12
hello Dave and Hi to all!

Thank you Dave for your response. I am from Phil. and I know some rule regarding to set up a repeater here, but all I know was they are using original controller.CAT was so familiar 'coz with voice synthesizer and may be some of them are homebrew.
Yes Dave they using touch tone to remotely control their repeater. I heard that some of countries using long tone to enable their repeater, so I decided to make my own with curiousity.So I am here posting and might somebody gave me guidance. I am familiar of using LM567 using tone encoder
and decoder,last year our Instructor introduced to us. (pardon my English)
I copy the code and it is working perfectly. I did also change the High LED to Toggle Led and Goto Start. , well now how can I insert this in my program? Hmmmmm have to play it again... Thanks Teacher Dave!

73!
Kobie

mackrackit
- 19th February 2009, 13:21
Great! It worked!


well now how can I insert this in my program?
The program you have posted has a GOTO START and I do not see a START, so maybe there is more code? Maybe it is supposed to be GOTO BEGIN ?

If you need more help with this post a schematic. I am not sure where all of the PINs go to.
I would guess the routine I posted would be near the start of the code and in place of the LED it would be connected to the repeater switch/relay/input? of the radio.?

kobie c. agosto
- 19th February 2009, 14:38
Hello Dave!
Hi to all!

Yes Dave your code is working fine. I just did what you instructed! :) hmmm about the schematic I don't know if you understand my drawing, well here it is! I am using circuit wizard two weeks now but still not familiar with it.
:oThere is no radio TX/RX to turn on and off only the PTT pin. Oppps! I don't know how to insert the image!

73!
kobie