51单片机模块代码

  • s9_938327
    了解作者
  • 1.3MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 09:49
    上传日期
程序名称 功能简介 备注 SH101.C 最简单片机系统的测试程序,端口的电平操作。 SH102.C 控制LED灯的亮灭 SH103.C 控制LED灯的定时亮灭,单片机定时器的使用。 SH104.C 通过按键控制LED灯的亮灭,中断的使用。 105 芯片和电路介绍 不提供程序。 SH106.C 串口的简单测试程序。 程序名称 功能简介 备注 SH201.C 行列键盘的输入例程 SH202.C 锁定键盘的程序 SH203.C 单片机中的多路模拟开关例程 SH204.C 单片机控制的数码管显示 SH205.C 单片机的数字时钟例程 206 CDWE.A51 inclr.A51 KEYLINE.C KEYSTATE.C DISP.C 键盘输入内容的液晶显示程序。 本例由五个程序模块组成。 SH207.C 微机键盘和单片机的接口程序 SH208.C 微型打印机和单片机的接口程序 ......
51单片机模块代码.rar
  • 单片机学习 (H)
  • 第五章程序
  • SH503.C
    1.5KB
  • SH507.DSW
    535B
  • SH507.DSP
    3.3KB
  • SH505.C
    1.5KB
  • SH507.ncb
    33KB
  • Debug
  • vc60.pdb
    28KB
  • vc60.idb
    33KB
  • SH501.C
    1KB
  • SH507.PLG
    1.2KB
  • SH507.C
    1.1KB
  • SH506.C
    789B
  • SH502.C
    1.1KB
  • SH507.OPT
    47.5KB
  • 新建文件夹
  • 微机键盘.Opt
    996B
  • 单片机多路开关模拟.lnp
    55B
  • SH202.obj
    2.1KB
  • 微机键盘_Opt.Bak
    993B
  • SH201.obj
    1.5KB
  • 定时亮灭的小灯.lnp
    53B
  • 单片机键盘的锁定.lnp
    55B
  • 单片机多路开关模拟.Opt
    926B
  • SH201.lst
    2.4KB
  • 单片机多路开关模拟_Uv2.Bak
    1.7KB
  • 单片机的键盘输入.plg
    0B
  • 定时亮灭的小灯
    1.5KB
  • 单片机多路开关模拟.Uv2
    1.7KB
  • SH103.obj
    1.5KB
  • 单片机多路开关模拟.M51
    6KB
  • 单片机多路开关模拟_Opt.Bak
    998B
  • 微机键盘.Uv2
    1.6KB
  • 微机键盘.plg
    587B
  • 单片机的键盘输入.lnp
    55B
  • 单片机键盘的锁定.plg
    309B
  • SH207.lst
    6KB
  • 单片机的键盘输入.Opt
    996B
  • 单片机键盘的锁定_Uv2.Bak
    0B
  • 定时亮灭的小灯_Uv2.Bak
    0B
  • 单片机键盘的锁定.Uv2
    1.7KB
  • SH203.lst
    2.4KB
  • SH202.lst
    4.8KB
  • 2.1单片机的键盘输入.Opt
    801B
  • 单片机的键盘输入.M51
    5.9KB
  • 定时亮灭的小灯.Opt
    998B
  • 单片机键盘的锁定.Opt
    1KB
  • 2_1单片机的键盘输入_Opt.Bak
    801B
  • 单片机键盘的锁定.M51
    8.5KB
  • SH103.lst
    1.9KB
  • 单片机的键盘输入
    1.3KB
  • 单片机的键盘输入_Uv2.Bak
    0B
  • 微机键盘_Uv2.Bak
    0B
  • 单片机键盘的锁定_Opt.Bak
    869B
  • 单片机键盘的锁定
    1.7KB
  • 单片机多路开关模拟.plg
    0B
  • 2.1单片机的键盘输入.Uv2
    1.7KB
  • 定时亮灭的小灯.M51
    5.8KB
  • 单片机多路开关模拟
    1.4KB
  • 定时亮灭的小灯.Uv2
    1.7KB
  • SH203.obj
    1.7KB
  • 定时亮灭的小灯_Opt.Bak
    996B
  • 定时亮灭的小灯.plg
    101B
  • 第二章程序
  • keyline.asm
    1KB
  • 液晶显示.lnp
    104B
  • CDWE.A51
    1.6KB
  • SH205.C
    5.9KB
  • 液晶显示_Uv2.Bak
    0B
  • CDWE.LST
    7.1KB
  • DISP.OBJ
    2.6KB
  • 液晶显示.Opt
    1.1KB
  • inclr.OBJ
    744B
  • SH207.DSP
    3.3KB
  • SH203.C
    856B
  • keyline.OBJ
    612B
  • KEYSTATE.OBJ
    4.5KB
  • DISP.LST
    11.4KB
  • KEYSTATE.C
    2.9KB
  • SH201.C
    894B
  • inclr.LST
    4.3KB
  • Debug
  • vc60.pdb
    28KB
  • vc60.idb
    33KB
  • 液晶显示.plg
    0B
  • SH207.PLG
    1.2KB
  • 液晶显示.M51
    20.3KB
  • CDWE.OBJ
    879B
  • KEYSTATE.LST
    5KB
  • SH207.ncb
    41KB
  • SH204.C
    809B
  • 液晶显示.Uv2
    1.8KB
  • inclr.a51
    945B
  • SH207.C
    2.7KB
  • SH207.OPT
    52.5KB
  • keyline.LST
    4.6KB
  • SH207.DSW
    535B
  • SH208.C
    436B
  • DISP.C
    8.3KB
内容介绍
#define uchar unsigned char /*定义全局变量LINE,CLMN*/ uchar LINE, CLMN; /*LINE当前显示页,CLMN当前显示列*/ bit AREA; /*控制区域,AREA =0,E1控制区;AREA =1,E2控制区*/ /*说明使用到的外部变量*/ extern uchar COM, DAT, NDIG; extern char xdata BUFFER[]; /*定义西文字库*/ uchar code CTAB[0x61][0x08]= { {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* " "=00H */ {0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x00}, /* "!"=01H */ {0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00}, /* """=02H */ {0x00,0x14,0x7F,0x14,0x7F,0x14,0x00,0x00}, /* "#"=03H */ {0x00,0x24,0x2A,0x7F,0x2A,0x12,0x00,0x00}, /* "$"=04H */ {0x00,0x23,0x13,0x08,0x64,0x62,0x00,0x00}, /* "%"=05H */ {0x00,0x36,0x49,0x55,0x22,0x50,0x00,0x00}, /* "&"=06H */ {0x00,0x00,0x05,0x03,0x00,0x00,0x00,0x00}, /* "'"=07H */ {0x00,0x00,0x1C,0x22,0x41,0x00,0x00,0x00}, /* "("=08H */ {0x00,0x00,0x41,0x22,0x1C,0x00,0x00,0x00}, /* ")"=09H */ {0x00,0x14,0x08,0x3E,0x08,0x14,0x00,0x00}, /* "*"=0AH */ {0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x00}, /* "+"=0BH */ {0x00,0x00,0x50,0x30,0x00,0x00,0x00,0x00}, /* ";"=0CH */ {0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00}, /* "-"=0DH */ {0x00,0x00,0x60,0x60,0x00,0x00,0x00,0x00}, /* "."=0EH */ {0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00}, /* "/"=0FH */ {0x00,0x3E,0x51,0x49,0x45,0x3E,0x00,0x00}, /* "0"=10H */ {0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x00}, /* "1"=11H */ {0x00,0x42,0x61,0x51,0x49,0x46,0x00,0x00}, /* "2"=12H */ {0x00,0x21,0x41,0x45,0x4B,0x31,0x00,0x00}, /* "3"=13H */ {0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x00}, /* "4"=14H */ {0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00}, /* "5"=15H */ {0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x00}, /* "6"=16H */ {0x00,0x01,0x01,0x79,0x05,0x03,0x00,0x00}, /* "7"=17H */ {0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00}, /* "8"=18H */ {0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00}, /* "9"=19H */ {0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00}, /* ":"=1AH */ {0x00,0x00,0x56,0x36,0x00,0x00,0x00,0x00}, /* ";"=1BH */ {0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x00}, /* "<"=1CH */ {0x00,0x14,0x14,0x14,0x14,0x14,0x00,0x00}, /* "="=1DH */ {0x00,0x00,0x41,0x22,0x14,0x08,0x00,0x00}, /* ">"=1EH */ {0x00,0x02,0x01,0x51,0x09,0x06,0x00,0x00}, /* "?"=1FH */ {0x00,0x32,0x49,0x79,0x41,0x3E,0x00,0x00}, /* "@"=20H */ {0x00,0x7E,0x11,0x11,0x11,0x7E,0x00,0x00}, /* "A"=21H */ {0x00,0x41,0x7F,0x49,0x49,0x36,0x00,0x00}, /* "B"=22H */ {0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x00}, /* "C"=23H */ {0x00,0x41,0x7E,0x41,0x41,0x3E,0x00,0x00}, /* "D"=24H */ {0x00,0x7F,0x49,0x49,0x49,0x49,0x00,0x00}, /* "E"=25H */ {0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x00}, /* "F"=26H */ {0x00,0x3E,0x41,0x41,0x49,0x7A,0x00,0x00}, /* "G"=27H */ {0x00,0x7F,0x08,0x08,0x08,0x7F,0x00,0x00}, /* "H"=28H */ {0x00,0x00,0x41,0x7F,0x41,0x00,0x00,0x00}, /* "I"=29H */ {0x00,0x20,0x40,0x41,0x3F,0x01,0x00,0x00}, /* "J"=2AH */ {0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x00}, /* "K"=2BH */ {0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x00}, /* "L"=2CH */ {0x00,0x7F,0x02,0x0C,0x02,0x7F,0x00,0x00}, /* "M"=2DH */ {0x00,0x7F,0x06,0x08,0x30,0x7F,0x00,0x00}, /* "N"=2EH */ {0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00}, /* "O"=2FH */ {0x00,0x7F,0x09,0x09,0x09,0x06,0x00,0x00}, /* "P"=30H */ {0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x00}, /* "Q"=31H */ {0x00,0x7F,0x09,0x19,0x29,0x46,0x00,0x00}, /* "R"=32H */ {0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x00}, /* "S"=33H */ {0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x00}, /* "T"=34H */ {0x00,0x3F,0x40,0x40,0x40,0x3F,0x00,0x00}, /* "U"=35H */ {0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x00}, /* "V"=36H */ {0x00,0x7F,0x20,0x18,0x20,0x7F,0x00,0x00}, /* "W"=37H */ {0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x00}, /* "X"=38H */ {0x00,0x07,0x08,0x70,0x08,0x07,0x00,0x00}, /* "Y"=39H */ {0x00,0x61,0x51,0x49,0x45,0x43,0x00,0x00}, /* "Z"=3AH */ {0x00,0x00,0x7F,0x41,0x41,0x00,0x00,0x00}, /* "["=3BH */ {0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00}, /* "\"=3CH */ {0x00,0x00,0x41,0x41,0x7F,0x00,0x00,0x00}, /* "]"=3DH */ {0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x00}, /* "^"=3EH */ {0x00,0x40,0x40,0x40,0x40,0x40,0x00,0x00}, /* "_"=3FH */ {0x00,0x01,0x02,0x04,0x00,0x00,0x00,0x00}, /* "`"=40H */ {0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x00}, /* "a"=41H */ {0x00,0x7F,0x48,0x44,0x44,0x38,0x00,0x00}, /* "b"=42H */ {0x00,0x38,0x44,0x44,0x44,0x28,0x00,0x00}, /* "c"=43H */ {0x00,0x38,0x44,0x44,0x48,0x7F,0x00,0x00}, /* "d"=44H */ {0x00,0x38,0x54,0x54,0x54,0x18,0x00,0x00}, /* "e"=45H */ {0x00,0x00,0x08,0x7E,0x09,0x02,0x00,0x00}, /* "f"=46H */ {0x00,0x0C,0x52,0x52,0x4C,0x3E,0x00,0x00}, /* "g"=47H */ {0x00,0x7F,0x08,0x04,0x04,0x78,0x00,0x00}, /* "g"=48H */ {0x00,0x00,0x44,0x7D,0x40,0x00,0x00,0x00}, /* "i"=49H */ {0x00,0x20,0x40,0x44,0x3D,0x00,0x00,0x00}, /* "j"=4AH */ {0x00,0x00,0x7F,0x10,0x28,0x44,0x00,0x00}, /* "k"=4BH */ {0x00,0x00,0x41,0x7F,0x40,0x00,0x00,0x00}, /* "l"=4CH */ {0x00,0x7C,0x04,0x78,0x04,0x78,0x00,0x00}, /* "m"=4DH */ {0x00,0x7C,0x08,0x04,0x04,0x78,0x00,0x00}, /* "n"=4EH */ {0x00,0x38,0x44,0x44,0x44,0x38,0x00,0x00}, /* "o"=4FH */ {0x00,0x7E,0x0C,0x12,0x12,0x0C,0x00,0x00}, /* "p"=50H */ {0x00,0x0C,0x12,0x12,0x0C,0x7E,0x00,0x00}, /* "q"=51H */ {0x00,0x7C,0x08,0x04,0x04,0x08,0x00,0x00}, /* "r"=52H */ {0x00,0x58,0x54,0x54,0x54,0x64,0x00,0x00}, /* "s"=53H */ {0x00,0x04,0x3F,0x44,0x40,0x20,0x00,0x00}, /* "t"=54H */ {0x00,0x3C,0x40,0x40,0x3C,0x40,0x00,0x00}, /* "u"=55H */ {0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x00}, /* "v"=56H */ {0x00,0x3C,0x40,0x30,0x40,0x3C,0x00,0x00}, /* "w"=57H */ {0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00}, /* "x"=58H */ {0x00,0x1C,0xA0,0xA0,0x90,0x7C,0x00,0x00}, /* "y"=59H */ {0x00,0x44,0x64,0x54,0x4C,0x44,0x00,0x00}, /* "z"=5AH */ {0x00,0x00,0x08,0x36,0x41,0x00,0x00,0x00}, /* "{"=5BH */ {0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x00}, /* "|"=5CH */ {0x00,0x00,0x41,0x36,0x08,0x00,0x00,0x00}, /* "}"=5DH */ {0x00,0x02,0x01,0x02,0x04,0x02,0x00,0x00}, /* "~"=5EH */ {0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00},/* " "=5FH */ }; /*说明使用到的外部函数*/ void CWE1(void); /*实现控制器E1控制指令的传递*/ void CWE2(void); /* 实现控制器E2控制指令的传递*/ void DWE1(void); /*实现控制器E1控制数据的传递*/ void DWE2(void); /*实现控制器E2控制数据的传递*/ /* locate(uchar page,column)函数,指定字符串首字符的显示位置*/ void locate(uchar page,column) { page=page+column/120; LINE=page%4; COM=LINE|0xb8; CWE1(); CWE2(); column=column%120; CLMN=column; if (column>=60) { AREA=
评论
    相关推荐
    • 51单片机
      51单片机
    • 51单片机教程
      来自平凡单片机网站(word)
    • 51单片机程序
      LED流水灯实验是能较好的引导单片机爱好者入门学习,该程序实现了LED间隔10ms循环点亮
    • 51单片机程序
      包含51单片机的基础程序,以及综合程序。供初学者学习,及编写一定模块程序
    • 51单片机万年历
      该资源为51单片机资源,采用DS1302为时钟源,用LCD1602进行显示,压缩包里面还有protuse的仿真图,从程序到仿真齐全。
    • 51单片机WIFI
      利用wifi对51单片机进行控制,内附原理图及PCB板制作
    • 51单片机学习
      适合想学习51单片机的新人,能够快速学习,里面有多种实例可以方便学习。另外有很多视频,如果想要的话可以发邮件到:www.gaoju1024@qq.com
    • 51单片机万年历
      51单片机写的万年历程序加电路,经调试完全成功,希望对各位有帮助
    • 51单片机教程
      51单片机的初级教程,里面包含单片机的各个模块的详细介绍,以及各个模块的验证程序,能够学会单片机的操作
    • 单片机课件 51单片机
      课件 51单片机 C程序设计