DAT con P4 CMD con P5 CLK con P7 SEL con P6 temp1 var byte index var byte temp var byte(21) cntr var byte mode var byte small var byte large var byte high CLK test low SEL shiftout CMD,CLK,FASTLSBPRE,[$1\8,$43\8,$0\8,$1\8,$0\8] ;Config Enable high SEL low SEL shiftout CMD,CLK,FASTLSBPRE,[$01\8,$44\8,$00\8,$01\8,$03\8,$00\8,$00\8,$00\8,$00\8] ;Set Mode and Fix(Analog high SEL pause 100 low SEL shiftout CMD,CLK,FASTLSBPRE,[$01\8,$4D\8,$00\8,$00\8,$01\8,$ff\8,$ff\8,$ff\8,$ff\8] ;Vibration Enable high SEL low SEL shiftout CMD,CLK,FASTLSBPRE,[$01\8,$43\8,$00\8,$00\8,$00\8,$00\8,$00\8,$00\8,$00\8] ;Config Exit high SEL main low SEL shiftout CMD,CLK,FASTLSBPRE,[$1\8] shiftin DAT,CLK,FASTLSBPOST,[mode\8] high SEL low SEL shiftout CMD,CLK,FASTLSBPRE,[$1\8,$42\8] for index = 0 to 2 shiftin DAT,CLK,FASTLSBPOST,[temp(index)\8] next high SEL low SEL shiftout CMD,CLK,FASTLSBPRE,[$1\8,$42\8,$0\8,large\8,small\8] for index = 3 to 6 shiftin DAT,CLK,FASTLSBPOST,[temp(index)\8] next high SEL serout S_OUT,i57600,[13,hex2 mode\2] for index = 1 to 6 serout S_OUT,i57600,[" ",dec3 temp(index)\3] next small = temp(7) large = temp(8) goto main