Hi,

Thanks for your reply,

The program I am trying to get going is to get an lcd display to display the status of a low power ham radio repeater,
The pic's i/p lines will be connected to the control lines of the radio control circuit.

I have re-writen the program using the IF, THEN commands and all I get is the setup message and lcd back light,
The display remains blank no matter what the i/p lines are doing.
(I/P pins are 10k to Gnd.)

The program I am trying to get working follows:-
(please feel free to rip it apart and advise me where I am going wrong)

Cheers
Dave...


TRISA=%00000000 'Set port A as output
TRISB=%01110111 'Set port B as input except B7 for backlight and B3 for lcd

Backlight VAR PortB.7 'Set var as port B7

SW1 VAR PORTB.0
SW2 VAR PORTB.1
SW3 VAR PORTB.2
SW4 VAR PORTB.4
SW5 VAR PORTB.5
SW6 VAR PORTB.6

Pause 500 'stand by for lcd

lcd_light: 'light up lcd backlight
low Backlight

gosub setup
goto loop

setup:

LCDOUT $FE,1 'clear lcd
lcdout " G7JIQ Micro" 'Display on line 1
lcdout $FE, $C0 'Display on line 2
Lcdout " Link Repeater"
pause 2000
LCDOUT $FE, $0C 'turn off cursor
lcdout $FE,1 'clear display
lcdout $FE,2
return

loop:

if SW1 = 0 then Disp1
if SW1 = 1 then Disp2
IF SW4 = 0 THEN Disp3
if SW4 = 1 THEN Disp4

goto loop


Disp1
lcdout "Standby"
Disp2
lcdout "Main"
Disp3
lcdout $FE,$C0,"Local off " 'display on line 2
lcdout $FE,1
Disp4
LCDOUT $FE,$C0,"local on"
lcdout $FE,1


end