; 8 LEDs illumination #picaxe 08m2 ;#no_data ;Do not download(clear) EEPROM data. ;b0-7 shift data ;b10 for loop counter ;b11 data work ; Initialization low C.2 ;reset start low C.4 ;DATA high C.1 ;CLK high C.2 ;reset end ; save values in EEPROM EEPROM 0,( %00000001,%00000010,%00000100,%00001000,%00010000,%00100000,%01000000,%10000000 ) ;EEPROM 0,( %00000001,%00000001,%00000001,%00000001,%00000001,%00000001,%00000001,%00000001 ) ;EEPROM 0,( %10101010,%01010101,%10101010,%01010101,%10101010,%01010101,%10101010,%01010101 ) ;EEPROM 0,( %00000001,%10000000,%00000001,%10000000,%00000001,%10000000,%00000001,%10000000 ) ;read EEPROM main: for b10 = 0 to 7 read b10,b11 ; read value at EEPROM into b11 ;Preprocessing b0 = b11 and %00000001 ;check D0 = 1 b1 = b11 and %00000010 ;check D1 = 1 b2 = b11 and %00000100 ;check D2 = 1 b3 = b11 and %00001000 ;check D3 = 1 b4 = b11 and %00010000 ;check D4 = 1 b5 = b11 and %00100000 ;check D5 = 1 b6 = b11 and %01000000 ;check D6 = 1 b7 = b11 and %10000000 ;check D7 = 1 ;toggle C.0 ;for debug ;data shift if b0 = 0 then low C.4 else high C.4 end if ;low C.2 ;reset old data ;high C.2 low C.1 ;toggle CLK high C.1 if b1 = 0 then low C.4 else high C.4 end if low C.1 ;toggle CLK high C.1 if b2 = 0 then low C.4 else high C.4 end if low C.1 ;toggle CLK high C.1 if b3 = 0 then low C.4 else high C.4 end if low C.1 ;toggle CLK high C.1 if b4 = 0 then low C.4 else high C.4 end if low C.1 ;toggle CLK high C.1 if b5 = 0 then low C.4 else high C.4 end if low C.1 ;toggle CLK high C.1 if b6 = 0 then low C.4 else high C.4 end if low C.1 ;toggle CLK high C.1 if b7 = 0 then low C.4 else high C.4 end if low C.1 ;toggle CLK high C.1 ;period pause 970 ;milliseconds. 1s period. ;wait 1 ;seconds next b10 goto main