成都信息工程学院单片机课程组 Tel:(028)85966010
目 录
第 1 章 Keil C51 操作入门.........................................................................................3
1.1 Keil C51 简介......................................................................................................................3
1.2 Keil C51 的安装..................................................................................................................3
1.3 建立第 1 个 Keil C51 程序..................................................................................................3
1.4 新建 A51 汇编工程.............................................................................................................8
第 2 章 在 Keil C51 下调试程序.................................................................................9
2.1 进入仿真状态......................................................................................................................9
2.2 认识各个仿真窗口..............................................................................................................9
2.3 程序的运行控制................................................................................................................12
2.4 外围设备访问....................................................................................................................13
第 3 章 DP-51MCore 基本操作................................................................................14
3.1 DP-51MCore 简介.............................................................................................................14
3.2 以 ISP 下载方式运行程序................................................................................................15
3.2.1 ISP 电路说明..........................................................................................................15
3.2.2 ISP 驱动程序 Flash Magic 简介............................................................................15
3.2.3 ISP 操作步骤..........................................................................................................15
3.3 以硬件在线仿真的方式调试程序....................................................................................17
3.4 内嵌在线仿真占用的系统资源........................................................................................18
第 4 章 DP-51MCore 实验........................................................................................19
4.1 基础实验............................................................................................................................19
4.1.1 实验 1:点亮 LED.................................................................................................19
4.1.2 实验 2:按键控制 LED.........................................................................................21
4.1.3 实验 3:LED 闪烁发光.........................................................................................22
4.1.4 实验 4:按键中断..................................................................................................24
4.1.5 实验 5:用 PWM 方波调节 LED 亮度.................................................................25
4.1.6 实验 6:UART 基本收发......................................................................................27
4.2 MCU BANK1 实验............................................................................................................31
4.2.1 实验 1:动态数码管扫描......................................................................................31
4.2.2 实验 2:按键扫描..................................................................................................33
4.2.3 实验 3:DAC0832(8 位并行 DAC).................................................................34
4.2.4 实验 4:ADC0804(8 位并行 ADC).................................................................35
4.2.5 实验 5:TLC5615(10 位串行 DAC).....................................................................36
4.2.6 实验 6:TLC1549(10 位串行 ADC)................................................................38
4.3 MCU BANK2 实验............................................................................................................39
4.3.1 实验 1:动态数码管扫描......................................................................................39
4.3.2 实验 2:交流蜂鸣器发声......................................................................................40
4.3.3 实验 3:交流蜂鸣器演奏简单乐曲......................................................................42
4.3.4 实验 4:用 8255 扩展并行 IO...............................................................................44
4.3.5 实验 5:按键扫描..................................................................................................45
4.3.6 实验 6:扩展片外 RAM........................................................................................47
4.3.7 实验 7:在 RAM 中执行程序代码.......................................................................49
4.4 MCU BANK3 实验............................................................................................................51