段码液晶屏主要是用来替代LED数码管,它是由7个笔段所组成,用来显示数字0~9,比如我们平时看到的计算器、加油站的显示器、电表、水表等,显示的汉字、logo等都是固定的,只是数字可以变动。
段码液晶屏用的比较多的是HT1621B的芯片,它可以驱动32×4=128个笔段,相当于16个“8”字。HT1621的接口是串行的,有CS,WR,RD(RD也可以不用),DATA几个引脚。
如下是段码液晶屏的汇编的编程资料,供大家参考:
CSA EQU P3.2
WR1621 EQU P3.0
;DA P1.7
ORG 0000H
LJMP MAIN
; 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 ,14 , 15 , 16 , 17, 18, 19, 20, 21, 22, 23,
SC0: DB 0A0H,0F0H,0A0H,0F0H,0A0H,0F0H,0A0H,0F0H,0A0H,0F0H,0A0H,0F0H,0A0H,0F0H,0A0H,0F0H,0F0H,050H,0F0H,050H,0F0H,050H,000H
SC1: DB 000H,060H,000H,060H,000H,060H,000H,060H,000H,060H,000H,060H,000H,060H,000H,060H,060H,000H,060H,000H,060H,000H,000H