Dobrze podłączone? Dobre wartości dla rezystorów? Boję się tylko żeby się nie popaliło od zbyt dużego prądu...
Poniżej kod dla 8051 (wiem że prymitywne zapalanie segmentów, później się zrobi "prawidłowo"
$MOD51 ; This includes 8051 definitions for the Metalink assembler
; Please insert your code here.
JMP START
ORG 100H
START:
MAIN:
CLR P0.0 ; WL
CALL EIGHT
CALL DELAY
CALL CLEAR
CALL TWO
CALL DELAY
CALL CLEAR
JMP MAIN
DELAY:
MOV R0, #255
FIRST:
MOV R1, #255
INNER:
NOP
NOP
NOP
DJNZ R1, INNER
DJNZ R0, FIRST
RET
CLEAR:
MOV P2, #11111111B
RET
EIGHT:
CLR P2.0 ; SEGMENT
CLR P2.1 ; SEGMENT
CLR P2.2 ; SEGMENT
CLR P2.3 ; SEGMENT
CLR P2.4 ; SEGMENT
CLR P2.5 ; SEGMENT
CLR P2.6
RET
TWO:
CLR P2.0 ; SEGMENT
CLR P2.1 ; SEGMENT
CLR P2.3 ; SEGMENT
CLR P2.4 ; SEGMENT
CLR P2.6
RET
END