r****s 发帖数: 32 | 1 各位高手帮忙看一下,最好帮我写一下,我真的不懂,麻烦了,谢谢~~~
电路见附件
输入D0-D7
输出8*8 或5*7 LED 矩阵 请显示输出A-Z
谢谢了,兄弟姐妹们~~~ | i**h 发帖数: 424 | 2 Why 00000100 -> C?
What does 00000011 do?
非专业解答
假设LED电流方向是从01234567 -> abcdefgh
MOV DPTR, #FontData
loop:
MOV R0, P0 ;read current input
CLR C ;clear carry flag
MOV A, 1 ;rowId=0
next_row: ;might need a short delay between rows
MOV R1, DPTR + R0 ;read bitmap from font data
MOV P1, A ;select row
MOV P3, R1 ;light row
RLC A ;rowId++
INC R0 ;next byte in font data
JNC next_row ;go to next row
SJMP loop ;refresh
font_data:
DB Byte-A-Row0 ;use 0 for on-pixel, 1 for off-pixel
...
DB Byte-A-Row7
DB Byte-B-Row0
...
...
...
DB Byte-Z-Row7 |
|