星期二, 9月 20, 2005

PT6961 Sample Code

Command 0x03 1 : 7 digit 11 seg
Command 0x8F 4 : Display On, Pulse width 14/16
----clear ram----
Command 0x40 2 : Normal, Increment, Write to disp
Command 0xC0 - Data 0x00 repeat 14. 3 : write 14 datas to ram, start from 0
----load---------
Command 0x44 2 : Normal, Fix, Write to disp
----address:data set
Command 0x44 2 : Normal, Fix, Write to disp
Command Addr - Data Data
-0xC0 : 0x38 write 0x38 on 0
-0xC2 : 0x18 write 0x18 on 2
-0xC4 : 0x38 write 0x38 on 4
-0xC6 : 0x2C
-0xC8 : 0x3C
-0xCA : 0x1C
-0xCC : 0x30
REPEAT 4 Times
----set ram
Command 0x40 2 : Normal, Increment, Write to disp
Command 0xC0 Data 0xFF repeat 14 3 : Write 14 0xFF to disp starts from 0
----read key
Command 0x42 Read Data repeat 4 2 : Normal, Increment, Read 4 data.

沒有留言:

網誌存檔