1.常用的51单片机
51单片机即传统的兼容8051指令代码的8位单片机,对于新手来说,刚接触单片机主要已AT单片机和STC单片机。其两种单片机主要区别为不同的厂家生成,但代码基本可以通用。常用的AT89C51、AT89C52、AT89S51、AT89S52、STC89C51、STC89C52单片机代码均可通用。
但在使用52单片机时需要注意,52是51单片机的更新版本,相比51单片机,52多了一个T2定时器、128B只读存储器、4K只读存储器、2个中断和一个看门狗。
AT与STC单片机的主要区别是程序的下载方式,AT中的S51、S52系列的下载方式是ISP下载方式,而C51、C52与STC都是串口下载方式;其他方面基本大同小异
2.STC烧录步骤
(1)STC单片机烧录方式采用串口进行烧录程序,连接的方式如下图:
(2)所以需要先确保USB转串口驱动是识别到,且驱动运行正常;是否可通过电脑的设备管理器查看驱动是否正常;
(3)确保正常后,打开STC-ISP烧录工具;
(4)然后选择烧录工具所在的串口号;
(5)所需要烧录的单片机型号,以STC89C52单片机为例;
(6)选择好型号后,打开所需烧录的HEX文件;
(7)然后点击“下载/编程”按钮;
(8)由于STC89C52单片机烧录程序需要在上电后才能触发进入程序烧录流程,所以需要先对单片机进行断电,然后重新上电,单片机便可进入程序烧录状态;
(9)烧录成功后,STC-ISP烧录工具便显示“操作成功”。
相关文章









