saa1064芯片的單片機驅(qū)動程序
main()
{
unsigned char a[8];a[0]=0x77;//
a[1]= N_leab_led_7[0];
a[2]= N_leab_led_7[1];
a[3]= N_leab_led_7[2];
a[4]= N_leab_led_7[3];
WriteNByte(0x70,0x00,a,5); ////0X70 ->0 1 1 1 0 A1 A0 R/W A1 A0(11:ADR=VCC 10:5/8VCC 01:3/8VCC 00:VEE) R/W (1:READ 0:WRITE)//0x00 -> 0 0 0 0 0 sc sb sa sc sb sa(000:control register 001:digit 1 010:digit 2 011:digit 3 011:digit 4)//0x77-> 0 c6 c5 c4 c3 c2 c1 c0 c0 = 0 靜態(tài)顯示 顯示digit 1 digit 2 c0= 1交替顯示digit 1 digit 3 +digit2 digit 4//c1 = 0 關閉digit 1 digit3 c1 = 1 開啟digit 1 digit 3// c2 = 0 關閉digit2 digit4 c2= 1 開啟digit2 digit4// C3= 1 test 開所有斷碼 // c6 c5 c4對應 3 6 12MA
while(1)
{}}
評論