Seems so simple I'm missing something ! Using a protoboard with leds on each output then Relay2 doesn't work.
Code:
;*****************************************************
;
; Target Controller - PIC12F675 - Linear RF Amplifier Sequencer
; _______
; VDD +5V |1 8| Vss Ground
; PTT -GP5 |2 7| GP0--Ant Relay
; Standby -GP4 |3 6| GP1--Relay 1
; -GP3 |4 5| GP2--Relay 2
; --------
;
; *****************************************************
Antenna VAR GPIO.0
Relay1 VAR GPIO.1
Relay2 VAR GPIO.2
Standby VAR GPIO.4 ;inhibit ptt swtch
PTT VAR GPIO.5
TRISIO = %00110000 ; GPIO 4 & 5 as inputs
ADCON0 = 0 ; adc off
ANSEL = 0
CMCON=7 ; comparator off
Define OSC 4
pause 50 ; Settle time
main:
IF standby = 0 then main
WHILE PTT = 0
HIGH Antenna
PAUSE 100
HIGH Relay1
PAUSE 10
HIGH Relay2
WEND
LOW Relay2
PAUSE 10
LOW Relay1
PAUSE 100
LOW Antenna
GOTO main
END
Bookmarks