虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

00H

  • --- ----initial------- MOVLA 00H IODIR PA IODIR PB IODIR PC MOVAM PA MOVAM BSR MOVAM S

    --- ----initial------- MOVLA 00H IODIR PA IODIR PB IODIR PC MOVAM PA MOVAM BSR MOVAM STATUS MOVAM TMR0 MOVAM TMR1 MOVAM TMR2 -------end initial----- -------------乘法运算------------ 乘数->10H 被乘数->11h 结果(积)->12H 14H 15H 16H 17H(中间运算) --------------------------------- MOVLA 05H 乘数

    标签: IODIR MOVAM initial MOVLA

    上传时间: 2015-06-25

    上传用户:sqq

  • --- ----initial--- - MOVLA 00H IODIR PA IODIR PB IODIR PC MOVAM PA MOVAM BSR MOVAM STA

    --- ----initial--- - MOVLA 00H IODIR PA IODIR PB IODIR PC MOVAM PA MOVAM BSR MOVAM STATUS MOVAM TMR0 MOVAM TMR1 MOVAM TMR2 ----------------------- MOVLA AAH 写入RAM的数据 MOVAM 08H MOVAM 09H MOVAM 0AH MOVAM 0BH MOVAM 0CH MOVAM 0DH MOVAM 0EH MOVAM 0FH MOVAM 10H MOVAM 11H MOVAM 12H MOVAM 13H

    标签: IODIR MOVAM initial MOVLA

    上传时间: 2013-12-29

    上传用户:wff

  • 定点十进制数转为二进制浮点操作数 入口:定点十进制整数在 R1,R2,R3中,其中R1为高字节 [如1: R1=00H,R2=00H,R3=01H] 定点十进制小数在 R4,R5,R6,R

    定点十进制数转为二进制浮点操作数 入口:定点十进制整数在 R1,R2,R3中,其中R1为高字节 [如1: R1=00H,R2=00H,R3=01H] 定点十进制小数在 R4,R5,R6,R7中,其中R4为高位字 [如0.1: R4=10H,R5=00H,R6=00H,R7=00H] 数符为7BH位,0表正,1表负 出口: R4,R5,R6,R7.其中R4为阶码,R5,R6,R7为尾数

    标签: 00 定点 十进制 01

    上传时间: 2014-12-22

    上传用户:GavinNeko

  • 把地址偏移量为100H单元开始的256个单元分别写入00H

    把地址偏移量为100H单元开始的256个单元分别写入00H,01H,...,FFH数据,并统计0、正数、负数的个数,把统计结果送入上述数据块之后的3个单元中,用DOS功能调用显示数据块各单元内容。

    标签: 100H 00H 256 地址

    上传时间: 2013-12-26

    上传用户:aappkkee

  • ORG 0000H ljmp star org 0003h ljmp $ star:mov p1,#00H mov p2,#00H mov p3,#00H int: setb ea

    ORG 0000H ljmp star org 0003h ljmp $ star:mov p1,#00H mov p2,#00H mov p3,#00H int: setb ea jiance bit p1.0 shoud bit p1.1 zid bit p1.2 syajin bit p1.3 smanjin bit p1.4 jkaiguan bit p1.5 xianwei bit p1.6 tingzhi bit p3.2 out: yajin bit p2.0 manjin bit p2.1 kuaijin bit p2.2 hanjie bit p2.3程序

    标签: mov ljmp star 00

    上传时间: 2014-01-09

    上传用户:athjac

  • DTMF编码芯片HT9200的51接口程序

    ·详细说明:DTMF编码芯片HT9200的51接口程序。输入参数R2表示发送数据个数,输入数据与发送数据与DTMF码的关系:00H-0 01H-1 02H-2 03H-3 04H-4 05H-5 06H-6 07H-7 08H-8 09H-9 0AH-A 0BH-B 0CH-C 0DH-D 0EH-* 0FH-#。详细说明参考文件内.

    标签: DTMF 9200 HT 编码芯片

    上传时间: 2013-06-02

    上传用户:jujiast99

  • 12864液晶中文资料(电路,程序,图片)

    带中文字库的128X64是一种具有4位/8位并行、2线或3线串行多种接口方式,内部含有国标一级、二级简体中文字库的点阵图形液晶显示模块;其显示分辨率为128×64, 内置8192个16*16点汉字,和128个16*8点ASCII字符集.利用该模块灵活的接口方式和简单、方便的操作指令,可构成全中文人机交互图形界面。可以显示8×4行16×16点阵的汉字. 也可完成图形显示.低电压低功耗是其又一显著特点。由该模块构成的液晶显示方案与同类型的图形点阵液晶显示模块相比,不论硬件电路结构或显示程序都要简洁得多,且该模块的价格也略低于相同点阵的图形液晶模块。 基本特性: 低电源电压(VDD:+3.0--+5.5V) 显示分辨率:128×64点 内置汉字字库,提供8192个16×16点阵汉字(简繁体可选) 内置 128个16×8点阵字符 2MHZ时钟频率 显示方式:STN、半透、正显 驱动方式:1/32DUTY,1/5BIAS 视角方向:6点 背光方式:侧部高亮白色LED,功耗仅为普通LED的1/5—1/10 通讯方式:串行、并口可选 内置DC-DC转换电路,无需外加负压 无需片选信号,简化软件设计 工作温度: 0℃ - +55℃ ,存储温度: -20℃ - +60℃ 12864(带字库汉字显示演示程序) ;*************************************************************************** ;* sxj1974@163.com (51c51 test web) www.8951.com * ;* Create by :石学军 www.51c51.com 更多例程请登陆网站 * ;*************************************************************************** RS EQU P2.0 RW EQU P2.1 E EQU P2.2 PSB EQU P2.3 RST EQU P2.5 ;----------------------------------------------- LCD_X EQU 30H LCD_Y EQU 31H COUNT EQU 32H COUNT1 EQU 33H COUNT2 EQU 34H COUNT3 EQU 35H ;----------------------------------------------- LCD_DATA EQU 36H LCD_DATA1 EQU 37H LCD_DATA2 EQU 38H STORE EQU 39H ;----------------------------------------------- ORG 0000H LJMP MAIN ORG 0100H ;----------------------------------------------- MAIN: MOV SP,#5FH CLR RST ;复位 LCALL DELAY4 SETB RST NOP SETB PSB ;通讯方式为8位数据并口 ;********************初始化********************** LGS0: MOV A,#34H ;34H--扩充指令操作 LCALL SEND_I MOV A,#30H ;30H--基本指令操作 LCALL SEND_I MOV A,#01H ;清除显示 LCALL SEND_I MOV A,#06H ;指定在资料写入或读取时,光标的移动方向 LCALL SEND_I ;DDRAM 的地址计数器(AC)加1 MOV A,#0CH ;开显示,关光标,不闪烁 LCALL SEND_I ;=============================================== TU_PLAY1: MOV DPTR,#TU_TAB1 ;显示图形 LCALL PHO_DISP LCALL DELAY3 ;================================================= ;;显示汉字和字符 ;加入80ms的延时,使你能够看清楚显示的过程 ;根据汉字显示坐标分段写入(顺序写入) ;================================================= HAN_WR2: LCALL CLEAR_P HAN_WR2A: MOV DPTR,#TAB1A ;显示汉字和字符 MOV COUNT,#10H ;地址计数器设为16。 MOV A,#80H ;第一行起始地址 LCALL SEND_I LCALL QUSHU HAN_WR2B: MOV DPTR,#TAB1B ;显示汉字和字符 MOV COUNT,#10H ;地址计数器设为16。 MOV A,#90H ;第二行起始地址 LCALL SEND_I LCALL QUSHU HAN_WR2C: MOV DPTR,#TAB1C ;显示汉字和字符 MOV COUNT,#10H ;地址计数器设为16。 MOV A,#88H ;第三行起始地址 LCALL SEND_I LCALL QUSHU HAN_WR2D: MOV DPTR,#TAB1D ;显示汉字和字符 MOV COUNT,#10H ;地址计数器设为16。 MOV A,#98H ;第四行起始地址 LCALL SEND_I LCALL QUSHU LCALL DELAY3 LCALL FLASH LCALL CLEAR_P JMP TU_PLAY2 ;---------------------------------------------- ;TU_PLAY1: MOV DPTR,#TU_TAB1 ;显示图形 LCALL PHO_DISP LCALL DELAY3 ;---------------------------------------------- TU_PLAY2: MOV DPTR,#TU_TAB2 ;显示图形 LCALL PHO_DISP LCALL DELAY3 ;---------------------------------------------- TU_PLAY3: MOV DPTR,#TU_TAB4 ;显示图形 LCALL PHO_DISP LCALL DELAY3 ;----------------------------------------------- ;显示点阵 ;----------------------------------------------- LATPLAY1: MOV A,#01H ;清屏 LCALL SEND_I MOV LCD_DATA1,#0CCH ;显示点阵 MOV LCD_DATA2,#0CCH LCALL LAT_DISP LCALL DELAY3 LCALL CLEAR_P KU_PLAY2: LJMP TU_PLAY1 ;=============================================== ;全屏显示图形子程序 ;=============================================== PHO_DISP: MOV COUNT3,#02H MOV LCD_X,#80H PHO_DISP1: MOV LCD_Y,#80H MOV COUNT2,#20H PHO_DISP2: MOV COUNT1,#10H LCALL WR_ZB PHO_DISP3: CLR A MOVC A,@A+DPTR LCALL SEND_D INC DPTR DJNZ COUNT1,PHO_DISP3 INC LCD_Y DJNZ COUNT2,PHO_DISP2 MOV LCD_X,#88H DJNZ COUNT3,PHO_DISP1 MOV A,#36H LCALL SEND_I MOV A,#30H LCALL SEND_I RET ;---------------------------------------------- CLRRAM: MOV LCD_DATA1,#00H ;GDRAM写0子程序 MOV LCD_DATA2,#00H LCALL LAT_DISP RET ;============================================== ;显示点阵子程序 ;============================================== LAT_DISP: MOV COUNT3,#02H MOV LCD_X,#80H LAT_DISP1: MOV LCD_Y,#80H CLR F0 MOV COUNT2,#20H LAT_DISP2: MOV COUNT1,#10H LCALL WR_ZB LAT_DISP3: JB F0,LAT_DISP32 MOV LCD_DATA,LCD_DATA1 AJMP LAT_DISP31 LAT_DISP32: MOV LCD_DATA,LCD_DATA2 LAT_DISP31: MOV A,LCD_DATA LCALL SEND_D DJNZ COUNT1,LAT_DISP31 INC LCD_Y CPL F0 DJNZ COUNT2,LAT_DISP2 MOV LCD_X,#88H DJNZ COUNT3,LAT_DISP1 MOV A,#36H LCALL SEND_I MOV A,#30H LCALL SEND_I RET ;--------------------------------------------- WR_ZB: MOV A,#34H LCALL SEND_I MOV A,LCD_Y LCALL SEND_I MOV A,LCD_X LCALL SEND_I MOV A,#30H LCALL SEND_I RET ;=============================================== FLASH: MOV A,#08H ;关闭显示 LCALL SEND_I LCALL DELAY5 MOV A,#0CH ;开显示,关光标,不闪烁 LCALL SEND_I LCALL DELAY5 MOV A,#08H ;关闭显示 LCALL SEND_I LCALL DELAY5 MOV A,#0CH ;开显示,关光标,不闪烁 LCALL SEND_I LCALL DELAY5 MOV A,#08H ;关闭显示 LCALL SEND_I LCALL DELAY5 RET ;================================================== ;清屏 ;================================================== CLEAR_P: MOV A,#01H ;清屏 LCALL SEND_I MOV A,#34H LCALL SEND_I MOV A,#30H LCALL SEND_I RET ;================================================== ;查表取数据送显示 ;================================================== QUSHU: CLR A MOVC A,@A+DPTR ;查表取数据 LCALL SEND_D ;送显示 INC DPTR LCALL DELAY4 ;延时80ms, DJNZ COUNT,QUSHU RET ;=============================================== ;写数据子程序 ;RS=1,RW=0,E=高脉冲,D0-D7=数据 ;=============================================== SEND_D: LCALL CHK_BUSY ;写数据子程序 SETB RS CLR RW MOV P0,A SETB E NOP NOP CLR E RET ;=============================================== ;写指令子程序 ;RS=0,RW=0,E=高脉冲,D0-D7=指令码 ;=============================================== SEND_I: LCALL CHK_BUSY CLR RS CLR RW MOV P0,A SETB E NOP NOP CLR E RET ;================================================ ;读数据子程序 ;RS=1,RW=1,E=H,D0-D7=数据 ;================================================ READ_D: LCALL CHK_BUSY ;读数据子程序 SETB RS SETB RW SETB E NOP MOV A,P0 CLR E MOV STORE,A RET ;================================================ ;;测忙碌子程序 ;RS=0,RW=1,E=H,D0-D7=状态字 ;================================================ CHK_BUSY: MOV P0,#0FFH ;测忙碌子程序 CLR RS SETB RW SETB E JB P0.7,$ CLR E RET ;================================================ ;延时子程序 DELAY3: MOV R5,#16H DEL31: MOV R6,#100 DEL32: MOV R7,#0FFH DEL33: DJNZ R7,DEL33 DJNZ R6,DEL32 DJNZ R5,DEL31 RET DELAY2: MOV R6,#0CH DEL21: MOV R7,#18H DEL22: DJNZ R7,DEL22 DJNZ R6,DEL21 RET DELAY1: MOV R6,#06H DEL11: MOV R7,#08H DEL12: DJNZ R7,DEL12 DJNZ R6,DEL11 RET DELAY4: MOV R6,#100 DEL41: MOV R7,#200 DEL42: DJNZ R7,DEL42 DJNZ R6,DEL41 RET DELAY5: MOV R5,#05H DEL51: MOV R6,#100 DEL52: MOV R7,#0FFH DEL53: DJNZ R7,DEL53 DJNZ R6,DEL52 DJNZ R5,DEL51 RET ;*********************************************** TAB1: TAB1A: DB ' 51单片机学习网(深圳学林电子有限公司) ' ;显示在第一行 TAB1C: DB '自学单片机第一站' ;显示在第三行 TAB1B: DB ' WWW.8951.COM ' ;显示在第二行 TAB1D: DB 'TEL 755-89956892' ;显示在第四行 ;*-------------------------------------------------------------------- * ;* Bitmap点阵数据表 * ;* 图片: E:\图形8.bmp,横向取模左高位,数据排列:从左到右从上到下 * ;* 图片尺寸: 128 * 64 * ;*-------------------------------------------------------------------- * TU_TAB1: ; 数据表 db 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 3Ch, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 7Fh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H,0FFh,0C0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 01h,0BFh,0F8h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 01h,0FFh,0DCh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 01h, 1Fh,0FEh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 01h,0DFh,0FFh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H,0FFh,0FFh, 19h, 8Ch, 03h, 06h, 00H, 18h, 00H,0FFh,0E1h db 80h, 00H, 00H, 00H, 00H, 3Fh,0FFh, 0Ch,0CCh, 03h, 06h, 00H, 18h, 00H,0FFh,0E1h db 80h, 00H, 00H, 00H, 00H, 7Fh,0FFh, 04h, 58h, 03h, 06h, 01h,0FFh,0C0h, 00H,0C1h db 80h, 00H, 00H, 00H, 00H, 7Fh,0DAh, 3Fh,0FEh, 0Fh,0DFh,0C1h,0FFh,0C0h, 01h, 81h db 80h, 00H, 00H, 00H, 00H, 7Fh, 8Ch, 3Fh,0FEh, 0Fh,0DFh,0C1h, 98h,0C0h, 07h, 01h db 80h, 00H, 00H, 00H, 00H, 7Fh,0B8h, 30h, 06h, 03h, 06h, 01h, 98h,0C0h, 06h, 01h db 80h, 00H, 00H, 00H, 00H,0FEh,0C0h, 0Fh,0F8h, 03h, 8Eh, 01h,0FFh,0C3h,0FFh,0F9h db 80h, 00H, 00H, 00H, 00H, 7Eh, 00H, 0Fh,0F8h, 07h,0CFh, 01h, 98h,0C3h,0FFh,0F9h db 80h, 00H, 00H, 00H, 00H, 7Fh, 00H, 00H, 60h, 07h, 5Fh, 81h, 98h,0C0h, 06h, 01h db 80h, 00H, 00H, 00H, 00H, 7Fh, 80h, 3Fh,0FEh, 0Fh, 36h,0C1h,0FFh,0C0h, 06h, 01h db 80h, 00H, 00H, 00H, 00H, 1Fh, 80h,0BFh,0FEh, 0Bh, 36h, 61h,0FFh,0C0h, 06h, 01h db 80h, 00H, 00H, 00H, 00H, 1Fh,0C7h, 00H,0C0h, 03h, 66h, 21h, 98h, 30h, 06h, 01h db 80h, 00H, 00H, 00H, 15h, 5Fh,0C7h, 00H,0C0h, 03h, 06h, 00H, 18h, 30h, 06h, 01h db 80h, 00H, 02h,0E0h, 06h, 7Fh,0CEh, 03h,0C0h, 03h, 06h, 00H, 1Fh,0F0h, 1Eh, 01h db 80h, 00H, 04h, 54h, 4Fh,0FFh,0FCh, 01h, 80h, 03h, 06h, 00H, 0Fh,0E0h, 0Ch, 01h db 80h, 00H, 03h,0FDh, 3Fh,0FFh,0D9h,0C0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 1Dh,0FFh,0FFh,0FFh, 87h, 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 2Bh,0FFh,0F8h, 7Fh, 06h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 3Fh,0BFh,0F8h, 09h, 0Fh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 1Fh, 9Fh,0F0h, 00H,0BCh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 9Dh,0FEh, 1Fh, 8Fh,0F0h, 00H,0F8h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 9Fh,0FCh, 17h, 8Fh,0F0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 81h,0FFh,0CFh, 9Fh,0E0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 82h,0FFh,0FFh, 9Ch, 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 81h, 7Fh,0FFh,0FCh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 6Fh,0FEh, 30h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 03h,0FCh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 34h, 14h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 0Eh, 18h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 02h, 30h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 01h,0E0h, 00H, 00H, 7Fh, 04h, 00H, 3Fh, 82h, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 7Fh, 0Ch, 00H, 3Fh, 86h, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 7Fh, 1Ch, 00H, 3Fh, 8Eh, 00H, 00H, 00H, 00H, 01h db 83h,0BBh, 9Dh,0DCh,0EEh,0E0h, 70h, 7Ch, 38h, 38h, 3Eh, 00H,0E0h, 38h, 3Bh, 31h db 83h,0BBh, 9Dh,0DCh,0EEh,0E0h, 70h, 7Ch, 3Ch, 38h, 3Eh, 00H,0F0h, 7Ch, 3Fh,0F9h db 83h,0BBh, 9Dh,0DCh,0EEh,0E0h, 76h, 1Ch, 7Eh, 3Bh, 0Eh, 01h,0F8h,0FEh, 3Fh,0F9h db 83h,0BBh, 9Dh,0DCh,0EEh,0E0h, 7Fh, 1Ch, 76h, 3Fh, 8Eh, 01h,0D8h,0EEh, 3Bh,0B9h db 83h,0BBh, 9Dh,0DCh,0EEh,0E0h, 7Fh, 1Ch, 76h, 3Fh, 8Eh, 01h,0D8h,0EEh, 3Bh,0B9h db 83h,0BBh, 9Dh,0DCh,0EEh,0E0h, 77h, 1Ch, 76h, 3Bh, 8Eh, 01h,0D8h,0EEh, 3Bh,0B9h db 81h,0BBh, 0Dh,0D8h, 6Eh,0C0h, 07h, 1Ch, 70h, 03h, 8Eh, 01h,0C0h,0EEh, 3Bh,0B9h db 81h,0ABh, 0Dh, 58h, 6Ah,0C0h, 07h, 1Ch, 70h, 03h, 8Eh, 01h,0C0h,0EEh, 3Bh,0B9h db 81h,0ABh, 0Dh, 58h, 6Ah,0C0h, 77h, 1Ch, 70h, 3Bh, 8Eh, 01h,0C0h,0EEh, 3Bh,0B9h db 81h,0ABh, 0Dh, 58h, 6Ah,0C0h, 77h, 1Ch, 76h, 3Bh, 8Eh, 01h,0D8h,0EEh, 3Bh,0B9h db 81h,0EFh, 0Fh, 78h, 7Bh,0C0h, 77h, 1Ch, 76h, 3Bh, 8Eh, 01h,0D8h,0EEh, 3Bh,0B9h db 81h,0EFh, 0Fh, 78h, 7Bh,0DCh, 77h, 1Ch, 76h, 3Bh, 8Eh, 39h,0D8h,0EEh, 3Bh,0B9h db 81h,0EFh, 0Fh, 78h, 7Bh,0DCh, 7Fh, 1Ch, 7Eh, 3Fh, 8Eh, 39h,0F8h,0FEh, 3Bh,0B9h db 81h,0EFh, 0Fh, 78h, 7Bh,0DCh, 3Eh, 1Ch, 3Ch, 1Fh, 0Eh, 38h,0F0h, 7Ch, 3Bh,0B9h db 81h,0EFh, 0Fh, 78h, 7Bh,0DCh, 1Ch, 1Ch, 3Ch, 0Eh, 0Eh, 38h,0F0h, 78h, 3Bh,0B9h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh ;*-------------------------------------------------------------------- * ;* Bitmap点阵数据表 * ;* 图片: E:\图形12.bmp,横向取模左高位,数据排列:从左到右从上到下 * ;* 图片尺寸: 128 * 64 * ;*-------------------------------------------------------------------- * TU_TAB2: ; 数据表 db 40h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 03h, 65h,0E8h, 80h, 00H, 01h db 9Ah,0D6h,0B4h, 42h, 00H, 00H, 00H, 00H, 00H, 00H, 34h,0DAh,0D0h, 00H, 00H, 01h db0A4h, 00H, 02h, 10h, 6Bh, 30h, 00H, 00H, 00H, 00H, 8Bh,0FFh, 30h, 00H, 00H, 01h db 42h,0D6h,0B0h, 42h, 80h, 00H, 00H, 00H, 00H, 16h, 77h,0FEh,0C0h, 00H, 00H, 01h db 42h,0D6h,0B0h, 42h, 80h, 00H, 00H, 00H, 00H, 16h, 77h,0FEh,0C0h, 00H, 00H, 01h db0B9h, 20h, 04h, 00H, 00H, 02h, 10h, 00H, 00H, 00H,0BCh,0BCh, 00H, 00H, 00H, 01h db 46h,0D6h,0B1h,0ACh, 6Bh, 30h, 00H, 00H, 02h, 29h,0CBh, 40h, 00H, 00H, 00H, 01h db0FFh,0F9h, 04h, 01h, 00H, 00H, 00H, 00H, 01h, 16h,0B4h,0A0h, 00H, 00H, 00H, 01h db0FFh,0FFh,0F2h, 50h, 00H, 40h, 00H, 00H, 00H, 29h, 4Bh, 00H, 00H, 00H, 00H, 01h db0FFh,0FFh,0F2h, 50h, 00H, 40h, 00H, 00H, 00H, 29h, 4Bh, 00H, 00H, 00H, 00H, 01h db0FFh,0FFh,0BDh, 82h, 94h, 00H, 40h, 00H, 00H,0C9h, 30h, 02h, 00H, 00H, 00H, 01h db0FFh,0FFh,0FBh,0B0h, 00H, 08h, 00H, 00H, 05h, 16h, 44h, 40h, 00H, 00H, 00H, 01h db0FFh,0FFh,0FFh,0EFh, 90h, 40h, 00H, 00H, 00H, 21h, 00H, 04h,0C8h, 30h, 00H, 01h db0A5h,0FFh,0FFh,0FDh, 6Bh, 00H, 00H, 00H, 00H,0C8h, 00H, 99h, 16h,0FAh, 40h, 01h db0A5h,0FFh,0FFh,0FDh, 6Bh, 00H, 00H, 00H, 00H,0C8h, 00H, 99h, 16h,0FAh, 40h, 01h db 82h, 2Fh,0FFh,0FFh,0E8h, 84h, 00H, 00H, 00H, 00H, 08h, 00H,0DFh,0FFh,0ECh, 01h db 24h,0C1h, 7Fh,0FFh,0F4h, 30h, 00H, 00H, 00H, 00H, 00H,0A7h,0FFh,0FFh,0FCh, 01h db 42h, 28h, 05h,0BFh,0FBh, 80h, 00H, 00H, 00H, 00H, 04h, 1Bh,0FFh,0FFh,0FFh, 81h db 98h,0C1h, 4Ah, 53h,0ECh, 48h, 00H, 00H, 00H, 00H, 40h, 7Fh,0FFh,0FFh,0FFh,0E1h db 98h,0C1h, 4Ah, 53h,0ECh, 48h, 00H, 00H, 00H, 00H, 40h, 7Fh,0FFh,0FFh,0FFh,0E1h db 42h, 28h, 00H, 0Ch, 77h, 82h, 00H, 00H, 00H, 00H, 33h,0BFh,0FFh,0FFh,0FFh, 89h db 18h,0C1h, 4Ah, 51h, 9Bh, 74h, 00H, 00H, 00H, 00H, 04h,0FFh, 3Fh,0FFh,0DFh,0F1h db0C2h, 28h, 00H, 0Ch, 04h, 80h, 00H, 00H, 00H, 00H, 40h,0FEh, 1Fh,0F9h,0C3h,0F9h db 1Ah,0D6h,0B5h,0A1h, 6Bh, 75h, 80h, 00H, 00H, 00H, 8Fh,0FCh, 3Fh,0F2h, 0Fh, 1Fh db 1Ah,0D6h,0B5h,0A1h, 6Bh, 75h, 80h, 00H, 00H, 00H, 8Fh,0FCh, 3Fh,0F2h, 0Fh, 1Fh db0C5h, 29h, 79h, 8Ch, 00H, 88h, 00H, 00H, 00H, 00H, 03h,0F8h, 1Fh,0C8h, 52h, 81h db 22h,0FFh,0FFh,0F2h, 6Bh, 35h, 80h, 00H, 00H, 00H, 37h,0C2h, 3Fh,0FBh,0FCh, 09h db 9Ah,0FFh,0FFh,0FFh, 00H, 48h, 00H, 00H, 00H, 00H, 07h,0D8h, 1Fh,0FFh,0E3h, 81h db 9Ah,0FFh,0FFh,0FFh, 00H, 48h, 00H, 00H, 00H, 00H, 07h,0D8h, 1Fh,0FFh,0E3h, 81h db 47h,0FFh,0FFh,0FFh,0F3h, 35h, 80h, 00H, 00H, 00H, 8Fh,0C1h, 0Fh,0FFh,0ACh, 01h db0B9h,0FFh,0FFh,0FFh,0FCh, 4Ah, 20h, 00H, 00H, 00H, 0Fh,0A4h, 07h,0FEh, 40h, 01h db 5Fh,0FFh,0C7h,0FFh,0FCh,0B5h, 80h, 00H, 00H, 00H, 4Fh,0DAh,0FFh,0F8h, 00H, 01h db0A7h,0FFh,0B7h,0FFh,0FFh, 8Ah, 20h, 00H, 00H, 00H, 0Fh,0FFh,0EFh, 40h, 00H, 01h db0A7h,0FFh,0B7h,0FFh,0FFh, 8Ah, 20h, 00H, 00H, 00H, 0Fh,0FFh,0EFh, 40h, 00H, 01h db 7Fh,0FFh, 47h,0FDh, 7Fh,0C5h, 80h, 00H, 00H, 00H, 3Fh,0DAh,0D0h, 00H, 00H, 01h db0A7h,0FEh, 37h,0FFh, 7Ch,0FAh, 50h, 00H, 00H, 00H, 0Ch,0A4h, 08h, 00H, 00H, 01h db0DFh,0FEh, 43h,0FFh,0F8h,0C1h, 80h, 00H, 00H, 00H, 48h, 01h, 00H, 00H, 00H, 01h db 27h,0FFh, 4Bh,0FFh,0FFh,0FAh, 2Ch, 00H, 00H, 00H, 03h, 58h, 20h, 00H, 00H, 01h db 27h,0FFh, 4Bh,0FFh,0FFh,0FAh, 2Ch, 00H, 00H, 00H, 03h, 58h, 20h, 00H, 00H, 01h db 9Bh,0FFh,0C3h,0FFh,0FFh,0F1h,0C0h, 00H, 00H, 00H, 08h, 00H, 00H, 00H, 00H, 01h db 64h, 3Fh,0FDh,0FFh, 6Bh, 7Ch, 10h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 03h,0D7h,0FFh,0FDh, 10h, 01h,0A0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0D8h, 29h, 4Fh,0A2h, 80h,0B5h, 90h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0D8h, 29h, 4Fh,0A2h, 80h,0B5h, 90h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 05h, 10h,0B0h, 4Ch, 0Bh, 08h, 40h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0A0h,0C9h, 0Ah, 00H, 00H, 42h, 10h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 04h, 10h, 40h, 21h, 64h, 09h,0A0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0A2h,0C1h, 35h, 8Ch, 00H, 44h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0A2h,0C1h, 35h, 8Ch, 00H, 44h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 00H, 16h, 00H, 21h, 14h, 09h,0A0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0A5h, 00H,0B5h, 80h, 83h, 44h, 0Ch, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 00H, 26h, 00H, 12h, 08h, 09h,0A0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0DAh, 00H,0B4h, 40h, 60h, 44h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0DAh, 00H,0B4h, 40h, 60h, 44h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h,0C8h, 00H, 00H, 04h, 01h,0A0h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0A2h, 20h, 89h, 91h, 10h, 8Ah, 10h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 44h, 06h, 00H, 00H, 00H, 30h, 40h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 44h, 06h, 00H, 00H, 00H, 30h, 40h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh ;*-------------------------------------------------------------------- * ;*-------------------------------------------------------------------- * ;* Bitmap点阵数据表 * ;* 图片: E:\图形13.bmp,横向取模左高位,数据排列:从左到右从上到下 * ;* 图片尺寸: 128 * 64 * ;*-------------------------------------------------------------------- * TU_TAB4: ; 漂亮姑娘看过来 db 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 11h,0FFh, 80h, 40h, 08h, 30h, 10h, 20h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Ch, 68h, 3Fh,0FFh, 08h, 30h, 11h,0F8h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Ch, 68h, 3Fh,0FFh, 08h, 30h, 11h,0F8h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h,0FFh, 00H, 00H, 7Fh,0FEh, 7Dh, 08h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 11h, 6Bh, 07h,0FCh, 16h, 30h, 2Dh,0F8h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Dh,0FFh, 04h, 0Ch, 16h, 30h, 2Dh, 08h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Ch, 00H, 3Fh,0FFh, 16h, 30h, 2Dh,0F8h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Ch, 00H, 3Fh,0FFh, 16h, 30h, 2Dh,0F8h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Ch,0FFh, 30h, 01h, 66h,0FEh, 2Dh, 26h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 1Ch, 00H, 03h,0F0h, 76h, 82h, 2Dh, 28h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Dh,0FFh, 82h, 11h, 08h, 82h, 11h, 10h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Ch, 8Bh, 04h, 11h, 16h, 82h, 2Dh, 28h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Ch, 8Bh, 04h, 11h, 16h, 82h, 2Dh, 28h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 0Dh, 18h,0B8h, 1Fh, 60h,0FEh, 41h,0C6h, 00H db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 00H, 07h, 8Fh,0FFh, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 00H, 08h, 70h, 40h,0EFh, 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 00H, 08h, 70h, 40h,0EFh, 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 00H, 10h, 00H, 80h, 10h, 60h, 00H, 0Fh,0FFh, 30h, 0Ch, 00H, 80h, 00H, 00H, 00H db 00H, 20h, 18h, 38h, 20h, 60h, 00H, 00H, 60h, 08h, 0Ch, 1Fh,0FCh, 1Ch, 00H, 00H db 00H,0C0h, 64h, 45h, 00H, 60h, 00H, 03h,0FCh, 0Bh,0FFh, 00H, 80h, 3Eh, 00H, 00H db 00H,0C1h, 00H, 01h, 00H, 10h, 00H, 00H, 80h, 00H, 0Ch, 08h, 88h, 3Eh, 00H, 00H db 00H,0C1h, 00H, 01h, 00H, 10h, 00H, 00H, 80h, 00H, 0Ch, 08h, 88h, 3Eh, 00H, 00H db 01h, 01h, 00H, 00H,0C0h, 10h, 00H, 1Fh,0FFh,0BDh, 8Ch, 06h,0B0h, 3Eh, 00H, 00H db 02h, 0Eh, 18h, 1Ch,0C0h, 10h, 00H, 01h, 00H, 04h, 4Ch, 7Fh,0FEh, 1Ch, 00H, 00H db 02h, 16h, 64h, 22h, 20h, 10h, 00H, 03h,0FCh, 04h, 4Ch, 01h,0C0h, 1Ch, 00H, 00H db 02h, 16h, 64h, 22h, 20h, 10h, 00H, 03h,0FCh, 04h, 4Ch, 01h,0C0h, 1Ch, 00H, 00H db 04h,0E8h, 83h, 41h, 1Ch, 08h, 00H, 0Dh, 04h, 04h, 0Ch, 06h,0B0h, 00H, 00H, 00H db 07h, 10h, 8Fh, 47h, 03h, 88h, 00H, 11h,0FCh, 04h, 3Ch, 08h, 88h, 1Ch, 00H, 00H db 00H, 20h, 6Ch, 26h, 01h, 78h, 00H, 01h, 04h, 0Ah, 00H, 70h, 86h, 1Ch, 00H, 00H db 00H,0C0h, 18h, 1Ch, 00H, 80h, 00H, 01h,0FCh, 31h,0FFh, 00H, 80h, 00H, 00H, 00H db 00H,0C0h, 18h, 1Ch, 00H, 80h, 00H, 01h,0FCh, 31h,0FFh, 00H, 80h, 00H, 00H, 00H db 00H,0C1h, 87h, 80h, 00H, 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 01h, 06h, 78h, 3Ch, 20h, 60h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 01h, 08h, 07h,0C2h,0C0h, 60h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 01h, 08h, 00H, 01h,0C0h, 60h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 01h, 08h, 00H, 01h,0C0h, 60h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 01h, 08h, 18h, 01h,0C0h, 60h, 00H, 00H, 00H,0F1h,0F3h, 87h,0C0h, 00H, 00H, 00H db 00H,0C6h, 18h,0C2h, 20h, 80h, 00H, 00H, 03h, 0Eh, 1Ch, 78h, 70h, 00H, 00H, 00H db 00H,0C1h, 00H,0C2h, 00H, 80h, 00H, 00H, 04h, 44h, 11h, 10h, 38h, 00H, 00H, 00H db 00H, 26h,0E0h, 04h, 01h, 00H, 00H, 00H, 04h, 80h, 12h, 00H, 38h, 00H, 00H, 00H db 00H, 26h,0E0h, 04h, 01h, 00H, 00H, 00H, 04h, 80h, 12h, 00H, 38h, 00H, 00H, 00H db 00H, 11h, 18h, 38h, 03h, 00H, 00H, 00H, 04h, 80h, 12h, 00H, 38h, 00H, 00H, 00H db 00H, 0Eh, 87h,0C2h, 1Ch, 00H, 00H, 00H, 04h, 00H, 10h, 00H, 38h, 00H, 00H, 00H db 00H, 01h,0E0h, 04h,0E0h, 00H, 00H, 00H, 03h, 00H, 1Ch, 00H, 70h, 00H, 00H, 00H db 00H, 1Eh, 18h, 3Fh, 1Eh, 00H, 00H, 00H, 00H, 80h, 32h, 00H,0C0h, 00H, 00H, 00H db 00H, 1Eh, 18h, 3Fh, 1Eh, 00H, 00H, 00H, 00H, 80h, 32h, 00H,0C0h, 00H, 00H, 00H db 00H, 38h, 07h,0C0h, 0Fh, 00H, 00H, 00H, 00H, 40h, 61h, 01h, 80h, 00H, 00H, 00H db 00H,0E9h,0FFh,0FFh, 0Dh, 80h, 00H, 00H, 00H, 31h,0C0h, 87h, 00H, 00H, 00H, 00H db 01h,0E9h, 1Bh,0B9h, 0Dh,0E0h, 00H, 00H, 00H, 0Bh, 80h, 6Eh, 00H, 00H, 00H, 00H db 03h,0C9h,0F0h, 1Fh, 0Ch,0F0h, 00H, 00H, 00H, 06h, 00H, 18h, 00H, 00H, 00H, 00H db 03h,0C9h,0F0h, 1Fh, 0Ch,0F0h, 00H, 00H, 00H, 06h, 00H, 18h, 00H, 00H, 00H, 00H db 07h, 06h,0E0h, 06h, 10h, 78h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 07h,0C1h, 00H, 00H, 20h,0F8h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 07h,0E0h, 80h, 00H,0C1h,0F8h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 07h,0E0h, 80h, 00H,0C1h,0F8h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H db 80h, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 01h db0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh end  

    标签: 12864 液晶 电路 程序

    上传时间: 2013-10-13

    上传用户:123啊

  • HT MCU间接寻址的应用

    Holtek 单片机有一个间接寻址寄存器R0([00H])(有的单片机有两个间接寻址寄存器 R0([00H]),R1([02H]),例如HT48R50A-1 和HT48R70A-1),MP0(MP1)为指向R0(R1) 的指针。任何对R0(R1)的操作实际上都是对MP0(MP1)所指向的地址进行操作的,也 就是说对R0(R1)作读写实际上是对MP0(MP1)所指向的地址进行读写。  

    标签: MCU HT 间接寻址

    上传时间: 2013-11-16

    上传用户:yuanwenjiao

  • 单片机是怎样在液晶上显示字符的

    1.线段的显示.线段的显示.线段的显示.线段的显示点阵图形式液晶由M行×N列个显示单元组成,假设LCD显示屏有64行,每行有128列,每8列对应1个字节的8个位,即每行由16字节,共16×8=128个点组成,屏上64×16个显示单元和显示RAM区1024个字节相对应,每一字节的内容和屏上相应位置的亮暗对应。例如屏的第一行的亮暗由RAM区的000H~00FH的16个字节的内容决定,当(000)=FFH时,则屏的左上角显示一条短亮线,长度为8个点;当(3FFH)=FFH时,则屏的右下角显示一短亮线;当(000H)=FFH,(001H)=00H,(002H)=FFH,(003H)=00H,…(00EH)=FFH,(00FH)=00H时,则在屏的顶部显示一条由8段亮线和8条暗线组成的虚线。这就是LCD显示的基本意思。

    标签: 单片机 液晶 显示字符

    上传时间: 2013-11-06

    上传用户:acwme

  • 单片机指令系统原理

    单片机指令系统原理 51单片机的寻址方式 学习汇编程序设计,要先了解CPU的各种寻址法,才能有效的掌握各个命令的用途,寻址法是命令运算码找操作数的方法。在我们学习的8051单片机中,有6种寻址方法,下面我们将逐一进行分析。 立即寻址 在这种寻址方式中,指令多是双字节的,一般第一个字节是操作码,第二个字节是操作数。该操作数直接参与操作,所以又称立即数,有“#”号表示。立即数就是存放在程序存储器中的常数,换句话说就是操作数(立即数)是包含在指令字节中的。 例如:MOV  A,#3AH这条指令的指令代码为74H、3AH,是双字节指令,这条指令的功能是把立即数3AH送入累加器A中。MOV  DPTR,#8200H在前面学单片机的专用寄存器时,我们已学过,DPTR是一个16位的寄存器,它由DPH及DPL两个8位的寄存器组成。这条指令的意思就是把立即数的高8位(即82H)送入DPH寄存器,把立即数的低8位(即00H)送入DPL寄存器。这里也特别说明一下:在80C51单片机的指令系统中,仅有一条指令的操作数是16位的立即数,其功能是向地址指针DPTR传送16位的地址,即把立即数的高8位送入DPH,低8位送入DPL。 直接寻址 直接寻址方式是指在指令中操作数直接以单元地址的形式给出,也就是在这种寻址方式中,操作数项给出的是参加运算的操作数的地址,而不是操作数。例如:MOV  A,30H  这条指令中操作数就在30H单元中,也就是30H是操作数的地址,并非操作数。 在80C51单片机中,直接地址只能用来表示特殊功能寄存器、内部数据存储器以及位地址空间,具体的说就是:1、内部数据存储器RAM低128单元。在指令中是以直接单元地址形式给出。我们知道低128单元的地址是00H-7FH。在指令中直接以单元地址形式给出这句话的意思就是这0-127共128位的任何一位,例如0位是以00H这个单元地址形式给出、1位就是以01H单元地址给出、127位就是以7FH形式给出。2、位寻址区。20H-2FH地址单元。3、特殊功能寄存器。专用寄存器除以单元地址形式给出外,还可以以寄存器符号形式给出。例如下面我们分析的一条指令 MOV  IE,#85H 前面的学习我们已知道,中断允许寄存器IE的地址是80H,那么也就是这条指令可以以MOV  IE,#85H 的形式表述,也可以MOV  80H,#85H的形式表述。 关于数据存储器RAM的内部情况,请查看我们课程的第十二课。 直接寻址是唯一能访问特殊功能寄存器的寻址方式! 大家来分析下面几条指令:MOV  65H,A       ;将A的内容送入内部RAM的65H单元地址中MOV  A,direct    ;将直接地址单元的内容送入A中MOV  direct,direct;将直接地址单元的内容送直接地址单元MOV  IE,#85H      ;将立即数85H送入中断允许寄存器IE 前面我们已学过,数据前面加了“#”的,表示后面的数是立即数(如#85H,就表示85H就是一个立即数),数据前面没有加“#”号的,就表示后面的是一个地址地址(如,MOV 65H,A这条指令的65H就是一个单元地址)。 寄存器寻址 寄存器寻址的寻址范围是:1、4个工作寄存器组共有32个通用寄存器,但在指令中只能使用当前寄存器组(工作寄存器组的选择在前面专用寄存器的学习中,我们已知道,是由程序状态字PSW中的RS1和RS0来确定的),因此在使用前常需要通过对PSW中的RS1、RS0位的状态设置,来进行对当前工作寄存器组的选择。2、部份专用寄存器。例如,累加器A、通用寄存器B、地址寄存器DPTR和进位位CY。 寄存器寻址方式是指操作数在寄存器中,因此指定了寄存器名称就能得到操作数。例如:MOV A,R0这条指令的意思是把寄存器R0的内容传送到累加器A中,操作数就在R0中。INC R3这条指令的意思是把寄存器R3中的内容加1 从前面的学习中我产应可以理解到,其实寄存器寻址方式就是对由PSW程序状态字确定的工作寄存器组的R0-R7进行读/写操作。 寄存器间接寻址 寄存间接寻址方式是指寄存器中存放的是操作数的地址,即操作数是通过寄存器间接得到的,因此称为寄存器间接寻址。 MCS-51单片机规定工作寄存器的R0、R1做为间接寻址寄存器。用于寻址内部或外部数据存储器的256个单元。为什么会是256个单元呢?我们知道,R0或者R1都是一个8位的寄存器,所以它的寻址空间就是2的八次方=256。例:MOV  R0,#30H  ;将值30H加载到R0中    MOV  A,@R0    ;把内部RAM地址30H内的值放到累加器A中    MOVX A,@R0    ;把外部RAM地址30H内的值放到累加器A中 大家想想,如果用DPTR做为间址寄存器,那么它的寻址范围是多少呢?DPTR是一个16位的寄存器,所以它的寻址范围就是2的十六次方=65536=64K。因用DPTR做为间址寄存器的寻址空间是64K,所以访问片外数据存储器时,我们通常就用DPTR做为间址寄存器。例:MOV   DPTR,#1234H  ;将DPTR值设为1234H(16位)    MOVX  A,@DPTR      ;将外部RAM或I/O地址1234H内的值放到累加器A中 在执行PUSH(压栈)和POP(出栈)指令时,采用堆栈指针SP作寄存器间接寻址。例:PUSH  30H    ;把内部RAM地址30H内的值放到堆栈区中堆栈区是由SP寄存器指定的,如果执行上面这条命令前,SP为60H,命令执行后会把内部RAM地址30H内的值放到RAM的61H内。 那么做为寄存器间接寻址用的寄存器主要有哪些呢?我们前面提到的有四个,R0、R1、DPTR、SP 寄存器间接寻址范围总结:1、内部RAM低128单元。对内部RAM低128单元的间接寻址,应使用R0或R1作间址寄存器,其通用形式为@Ri(i=0或1)。 2、外部RAM 64KB。对外部RAM64KB的间接寻址,应使用@DPTR作间址寻址寄存器,其形式为:@DPTR。例如MOVX A,@DPTR;其功能是把DPTR指定的外部RAM的单元的内容送入累加器A中。外部RAM的低256单元是一个特殊的寻址区,除可以用DPTR作间址寄存器寻址外,还可以用R0或R1作间址寄存器寻址。例如MOVX  A,@R0;这条指令的意思是,把R0指定的外部RAM单元的内容送入累加器A。 堆栈操作指令(PUSH和POP)也应算作是寄存器间接寻址,即以堆栈指针SP作间址寄存器的间接寻址方式。 寄存器间接寻址方式不可以访问特殊功能寄存器!! 寄存器间接寻址也须以寄存器符号的形式表示,为了区别寄存器寻址我寄存器间接寻址的区别,在寄存器间接寻址方式式中,寄存器的名称前面加前缀标志“@”。 基址寄存器加变址寄存器的变址寻址 这种寻址方式以程序计数器PC或DPTR为基址寄存器,累加器A为变址寄存器,变址寻址时,把两者的内容相加,所得到的结果作为操作数的地址。这种方式常用于访问程序存储器ROM中的数据表格,即查表操作。变址寻址只能读出程序内存入的值,而不能写入,也就是说变址寻址这种方式只能对程序存储器进行寻址,或者说它是专门针对程序存储器的寻址方式。例:MOVC  A,@A+DPTR这条指令的功能是把DPTR和A的内容相加,再把所得到的程序存储器地址单元的内容送A假若指令执行前A=54H,DPTR=3F21H,则这条指令变址寻址形成的操作数地址就是54H+3F21H=3F75H。如果3F75H单元中的内容是7FH,则执行这条指令后,累加器A中的内容就是7FH。 变址寻址的指令只有三条,分别如下:JMP    @A+DPTRMOVC   A,@A+DPTRMOVC   A,@A+PC 第一条指令JMP @A+DPTR这是一条无条件转移指令,这条指令的意思就是DPTR加上累加器A的内容做为一个16位的地址,执行JMP这条指令是,程序就转移到A+DPTR指定的地址去执行。 第二、三条指令MOVC   A,@A+DPTR和MOVC   A,@A+PC指令这两条指令的通常用于查表操作,功能完全一样,但使用起来却有一定的差别,现详细说明如下。我们知道,PC是程序指针,是十六位的。DPTR是一个16位的数据指针寄存器,按理,它们的寻址范围都应是64K。我们在学习特殊功能寄存器时已知道,程序计数器PC是始终跟踪着程序的执行的。也就是说,PC的值是随程序的执行情况自动改变的,我们不可以随便的给PC赋值。而DPTR是一个数据指针,我们就可以给空上数据指针DPTR进行赋值。我们再看指令MOVC   A,@A+PC这条指令的意思是将PC的值与累加器A的值相加作为一个地址,而PC是固定的,累加器A是一个8位的寄存器,它的寻址范围是256个地址单元。讲到这里,大家应可明白,MOVC   A,@A+PC这条指令的寻址范围其实就是只能在当前指令下256个地址单元。所在,这在我们实际应用中,可能就会有一个问题,如果我们需要查询的数据表在256个地址单元之内,则可以用MOVC   A,@A+PC这条指令进行查表操作,如果超过了256个单元,则不能用这条指令进行查表操作。刚才我们已说到,DPTR是一个数据指针,这个数据指针我们可以给它赋值操作的。通过赋值操作。我们可以使MOVC   A,@A+DPTR这条指令的寻址范围达到64K。这就是这两条指令在实际应用当中要注意的问题。 变址寻址方式是MCS-51单片机所独有的一种寻址方式。 位寻址 80C51单片机有位处理功能,可以对数据位进行操作,因此就有相应的位寻址方式。所谓位寻址,就是对内部RAM或可位寻址的特殊功能寄存器SFR内的某个位,直接加以置位为1或复位为0。 位寻址的范围,也就是哪些部份可以进行位寻址: 1、我们在第十二课学习51单片机的存储器结构时,我们已知道在单片机的内部数据存储器RAM的低128单元中有一个区域叫位寻址区。它的单元地址是20H-2FH。共有16个单元,一个单元是8位,所以位寻址区共有128位。这128位都单独有一个位地址,其位地址的名字就是00H-7FH。这里就有一个比较麻烦的问题需要大家理解清楚了。我们在前面的学习中00H、01H。。。。7FH等等,所表示的都是一个字节(或者叫单元地址),而在这里,这些数据都变成了位地址。我们在指令中,或者在程序中如何来区分它是一个单元地址还是一个位地址呢?这个问题,也就是我们现在正在研究的位寻址的一个重要问题。其实,区分这些数据是位地址还是单元地址,我们都有相应的指令形式的。这个问题我们在后面的指令系统学习中再加以论述。 2、对专用寄存器位寻址。这里要说明一下,不是所有的专用寄存器都可以位寻址的。具体哪些专用寄存器可以哪些专用寄存器不可以,请大家回头去看看我们前面关于专用寄存器的相关文章。一般来说,地址单元可以被8整除的专用寄存器,通常都可以进行位寻址,当然并不是全部,大家在应用当中应引起注意。 专用寄存器的位寻址表示方法: 下面我们以程序状态字PSW来进行说明 D7 D6 D5 D4 D3 D2 D1 D0 CY   AC  F0  RS1  RS0  OV    P  1、直接使用位地址表示:看上表,PSW的第五位地址是D5,所以可以表示为D5H   MOV  C,D5H 2、位名称表示:表示该位的名称,例如PSW的位5是F0,所以可以用F0表示   MOV  C,F0 3、单元(字节)地址加位表示:D0H单元位5,表示为DOH.5    MOV  C,D0H.5 4、专用寄存器符号加位表示:例如PSW.5    MOV C,PSW.5 这四种方法实现的功能都是相同的,只是表述的方式不同而已。 例题:   1. 说明下列指令中源操作数采用的寻址方式。   MOV R5,R7 答案:寄存器寻址方式   MOV A,55H 直接寻址方式   MOV A,#55H 立即寻址方式   JMP @A+DPTR 变址寻址方式   MOV 30H,C 位寻址方式   MOV A,@R0 间接寻址方式   MOVX A,@R0 间接寻址方式 改错题   请判断下列的MCS-51单片机指令的书写格式是否有错,若有,请说明错误原因。   MOV R0,@R3 答案:间址寄存器不能使用R2~R7。   MOVC A,@R0+DPTR 变址寻址方式中的间址寄存器不可使用R0,只可使用A。   ADD R0,R1 运算指令中目的操作数必须为累加器A,不可为R0。   MUL AR0 乘法指令中的乘数应在B寄存器中,即乘法指令只可使用AB寄存器组合。

    标签: 单片机指令 系统原理

    上传时间: 2013-11-11

    上传用户:caozhizhi