| 数据搜索系统,热门电子元器件搜索 |
|
MPXM2010D 数据表(PDF) 21 Page - Freescale Semiconductor, Inc |
|
|
|||||||||||||||||||||||||||||
MPXM2010D 数据表(HTML) 21 Page - Freescale Semiconductor, Inc |
|
21 / 24 page ![]() AN1950 Sensors Freescale Semiconductor 21 bset 3,porta bclr 3,porta ;toggle E bsr del100us ;data only requires 40us for LCD to execute rts ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; shiftA: shifts A into shift register and provides 8-bits to LCD ; ------ shiftA: psha mov #$08,BB ;will be shifting 8 bits all8: lsla ;get bit bcc shift0 ;if bit=0 then shift a 0 shift1: bset 4,porta ;otherwise shift a 1 bra shift shift0: bclr 4,porta ;bit 4 is data to shift register shift: bclr 5,porta ;bit 5 is shift register clock bset 5,porta bclr 5,porta ;toggle CLK dbnz BB,all8 ;do all 8 bits pula rts ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; lcdnibo: displays 1 character (0-9,A-F) based on low-nibble value in A ; ------- lcdnibo: psha ;convert 4 bits from binary to ascii add #$30 ;add $30 (0-9 offset) cmp #$39 ;is it a number (0-9) ? bls d0to9b ;if so skip add #$07 ;else add $07 = total of $37 (A-F offset) d0to9b: bsr lcdchro pula rts ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; lcdbyto: displays 2 characters based on hex value in A ; ------- lcdbyto: psha psha ;remember A (for low nibble) lsra ;shift right 4 times lsra lsra lsra bsr lcdnibo ;high nibble pula and #$0F bsr lcdnibo ;low nibble pula rts ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; lcdstro: displays message ending in '@', but also sends commands to LCD ; ------- lcdstro: psha lda 0,x lcon: cmp #$80 ;if ASCII >=$80 bhs iscmd cmp #$1F ;or <=$1F then bls iscmd ;assume it is a command to LCD isdta: bsr lcdchro ;otherwise it is data to LCD reuse1: aix #$0001 ;next character lda 0,x ;indexed by x cmp #$40 ;continue until bne lcon ;character = '@' |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |