1968neil
Senior Member
Hi All,
Having a blonde moment.....
I am reading a full port
What i cant get my head around is this :
The input is read from a 40 way switch that controls a PLL chip (like the ones used in old CB Radios back in the 80's), goes off and does its gosub and comes back. All fine.
What i need it to do is wait until the switch changes before it goes back to read the port.
Any input gladly received.
Regards
Neil
Having a blonde moment.....
I am reading a full port
Code:
main:
let b1 = pinsC & %00111111
;************************************************************************************
; DATA_DEFINITION FROM SWITCH *
;************************************************************************************
if b1 = %00000001 then gosub SW1 ; HEX Value = $01
if b1 = %00000010 then gosub SW2 ; HEX Value = $02
if b1 = %00000011 then gosub SW3 ; HEX Value = $03
if b1 = %00000100 then gosub SW4 ; HEX Value = $04
if b1 = %00000101 then gosub SW5 ; HEX Value = $05
if b1 = %00000110 then gosub SW6 ; HEX Value = $06
if b1 = %00000111 then gosub SW7 ; HEX Value = $07
if b1 = %00001000 then gosub SW8 ; HEX Value = $08
if b1 = %00001001 then gosub SW9 ; HEX Value = $09
if b1 = %00010000 then gosub SW10 ; HEX Value = $10
Goto main
The input is read from a 40 way switch that controls a PLL chip (like the ones used in old CB Radios back in the 80's), goes off and does its gosub and comes back. All fine.
What i need it to do is wait until the switch changes before it goes back to read the port.
Any input gladly received.
Regards
Neil