; 4 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,( %00001000,%00000100,%00000010,%00000001,%00001000,%00000100,%00000010,%00000001 ) ;EEPROM 0,( %00000001,%00000001,%00000001,%00000001,%00000001,%00000001,%00000001,%00000001 ) ;EEPROM 0,( %00001010,%00000101,%00001010,%00000101,%00001010,%00000101,%00001010,%00000101 ) ;EEPROM 0,( %00000001,%00001000,%00000001,%00001000,%00000001,%00001000,%00000001,%00001000 ) ;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 ;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 ;period pause 970 ;milliseconds. 1s period. ;wait 1 ;seconds next b10 goto main