数电Verilog相关课件
上传时间: 2013-10-23
上传用户:wangzeng
数电实验6电路图
上传时间: 2013-10-25
上传用户:wentianyou
用数字万用表测三极管的类型及引脚
上传时间: 2013-10-26
上传用户:flg0001
带中文字库的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
上传时间: 2013-10-13
上传用户:123啊
用单片机AT89C51改造普通双桶洗衣机:AT89C2051作为AT89C51的简化版虽然去掉了P0、P2等端口,使I/O口减少了,但是却增加了一个电压比较器,因此其功能在某些方面反而有所增强,如能用来处理模拟量、进行简单的模数转换等。本文利用这一功能设计了一个数字电容表,可测量容量小于2微法的电容器的容量,采用3位半数字显示,最大显示值为1999,读数单位统一采用毫微法(nf),量程分四档,读数分别乘以相应的倍率。电路工作原理 本数字电容表以电容器的充电规律作为测量依据,测试原理见图1。电源电路图。 压E+经电阻R给被测电容CX充电,CX两端原电压随充电时间的增加而上升。当充电时间t等于RC时间常数τ时,CX两端电压约为电源电压的63.2%,即0.632E+。数字电容表就是以该电压作为测试基准电压,测量电容器充电达到该电压的时间,便能知道电容器的容量。例如,设电阻R的阻值为1千欧,CX两端电压上升到0.632E+所需的时间为1毫秒,那么由公式τ=RC可知CX的容量为1微法。 测量电路如图2所示。A为AT89C2051内部构造的电压比较器,AT89C2051 图2 的P1.0和P1.1口除了作I/O口外,还有一个功能是作为电压比较器的输入端,P1.0为同相输入端,P1.1为反相输入端,电压比较器的比较结果存入P3.6口对应的寄存器,P3.6口在AT89C2051外部无引脚。电压比较器的基准电压设定为0.632E+,在CX两端电压从0升到0.632E+的过程中,P3.6口输出为0,当电池电压CX两端电压一旦超过0.632E+时,P3.6口输出变为1。以P3.6口的输出电平为依据,用AT89C2051内部的定时器T0对充电时间进行计数,再将计数结果显示出来即得出测量结果。整机电路见图3。电路由单片机电路、电容充电测量电路和数码显示电路等 图3 部分组成。AT89C2051内部的电压比较器和电阻R2-R7等组成测量电路,其中R2-R5为量程电阻,由波段开关S1选择使用,电压比较器的基准电压由5V电源电压经R6、RP1、R7分压后得到,调节RP1可调整基准电压。当P1.2口在程序的控制下输出高电平时,电容CX即开始充电。量程电阻R2-R5每档以10倍递减,故每档显示读数以10倍递增。由于单片机内部P1.2口的上拉电阻经实测约为200K,其输出电平不能作为充电电压用,故用R5兼作其上拉电阻,由于其它三个充电电阻和R5是串联关系,因此R2、R3、R4应由标准值减去1K,分别为999K、99K、9K。由于999K和1M相对误差较小,所以R2还是取1M。数码管DS1-DS4、电阻R8-R14等组成数码显示电路。本机采用动态扫描显示的方式,用软件对字形码译码。P3.0-P3.5、P3.7口作数码显示七段笔划字形码的输出,P1.3-P1.6口作四个数码管的动态扫描位驱动码输出。这里采用了共阴数码管,由于AT89C2051的P1.3-P1.6口有25mA的下拉电流能力,所以不用三极管就能驱动数码管。R8-R14为P3.0-P3.5、P3.7口的上拉电阻,用以驱动数码管的各字段,当P3的某一端口输出低电平时其对应的字段笔划不点亮,而当其输出高电平时,则对应的上拉电阻即能点亮相应的字段笔划。
上传时间: 2013-12-31
上传用户:ming529
AVR高速嵌入式单片机原理与应用(修订版)详细介绍ATMEL公司开发的AVR高速嵌入式单片机的结构;讲述AVR单片机的开发工具和集成开发环境(IDE),包括Studio调试工具、AVR单片机汇编器和单片机串行下载编程;学习指令系统时,每条指令均有实例,边学习边调试,使学习者看得见指令流向及操作结果,真正理解每条指令的功能及使用注意事项;介绍AVR系列多种单片机功能特点、实用程序设计及应用实例;作为提高篇,讲述简单易学、适用AVR单片机的高级语言BASCOMAVR及ICC AVR C编译器。 AVR高速嵌入式单片机原理与应用(修订版) 目录 第一章ATMEL单片机简介1.1ATMEL公司产品的特点11.2AT90系列单片机简介21.3AT91M系列单片机简介2第二章AVR单片机系统结构2.1AVR单片机总体结构42.2AVR单片机中央处理器CPU62.2.1结构概述72.2.2通用寄存器堆92.2.3X、Y、Z寄存器92.2.4ALU运算逻辑单元92.3AVR单片机存储器组织102.3.1可下载的Flash程序存储器102.3.2内部和外部的SRAM数据存储器102.3.3EEPROM数据存储器112.3.4存储器访问和指令执行时序112.3.5I/O存储器132.4AVR单片机系统复位162.4.1复位源172.4.2加电复位182.4.3外部复位192.4.4看门狗复位192.5AVR单片机中断系统202.5.1中断处理202.5.2外部中断232.5.3中断应答时间232.5.4MCU控制寄存器 MCUCR232.6AVR单片机的省电方式242.6.1休眠状态242.6.2空闲模式242.6.3掉电模式252.7AVR单片机定时器/计数器252.7.1定时器/计数器预定比例器252.7.28位定时器/计数器0252.7.316位定时器/计数器1272.7.4看门狗定时器332.8AVR单片机EEPROM读/写访问342.9AVR单片机串行接口352.9.1同步串行接口 SPI352.9.2通用串行接口 UART402.10AVR单片机模拟比较器452.10.1模拟比较器452.10.2模拟比较器控制和状态寄存器ACSR462.11AVR单片机I/O端口472.11.1端口A472.11.2端口 B482.11.3端口 C542.11.4端口 D552.12AVR单片机存储器编程612.12.1编程存储器锁定位612.12.2熔断位612.12.3芯片代码612.12.4编程 Flash和 EEPROM612.12.5并行编程622.12.6串行下载662.12.7可编程特性67第三章AVR单片机开发工具3.1AVR实时在线仿真器ICE200693.2JTAG ICE仿真器693.3AVR嵌入式单片机开发下载实验器SL?AVR703.4AVR集成开发环境(IDE)753.4.1AVR Assembler编译器753.4.2AVR Studio773.4.3AVR Prog783.5SL?AVR系列组态开发实验系统793.6SL?AVR*.ASM源文件说明81第四章AVR单片机指令系统4.1指令格式844.1.1汇编指令844.1.2汇编器伪指令844.1.3表达式874.2寻址方式894.3数据操作和指令类型924.3.1数据操作924.3.2指令类型924.3.3指令集名词924.4算术和逻辑指令934.4.1加法指令934.4.2减法指令974.4.3乘法指令1014.4.4取反码指令1014.4.5取补指令1024.4.6比较指令1034.4.7逻辑与指令1054.4.8逻辑或指令1074.4.9逻辑异或指令1104.5转移指令1114.5.1无条件转移指令1114.5.2条件转移指令1144.6数据传送指令1354.6.1直接数据传送指令1354.6.2间接数据传送指令1374.6.3从程序存储器直接取数据指令1444.6.4I/O口数据传送指令1454.6.5堆栈操作指令1464.7位指令和位测试指令1474.7.1带进位逻辑操作指令1474.7.2位变量传送指令1514.7.3位变量修改指令1524.7.4其它指令1614.8新增指令(新器件)1624.8.1EICALL-- 延长间接调用子程序1624.8.2EIJMP--扩展间接跳转1634.8.3ELPM--扩展装载程序存储器1644.8.4ESPM--扩展存储程序存储器1644.8.5FMUL--小数乘法1664.8.6FMULS--有符号数乘法1664.8.7FMULSU--有符号小数和无符号小数乘法1674.8.8MOVW--拷贝寄存器字1684.8.9MULS--有符号数乘法1694.8.10MULSU--有符号数与无符号数乘法1694.8.11SPM--存储程序存储器170 第五章AVR单片机AT90系列5.1AT90S12001725.1.1特点1725.1.2描述1735.1.3引脚配置1745.1.4结构纵览1755.2AT90S23131835.2.1特点1835.2.2描述1845.2.3引脚配置1855.3ATmega8/8L1855.3.1特点1865.3.2描述1875.3.3引脚配置1895.3.4开发实验工具1905.4AT90S2333/44331915.4.1特点1915.4.2描述1925.4.3引脚配置1945.5AT90S4414/85151955.5.1特点1955.5.2AT90S4414和AT90S8515的比较1965.5.3引脚配置1965.6AT90S4434/85351975.6.1特点1975.6.2描述1985.6.3AT90S4434和AT90S8535的比较1985.6.4引脚配置2005.6.5AVR RISC结构2015.6.6定时器/计数器2125.6.7看门狗定时器 2175.6.8EEPROM读/写2175.6.9串行外设接口SPI2175.6.10通用串行接口UART2175.6.11模拟比较器 2175.6.12模数转换器2185.6.13I/O端口2235.7ATmega83/1632285.7.1特点2285.7.2描述2295.7.3ATmega83与ATmega163的比较2315.7.4引脚配置2315.8ATtiny10/11/122325.8.1特点2325.8.2描述2335.8.3引脚配置2355.9ATtiny15/L2375.9.1特点2375.9.2描述2375.9.3引脚配置2395 .10ATmega128/128L2395.10.1特点2405.10.2描述2415.10.3引脚配置2435.10.4开发实验工具2455.11ATmega1612465.11.1特点2465.11.2描述2475.11.3引脚配置2475.12AVR单片机替代MCS51单片机249第六章实用程序设计6.1程序设计方法2506.1.1程序设计步骤2506.1.2程序设计技术2506.2应用程序举例2516.2.1内部寄存器和位定义文件2516.2.2访问内部 EEPROM2546.2.3数据块传送2546.2.4乘法和除法运算应用一2556.2.5乘法和除法运算应用二2556.2.616位运算2556.2.7BCD运算2556.2.8冒泡分类算法2556.2.9设置和使用模拟比较器2556.2.10半双工中断方式UART应用一2556.2.11半双工中断方式UART应用二2566.2.128位精度A/D转换器2566.2.13装载程序存储器2566.2.14安装和使用相同模拟比较器2566.2.15CRC程序存储的检查2566.2.164×4键区休眠触发方式2576.2.17多工法驱动LED和4×4键区扫描2576.2.18I2C总线2576.2.19I2C工作2586.2.20SPI软件2586.2.21验证SLAVR实验器及AT90S1200的口功能12596.2.22验证SLAVR实验器及AT90S1200的口功能22596.2.23验证SLAVR实验器及具有DIP40封装的口功能第七章AVR单片机的应用7.1通用延时子程序2607.2简单I/O口输出实验2667.2.1SLAVR721.ASM 2667.2.2SLAVR722.ASM2677.2.3SLAVR723.ASM2687.2.4SLAVR724.ASM2707.2.5SLAVR725.ASM2717.2.6SLAVR726.ASM2727.2.7SLAVR727.ASM2737.3综合程序2747.3.1LED/LCD/键盘扫描综合程序2747.3.2LED键盘扫描综合程序2757.3.3在LED上实现字符8的循环移位显示程序2757.3.4电脑放音机2777.3.5键盘扫描程序2857.3.6十进制计数显示2867.3.7廉价的A/D转换器2897.3.8高精度廉价的A/D转换器2947.3.9星星灯2977.3.10按钮猜数程序2987.3.11汉字的输入3047.4复杂实用程序3067.4.110位A/D转换3067.4.2步进电机控制程序3097.4.3测脉冲宽度3127.4.4LCD显示8字循环3187.4.5LED电脑时钟3247.4.6测频率3307.4.7测转速3327.4.8AT90S8535的A/D转换334第八章BASCOMAVR的应用8.1基于高级语言BASCOMAVR的单片机开发平台3408.2BASCOMAVR软件平台的安装与使用3418.3AVR I/O口的应用3458.3.1LED发光二极管的控制3458.3.2简易手控广告灯3468.3.3简易电脑音乐放音机3478.4LCD显示器3498.4.1标准LCD显示器的应用3498.4.2简单游戏机--按钮猜数3518.5串口通信UART3528.5.1AVR系统与PC的简易通信3538.5.2PC控制的简易广告灯3548.6单总线接口和温度计3568.7I2C总线接口和简易IC卡读写器359第九章ICC AVR C编译器的使用9.1ICC AVR的概述3659.1.1介绍ImageCraft的ICC AVR3659.1.2ICC AVR中的文件类型及其扩展名3659.1.3附注和扩充3669.2ImageCraft的ICC AVR编译器安装3679.2.1安装SETUP.EXE程序3679.2.2对安装完成的软件进行注册3679.3ICC AVR导游3689.3.1起步3689.3.2C程序的剖析3699.4ICC AVR的IDE环境3709.4.1编译一个单独的文件3709.4.2创建一个新的工程3709.4.3工程管理3719.4.4编辑窗口3719.4.5应用构筑向导3719.4.6状态窗口3719.4.7终端仿真3719.5C库函数与启动文件3729.5.1启动文件3729.5.2常用库函数3729.5.3字符类型库3739.5.4浮点运算库3749.5.5标准输入/输出库3759.5.6标准库和内存分配函数3769.5.7字符串函数3779.5.8变量参数函数3799.5.9堆栈检查函数3799.6AVR硬件访问的编程3809.6.1访问AVR的底层硬件3809.6.2位操作3809.6.3程序存储器和常量数据3819.6.4字符串3829.6.5堆栈3839.6.6在线汇编3839.6.7I/O寄存器3849.6.8绝对内存地址3849.6.9C任务3859.6.10中断操作3869.6.11访问UART3879.6.12访问EEPROM3879.6.13访问SPI3889.6.14相对转移/调用的地址范围3889.6.15C的运行结构3889.6.16汇编界面和调用规则3899.6.17函数返回非整型值3909.6.18程序和数据区的使用3909.6.19编程区域3919.6.20调试3919.7应用举例*3929.7.1读/写口3929.7.2延时函数3929.7.3读/写EEPROM3929.7.4AVR的PB口变速移位3939.7.5音符声程序3939.7.68字循环移位显示程序3949.7.7锯齿波程序3959.7.8正三角波程序3969.7.9梯形波程序396附录1AT89系列单片机简介398附录2AT94K系列现场可编程系统标准集成电路401附录3指令集综合404附录4AVR单片机选型表408参 考 文 献412
上传时间: 2013-11-08
上传用户:xcy122677
单片机应用技术选编(1) 第一章 单片机系统综合应用技术 11.1 且使用 8098单片机的几点体会 2 1.2 单片机的冷启动与热启动 31.3 大容量动态存储器在单片机系统中的应用111.4 MCS-51单片机系统中动态 RAM的刷新技巧141.5 MCS-51单片机系统中外RAM空间超64KB的扩展方法161.6 8031单片机P0口和P2口的应用开发 181.7 74LS164在 8031单片机中的两种用法261.8 用于 8031单片机的快速I/O接口281.9 MCS-51定时器定时常数初值的精确设定法301.10 8253的翻转问题及 MC6840的替代方法321.11 MCS-51单片机外部中断源的扩展设计351.12 MCS-51单片机多外中断扩展方法401.13 用优先权编码器74LS348扩展51系列单片机的外中断源421.14 用优先权编码器74LS148扩展51系列单片机的外中断源471.15 8031单片机与 BG5119A汉字库的接口方法521.16 可背插 SRAM的日历时钟 DS1216及其应用551.17 实时日历时钟集成电路MSM5832及其时序601.18 实时日历时钟集成电路MSM5832的接口技术631.19 实时时钟/日历芯片MC146818及其应用671.20 与 SICE仿真器通讯的IBM-PC机通讯程序的改进741.21 代码形式参数汇编子程序的应用821.22 单片机应用系统中的查表程序设计861.23 用状态综合法设计键盘监控程序901.24 单片机系统程序的加密技术961.25 MCS-96单片机程序保密的几种方法1001.26 GAL输出宏单元原理及使用105 1.27 通用阵列逻辑 GAL应用于步进电机控制实例110 第二章 传感器与前向通道接口技术1172.1 集成温度传感器 LM134及其应用1182.2 AD590集成温度一电流传感器原理及应用1242.3 集成温度传感器 AD590的应用1292.4 GS-800和 GS-130可燃气体传感器1332.5 集成化霍尔开关传感器1352.6 一种新颖实用的氧气/频率转换电路1392.7 MCS-51单片机与数字式温度传感器的接口设计1422.8 数字式温度传感器 SWC与 8031的接口及应用1452.9 低成本高精度压力传感器微机接口设计1472.10 峰值检测电路原理及应用1512.11 用 LF398制作的实用峰值和谷值保持电路1532.12 AD637集成真有效值转换器1562.13 传感器信号调理模块 ZB311622.14 2B31模块在称重智能仪表中的应用1662.15 传感器信号调理模块 2B30/2B31及其应用1692.16 高精度光纤位移测量系统的电路设计1752.17 集成电压一电流转换器 XTR100的工作原理及应用1792.18 传感器信号变送器 F693及其应用1852.19 一种用两片 VFC32构成的隔离放大器电路1912.20 实用线性隔离放大器1922.21 电桥放大电路中 7650的一些应用问题1942.22 A/D转换器 ICL7109的应用研究1962.23 5G14433模数转换器的启停控制2002.24 ADC1130模数转换器及其使用2042.25 16位 A/D转换器 ADC1143及其与 80C31单片机的接口2082.26 串行 I/O D/A A/D转换器与单片机的接口2132.27 单片机应用系统中的数字化传感器接口技术2162.28 ADVFC32 A/D转换接口技术2202.29 V/F和 F/V转换器 TD650原理与应用2242.30 AD650与 MC-51单片机的接口技术2302.31 利用VCO电路与单片机接口实现A/D转换2352.32 LM2907/2917系列F/V变换器在汽车检测中的应用2382.33 单信号多通道输入法改善 A/D转换器性能2412.34 用多片 A们转换芯片提高 A/D转换速度2452.35 实时数控增益调整与浮点 ADC电路2492.36 电荷耦合器件的单片机驱动2532.37 电荷耦合器件的结构原理与单片机的软件定时驱动2582.38 利用模数转换器提高转换信号的线性度2622.39 利用微型机解决转换中的非线性问题2682.40 利用非线性曲线存储实现线性化的方法2702.41 输出无非线性误差的可变电压源单臂电桥274 第三章 控制系统与后向通道接口技术2793.1 DAC1231与单片机 8031的接口技术2803.2 单路及多路 D八的光电隔离接口技术2843.3 光电隔离高压驱动器2903.4 TRAIC型光耦在 8031后向通道接口的应用分析2913.5 GD-L型光控晶闸管输出光耦合器2963.6 用于晶闸管过零触发的几种方式3003.7 固态继电器3043.8 固态继电器在交流电子开关中的应用3083.9 JCG型参数固态继电器3123.10 JCG型参数固态继电器的应用315 3.11 介绍几种适用于印刷电路板的超小型电磁继电器3193.12 用TWH8751集成电路构成微机控制的三步进电机驱动电源3223.13 3-4相步进电机控制器 5G87133253.14 5G0602报警电路及应用3283.15 两种新型温控光控兀的应用330 第四章 人机对话通道接口技术3334.1 单片机键盘接口设计3344.2 由电话机集成电路构成的单片机键盘接口电路3364.3 用 GAL设计的一种编码键盘接口3384.4 用 CMOS电路构成的非编码触摸键盘3424.5 设计薄膜开关应注意的一些问题3454.6 触摸式电子开关集成电路 5G673及其应用3504.7 8279用于拨码盘及显示器的接口设计3544.8 LED数码管的构造与特点3584.9 LED数码管的集成驱动器及配套器件3624.10 8279芯片的显示接口分析及32位数码管显示驱动电路设计366 4.11 用三端可调稳压块代替LED显示器的限流电阻3704.12 液晶显示器件的构造与特点3714.13 LCD七段显示器与单片机的接口3744.14 液晶显示器与单片机的接口技术3764.15 可编程LCD控制驱动器PPD72253814.16 微机总线兼容的四位 LCD驱动电路 TSC7211AM3874.17 使用8255的双极性归零脉冲驱动液晶显示器接口3914.18 DMC16230型 LCD显示模块的接口技术3954.19 点阵式液晶显示器原理及应用4034.20 实用液晶显示电路4094.21 8031控制的 CRT显示控制接口4144.22 用 8031控制多台彩色显示器的实现方法4194.23 高级语言处理器--T6668的结构与典型电路4234.24 延长 T6668语言电路录放时间的方法4294.25 T6668高级语音开发站4324.26 语言处理器 T6668在电话报警系统中的应用4354.27 新型语音处理器YYH16439 第五章 网络、通讯控制与多机系统4415.1 IBM-PC/XT和单片机通讯系统的设计4425.2 IBM-PC/XT微机与单片机的两种通讯接口4485.3 MCS-51单片机与 IBMPC微机的串行通讯4525.4 中央控制端与 MCS-51单片机间的数据通讯4595.5 IBMPC机与 MCS-51单片机的快速数据通讯4665.6 8031单片机与 PC-1500计算机的通讯4735.7 多片 MCS-51系统的一种串行通讯方式4775.8 多单片机处理系统并行通讯的实现4815.9 半双工远距离电流环多机通讯接口电路4855.10 多微机系统共享 RAM电路4905.11 串行通讯中的波特率设置4925.12 在MCS-51单片机的串行通讯中实现波特率的自动整定4965.13 J274和 J275在微机分布式测控系统中的应用5005.14 单电缆传送双向数据5045.15 新颖的多路遥控兀编译码器5055.16 DTMF在单片机无线数据通讯中的应用5085.17 MCS-8031单片机在红外遥控装置中的应用5155.18 一种实用光纤数字遥测系统5185.19 智能仪表通讯系统中一种冗余通道的设计5245.20 EIARS-232-C接口使用中的几个问题528 第六章 电源、电源变换与电源监视5316.1 电源扩展电路5326.2 一种简单的直流三倍压电路533 6.3 直流电源变换集成电路5356.4 直流电压变换器ICL7660的应用5376.5 一种廉价高精密基准电压源5406.6 精密可调基准电压源及其应用5416.7 引脚可编程精密基准电压源AD584及其应用5496.8 几种新型恒流源集成电路5536.9 CW334三端可调恒流源及应用5576.10 电源电压监视用芯片TL7705CP简介5606.11 电源电压监视用芯片TL7700简介5646.12 WMS7705B电源监视用芯片简介5676.13 具有HMOS结构的MCS-51系列单片机提供后备电源的方法570 第七章 系统抗于扰技术5757.1 微型计算机系统的抗干扰措施5767.2 计算机应用系统抗干扰问题5797.3 微机在工业应用中的抗干扰措施5867.4 利用电源监视TL7705芯片的抗电源于扰新方法5917.5 利用电源监视芯片WMS7705的抗电源干扰新方法5947.6 具有浪涌抑制能力的 TVP 6017.7 瞬变电压抑制M极管TVP的特性及应用6047.8 单片机实时控制软件抗干扰编程方法的探讨6077.9 一种简单实用的微机死机自复位抗干扰技术6107.10 单片机程序的监视保护6127.11 软件 WATCHDOG系统615 7.12 一种实用的"看门狗"电路6187.13 高电压下测量系统的抗干扰措施619 第八章 应用实例6218.1 单片机在多功能函数发生器中的应用6228.2 单片机波形发生器6298.3 单片机控制的调幅波发生器6338.4 用 8031单片机解调时统信号6368.5 具有 114DB动态范围的浮点数据采集系统6418.6 电热恒温箱单片微机控制系统6468.7 智能 I一、C丑测试仪的原理及设计6528.8 采用 LMS算法的单片机数字交流电桥6568.9 单片微机的数字相位测试仪6598.10 单片机的气体流量测量6628.11 单片机的相关流量仪6688.12 723型可见分光光度计6758.13 多功能微电脑电子秤6798.14 智能路面回弹检测仪6838.15 使用 CCD的单片机动态布面检测系统6878.16 使用 CCD的单片机激光衍射测径系统6908.17 使用 CCD的单片机动态线径测量仪6958.18 使用CCD的单片机中型热轧圆钢直径检测仪7018.19 用 MCS-51单片微机实现织布机的监测7058.20 单片机在工频参量测试中的应用7098.21 单片机 8098在直线电机控制中的应用715?
上传时间: 2014-12-28
上传用户:liufei
低空测试仪试验需要把整个测试仪作为吊舱挂在直升机下工作,能适应各种恶劣的自然条件,用于某飞行部件地海杂波环境下的测试。以PC104嵌入式计算机为硬件平台,标准C++为开发工具,针对低空测试仪数据采集需求开发了测控程序。通过电平I\O控制电源板给各信号加电时序,A\D卡实时采集信号,高度表通过串口回传高度数据。着重介绍了低空测试仪的软硬系统设计方案,给出了一组测试数据,验证了测控程序的有效性。现场应用表明,该系统具有设计合理,操作简便,测试准确的特点,达到了设计要求。
上传时间: 2013-10-11
上传用户:hphh
哈希表设计:数组,结构体
上传时间: 2015-01-10
上传用户:二驱蚊器
如何给链表数组赋值,很适合初学数据结构的朋友。
标签: 数组
上传时间: 2013-12-27
上传用户:dragonhaixm