Code:define osc 4 include "bs2defs.bas" wait: SERIN PORTa.1,N9600,["K"],myVar IF myVar = 51 THEN out ' Ascii 51 = decimal 3 (When you type 3 myvar will be 51) goto Wait ' this line is esential otherwise any key will activate the function out: HIGH PORTb.7 PAUSE 300 LOW PORTb.7 goto wait
This is the code that Dave suggested.
From keyboard type K3 to activate portB.7 for 300 millisecs.
Al.
Bookmarks