提出了一种基于单片机的温控系统软件和硬件的设计方案。本设计采用8 位单片机和 16 位A/D 变换器相组合构成温度采集系统进一步提高系统的性价比。采用数字PID 控制使温控精度在300-500℃范围内达到1℃,并可实现温度设定值的连续可调。采用铂电阻温度测量电路,并利用软件对测量精度进行自校准;通过电压前馈控制减少电网干扰。设计中还加入了光电隔离措施及过热自动保护和报警功能,增强了系统的安全性能。 关键字:单片机;A/D 变换器;PID;温度控制 Abstract: Gives a design of singlechip’s software and hardware of temperature controlling system. The temperature collecting system is composed of 8 bit singlechip and 16 bit A/D converter, and it can improve the performance price rate of the system. The temperature can be controlled within the range of 300-500℃ with a precision of 1℃ and uninterrupted adjustability of temperature setting is realized by Using the digital PID control. Temperature-measuring circuit of platinum resistors and software is employed to carry on adjustment of measured precision. The interference of the grid is reduced by the voltage front feed, and it calls for the application of the photoelectric insulation, the over heating protection and alarm to enhance the security the system. Keywords: Singlechip; A/D converter; PID; temperature control