#Code:clear define osc4 cmcon0=7 ansel=0 led var byte ledstates var byte trisstate var byte delay var word noghost var byte noghost= %111111 delay= 1500 porta = %110111 main: for led = 0 to 3 select case led case 0 : ledstates =%000 : trisstate =%111 case 1 : ledstates =%010 : trisstate =%100 case 2 : ledstates =%001 : trisstate =%100 case 3 : ledstates =%100 : trisstate =%001 end select trisio = noghost gpio = ( gpio & %111000) | ledstates trisio = (trisio & %111000) | trisstate pause delay next led trisio = noghost for led = 0 to 2 select case led case 0 : ledstates =%010 : trisstate =%001 case 1 : ledstates =%100 : trisstate =%010 case 2 : ledstates =%001 : trisstate =%010 end select trisio = noghost gpio = ( gpio & %111000) | ledstates trisio = (trisio & %111000) | trisstate pause delay next led trisio = noghost goto main end this could be a a useful tool but I wonder how long the list can be and still be visible
testmultiplex 16 led test pbpro recreated program.pdf
Bookmarks