The pascal code immediatly below is a procedure, Frompic and is called during the Read operation after the pic has been programmed and essentially holds the address [0..1024] and the 14 bits of data comming from the pic16f628A..
so what it does , is take the data from the pic and converts it to HEX digits
1) question:: how can i "elegantly" achieve this.
2) problem:: the last four lines of code show what i mean..in there i take the two msb's that have four possible outcomes .ie bit14is 0 bit13 is 0 :
utput is 0....bit14 is 0 , bit13 is a 1 :
utput is one...ect...
ok as it is now each of the longer decision lines of code would require 16 lines of code, to test from 0 to F...
Is there another way to do it without 48 + 4 lines of code..??