74hc595 驱动8*8 点阵protues原理图

最好附带c语言的程序新手求助好心人帮帮忙啊... 最好 附带c语言的程序 新手求助 好心人 帮帮忙啊 展开
 我来答
百度网友283d78e
2013-09-26 · 知道合伙人IT服务行家
百度网友283d78e
知道合伙人IT服务行家
采纳数:1491 获赞数:2982

向TA提问 私信TA
展开全部
汇编的有,c的没有

;16X16LED点阵流动显示
;逐列、逆向(低位开始)扫描
;====================================================================
SDATA_595_1 EQU P2.1 ;串行数据输入
SCLK_595_1 EQU P2.0 ;移位时钟脉冲
RCK_595_1 EQU P2.2 ;输出锁存器控制脉冲
ORG 0000H
AJMP MAIN
ORG 0030H
MAIN:MOV DPTR,#TAB ;字码表初址赋值
MOV R1,#00H ;列控制码
MOV R4,#96 ;移动“ ”及“单片机仿真”6个字符,共96列
CM: MOV R5,#5 ;每屏反复显示5次
MOV R3,#16 ;列数
C1: MOV R2,#0 ;取码指针
C16:MOV 60H,#00H
MOV 61H,#00H
CALL OUT_595
MOV A,R2
MOVC A,@A+DPTR ;取当前列显示字码的第一个字节
MOV 60H,A ;送1~8行控制口
INC R2
MOV A,R2
MOVC A,@A+DPTR ;取当前列的显示字码的第二个字节
MOV 61H,A ;送9~15行控制口
CALL OUT_595
INC R2
MOV P1,R1 ;送列控制码
INC R1
ACALL D1MS ;显示2MS
ACALL D1MS
DJNZ R3,C16 ;一屏16列是否显示完
MOV R3,#16
DJNZ R5,C1 ;未显示5次,继续
INC DPTR ;一屏反复显示5次完,字码表初值加2
INC DPTR
//INC DPTR ;一屏反复显示5次完,字码表初值加2
//INC DPTR
DJNZ R4,CM ;96列未移动完,继续
AJMP MAIN ;96列移动完,返回,重新从“ ”开始显示
D1MS: MOV R6,#2
MOV R7,#248
DJNZ R7,$
DJNZ R6,$-4
RET
;----------------------------------------------------------------------
;输出锁存器输出数据子程序
;----------------------------------------------------------------------
OUT_595:
LCALL WR_595
CLR RCK_595_1
NOP
NOP
SETB RCK_595_1 ;上升沿将数据送到输出锁存器
NOP
NOP
CLR RCK_595_1
RET
;---------------------------------------------------------------------
;移位寄存器接收数据子程序
;---------------------------------------------------------------------
WR_595:
MOV R0,#08H ;
MOV A,61H

WR_LOOP_1:
CLR SCLK_595_1
RLC A
MOV SDATA_595_1,C
SETB SCLK_595_1 ;上升沿发生移位
DJNZ R0,WR_LOOP_1

MOV R0,#08H
MOV A,60H

WR_LOOP_2:
CLR SCLK_595_1
RLC A
MOV SDATA_595_1,C
SETB SCLK_595_1 ;上升沿发生移位
DJNZ R0,WR_LOOP_2

RET

TAB:

DB 000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ;
DB 000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ;" ",

DB 000H ,000H ,000H ,008H ,000H ,008H ,0E0H ,008H ,0F4H ,00DH ,054H ,005H ,0F4H ,07FH ,0F8H ,07FH ;
DB 01EH ,005H ,0FEH ,005H ,0FAH ,006H ,010H ,002H ,000H ,006H ,000H ,004H ,000H ,000H ,000H ,000H ;"单",0

DB 000H ,000H ,000H ,000H ,000H ,010H ,000H ,01CH ,0FCH ,00FH ,0FCH ,003H ,040H ,002H ,040H ,002H ;
DB 07EH ,07FH ,03EH ,07FH ,020H ,000H ,020H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ,000H ;"片",1

DB 000H ,008H ,040H ,00CH ,040H ,006H ,0DCH ,03FH ,0FEH ,03FH ,022H ,011H ,020H ,01DH ,0F0H ,00FH ;
DB 0F0H ,003H ,0F0H ,00FH ,0F0H ,01FH ,010H ,010H ,000H ,01CH ,000H ,01CH ,000H ,010H ,000H ,000H ;"机",2

DB 000H ,001H ,080H ,001H ,0C0H ,000H ,0F0H ,03FH ,0FCH ,03FH ,04CH ,018H ,040H ,00CH ,040H ,027H ;
DB 0CCH ,063H ,0ECH ,079H ,028H ,01FH ,020H ,007H ,020H ,000H ,020H ,000H ,000H ,000H ,000H ,000H ;"仿",3

DB 000H ,000H ,000H ,010H ,000H ,098H ,000H ,0C8H ,0E8H ,06FH ,0E8H ,03FH ,07CH ,01BH ,07EH ,00AH ;
DB 0E6H ,03FH ,0E4H ,07FH ,004H ,06CH ,000H ,004H ,000H ,004H ,000H ,000H ,000H ,000H ,000H ,000H ;"真",4

END
广州晶晟电子
2023-08-29 广告
广州晶晟电子科技有限公司一直专注生产销售中高端石英晶体谐振器和石英晶体振荡器。公司拥有从美国、日本、德国进口的生产及检测设备,超净化生产环境,娴熟的工艺及专业的技术人员。通过质量和服务获得了ISO9001质量体系认证和ISO14001环境体... 点击进入详情页
本回答由广州晶晟电子提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式