51单片机快速入门教程 潘志铭,李健辉主编 9787302629320 清华大学出版社
当天发货,全新正版书。
¥
41.9
7.0折
¥
59.8
全新
库存21件
作者潘志铭,李健辉主编
出版社清华大学出版社
ISBN9787302629320
出版时间2023-05
装帧平装
开本其他
定价59.8元
货号12652996
上书时间2024-08-13
商品详情
- 品相描述:全新
- 商品描述
-
目录
第1 章 STC89 C52RC 开发平台和 工具·············································· 1 1.1 初识单片机··························2 1.1.1 单片机的概念·······················2 1.1.2 常见的51 单片机种类·············2 1.1.3 STC 单片机的命名规则···········3 1.2 STC89 C52RC 介绍················4 1.2.1 结构框架·····························4 1.2.2 引脚功能·····························5 1.2.3 *存储结构····························7 1.3 *51 核心板最小系统电路 介绍································· 10 1.3.1 电源电路··························· 10 1.3.2 时钟电路··························· 11 1.3.3 复位电路··························· 12 1.4 搭建开发环境····················· 13 1.4.1 本书资料包························ 13 1.4.2 Keil C51 的安装及设置·········· 13 1.4.3 STC-ISP 程序下载环境配置··· 18 思考题····································· 21 应用实践·································· 21 第2 章 C51 程序设计基础···················22 2.1 C51 程序的基本组成部分······ 23 2.1.1 包含头文件························ 23 2.1.2 主函数······························ 23 2.1.3 标识符与关键字·················· 24 2.1.4 程序注释··························· 24 2.1.5 其他规范····························24 2.2 C51 数据类型····················· 25 2.2.1 基本数据类型······················25 2.2.2 扩展数据类型······················26 2.3 C51 变量与常量·················· 26 2.3.1 变量··································27 2.3.2 常量··································29 2.4 C51 运算符························ 29 2.4.1 算术运算符·························29 2.4.2 关系运算符·························30 2.4.3 逻辑运算符·························30 2.4.4 位运算符····························31 2.5 C51 程序结构····················· 31 2.5.1 顺序结构····························32 2.5.2 选择结构····························32 2.5.3 循环结构····························35 2.6 C51 函数··························· 38 2.6.1 函数的定义·························38 2.6.2 函数的声明·························39 2.6.3 函数的参数·························39 2.6.4 函数的返回值······················39 2.6.5 函数的调用·························39 2.6.6 内部函数····························40 2.6.7 函数的命名规范···················41 2.7 C51 数组··························· 41 2.7.1 数组的定义·························41 2.7.2 数组的初始化······················41 2.7.3 数组元素的引用···················41 2.7.4 *二维数组·························· 42 2.7.5 字符串数组························ 42 2.7.6 数组的命名规范·················· 43 2.8 *C51 指针·························· 43 2.8.1 指针变量的定义和使用········· 44 2.8.2 指针变量的注意事项············ 45 2.8.3 指针与数组························ 45 2.9 Keil 编辑和编译及程序下载··· 46 2.9.1 新建Keil 工程····················· 46 2.9.2 新建并添加main.c 文件········· 48 2.9.3 配置工程··························· 49 2.9.4 编写程序代码····················· 49 2.9.5 程序编译··························· 50 2.9.6 STC-ISP 程序下载················ 51 思考题····································· 53 应用实践·································· 53 第3 章 LED 流水灯······························ 54 3.1 LED 灯的工作原理·············· 55 3.2 I/O 引脚部分寄存器············· 55 3.3 I/O 引脚控制的方法············· 56 3.3.1 字节操作··························· 56 3.3.2 位操作······························ 57 3.4 *I/O 引脚的内部结构············ 57 3.4.1 P0 组I/O 引脚····················· 57 3.4.2 P1 组I/O 引脚····················· 59 3.4.3 P2 组I/O 引脚····················· 60 3.4.4 P3 组I/O 引脚····················· 61 3.5 实例与代码解析·················· 62 3.5.1 位操作控制流水灯··············· 63 3.5.2 字节操作控制流水灯············ 66 思考题····································· 67 应用实践·································· 68 第4 章 独立按键输入·························· 69 4.1 按键检测原理····················· 70 4.2 按键软件去抖原理··············· 70 4.3 实例与代码解析·················· 72 思考题····································· 75 应用实践·································· 75 第5 章 蜂鸣器······································ 76 5.1 蜂鸣器介绍························ 77 5.2 蜂鸣器的工作原理··············· 77 5.3 实例与代码解析·················· 78 思考题····································· 80 应用实践·································· 80 第6 章 数码管显示······························ 82 6.1 数码管介绍························ 83 6.2 数码管的工作原理··············· 85 6.3 数码管静态显示·················· 86 6.4 数码管动态显示·················· 86 6.5 实例与代码解析·················· 87 思考题····································· 90 应用实践·································· 91 第7 章 外部中断·································· 92 7.1 中断的概念························ 93 7.2 中断系统框架····················· 94 7.2.1 中断源·······························94 7.2.2 中断触发条件······················95 7.2.3 中断请求标志······················97 7.2.4 中断允许控制······················98 7.2.5 中断优先级·························99 7.2.6 中断处理··························101 7.3 实例与代码解析·················103 思考题····································105 应用实践·································105 第8 章 定时器/计数器·······················107 8.1 机器周期与时钟周期···········108 8.2 定时器/计数器的工作原理····108 8.3 定时器/计数器系统框架·······110 8.3.1 定时/计数功能的选择········· 110 8.3.2 定时器/计数器的运行控制··· 111 8.3.3 工作模式与计数初值·········· 112 8.3.4 定时器/计数器中断············ 114 8.4 实例与代码解析·················117 8.4.1 计数器控制LED 灯············ 117 8.4.2 定时器控制LED 灯············ 120 思考题····································123 应用实践·································123 第9 章 PWM 与呼吸灯·····················124 9.1 PWM 基本参数··················125 9.1.1 电平标准························· 125 9.1.2 周期和频率······················ 125 9.1.3 占空比···························· 125 9.2 PWM 控制LED 亮度的 原理································126 9.3 PWM 输出原理··················126 9.3.1 输出PWM 信号················ 126 9.3.2 按照规律调节PWM 占空比···· 127 9.4 实例与代码解析·················129 思考题····································133 应用实践·································133 第10 章 串口通信······························134 10.1 通信协议介绍··················135 10.1.1 并行通信和串行通信······ 135 10.1.2 单工、半双工和全双工 数据传输····················· 136 10.2 串口通信协议介绍············136 10.2.1 UART 物理层··············· 137 10.2.2 UART 数据帧格式········· 137 10.2.3 UART 传输速率············ 138 10.2.4 UART 通信实例············ 138 10.3 UART 电路原理图·············139 10.4 串口中断························140 10.4.1 串口中断请求标志位·······140 10.4.2 串口中断允许控制位·······141 10.4.3 *串口中断优先级 控制位·························141 10.5 串口工作模式··················142 10.5.1 *工作模式0 ··················143 10.5.2 工作模式1····················143 10.5.3 *工作模式2 ··················147 10.5.4 *工作模式3 ··················149 10.6 实例与代码解析···············149 思考题····································155 应用实践·································155 第11 章 看门狗··································157 11.1 复位方法························158 11.1.1 外部RST 引脚复位·········158 11.1.2 软件复位······················158 11.1.3 通电/关电复位···············159 11.1.4 看门狗复位···················159 11.2 看门狗相关寄存器············159 11.3 看门狗溢出时间···············160 11.4 看门狗喂狗操作···············161 11.5 实例与代码解析···············161 思考题····································164 应用实践·································165 第12 章 内部Flash 读写··················166 12.1 ISP 与IAP·······················167 12.2 内部Flash 存储结构··········167 12.3 IAP 读写与擦除Flash 的 方法······························168 12.3.1 读取操作······················169 12.3.2 擦除操作······················170 12.3.3 写入操作······················171 12.4 Flash 读写注意事项···········172 12.5 实例与代码解析···············173 思考题····································181 应用实践·································181 附录·························································182 附录A 数制及转换方法············183 附录B 逻辑门表示符号············185 附录C 常用寄存器及部分位的 解释说明·····················186 附录D 51 核心板电路图···········191 参考文献·················································192
内容摘要
《51单片机快速入门教程》以实例为主导,以51 核心板为开发平台,涵盖了51 单片机开发基础、C51 程序设计基础、I/O 引脚、中断、定时器/计数器、通信、看门狗、Flash 等内容,详细介绍了STC89 C52RC芯片的大部分片上功能。本书10 个实例均包括每章实例所需要的知识、实例与代码解析、思考题和应用实践四大环节,每个实例都有详细的步骤和源代码。本书章节名称中带有“*”标志的为选读内容,但并不意味着这部分内容不重要。读者可以根据自己的学习需求选择是否阅读。
《51单片机快速入门教程》配套的资料包既包括51 核心板原理图、例程、软件包、软件资料,又包括配套的PPT讲义、视频等资料,且持续更新。**下载链接可通过微信公众号“很好工程师培养系列”获取。编者建议,在学习本书的过程中,读者不仅要看要练,更要勤学多思。读者在阅读章节内容后,可在独立思考的情况下编写实例代码,最后独立完成思考题和应用实践部分。
《51单片机快速入门教程》既可作为高等院校相关专业的教材,也可供从事单片机开发的工程技术人员参考。
主编推荐
《51单片机快速入门教程》以实例为主导,以51 核心板为开发平台,涵盖了51 单片机开发基础、C51 程序设计基础、I/O 引脚、中断、定时器/计数器、通信、看门狗、Flash 等内容,详细介绍了STC89 C52RC芯片的大部分片上功能。本书10 个实例均包括每章实例所需要的知识、实例与代码解析、思考题和应用实践四大环节,每个实例都有详细的步骤和源代码。本书章节名称中带有“*”标志的为选读内容,但并不意味着这部分内容不重要。读者可以根据自己的学习需求选择是否阅读。 《51单片机快速入门教程》配套的资料包既包括51 核心板原理图、例程、软件包、软件资料,又包括配套的PPT讲义、视频等资料,且持续更新。近期新下载链接可通过微信公众号“很好工程师培养系列”获取。编者建议,在学习本书的过程中,读者不仅要看要练,更要勤学多思。读者在阅读章节内容后,可在独立思考的情况下编写实例代码,最后独立完成思考题和应用实践部分。 《51单片机快速入门教程》既可作为高等院校相关专业的教材,也可供从事单片机开发的工程技术人员参考。
精彩内容
《51单片机快速入门教程》以实例为主导,以51 核心板为开发平台,涵盖了51 单片机开发基础、C51 程序设计基础、I/O 引脚、中断、定时器/计数器、通信、看门狗、Flash 等内容,详细介绍了STC89 C52RC芯片的大部分片上功能。本书10 个实例均包括每章实例所需要的知识、实例与代码解析、思考题和应用实践四大环节,每个实例都有详细的步骤和源代码。本书章节名称中带有“*”标志的为选读内容,但并不意味着这部分内容不重要。读者可以根据自己的学习需求选择是否阅读。 《51单片机快速入门教程》配套的资料包既包括51 核心板原理图、例程、软件包、软件资料,又包括配套的PPT讲义、视频等资料,且持续更新。**下载链接可通过微信公众号“很好工程师培养系列”获取。编者建议,在学习本书的过程中,读者不仅要看要练,更要勤学多思。读者在阅读章节内容后,可在独立思考的情况下编写实例代码,最后独立完成思考题和应用实践部分。 《51单片机快速入门教程》既可作为高等院校相关专业的教材,也可供从事单片机开发的工程技术人员参考。
— 没有更多了 —
以下为对购买帮助不大的评价