【E817】STM32 PID温控系统源程序(18B20 硬件验证通过)

2021-09-06 09:48:27      索炜达电子      566     

项目编号:E817

文件大小:317K

源码说明:带中文注释

开发环境:C编译器

简要概述:

【E817】STM32 PID温控系统源程序(18B20 硬件验证通过)

引脚说明:
//定义MCU与LCD的接口
/*******************************
*D4---->PB8
*D5---->PB5
*D6---->PB6
*D7---->PB7
*RS---->PA8
*RW---->PA11
*EN---->PA12

LCD1602
VCC---->5V
GND---->GND
VO----->接对比度调节滑动变阻器- -->GND
LED+ -->5v
LED- -->GND

PWM输出(12703半导体制冷片)
4A电机pwm驱动芯片
*制冷IN1---->PB10
*加热IN2---->PB11

18B20数字温度传感器
18B20OUT---->PB9
按键

KEY1---->PB12
KEY1---->PB13
KEY1---->PB14

AT24C16
1(A0)---->GND
2(A1)---->GND
3(A2)---->GND
4(GND)---->GND
4(SDA)---->PC13---->4.7K(R)---->VCC
6(SCL)---->PC14---->4.7K(R)---->VCC
7(WP)---->GND---->104(C)---->VCC
8(VCC)---->VCC

功能说明:通过18B20检测温度,通过pwm输出来调节控温,未进行精准pid调试,恒温时间大约在5min左右。
2021.8.25 :基本程序编写完成。
2021.8.26:修改程序,既可以制热也可以制冷。
2021.8.27:加入24c16用于存储设定温度和模式,优化lcd显示。

目录│文件列表:

 └ PID控制-STM32F103C8T6 控温

    │ keilkilll.bat

    │ 编程日志.txt

    ├ CORE

    │  │ core_cm3.c

    │  │ core_cm3.h

    │  └ startup_stm32f10x_hd.s

    ├ HARDWORK

    │  ├ 24CXX

    │  │  │ 24cxx.c

    │  │  │ 24cxx.h

    │  │  │ iic.c

    │  │  └ iic.h

    │  ├ ds18b20

    │  │  │ ds18b20.c

    │  │  └ ds18b20.h

    │  ├ incrementpid

    │  │  │ incrementpid.c

    │  │  └ incrementpid.h

    │  ├ key

    │  │  │ key.c

    │  │  └ key.h

    │  ├ lcd1602

    │  │  │ LCD1602.c

    │  │  └ LCD1602.h

    │  ├ locationpid

    │  │  │ locationpid.c

    │  │  └ locationpid.h

    │  └ pwmout

    │     │ pwmout.c

    │     └ pwmout.h

    ├ OBJ

    │  │ PID.hex

    │  └ Template.hex

    ├ STM32F10x_FWLib

    │  ├ inc

    │  │  │ misc.h

    │  │  │ stm32f10x_adc.h

    │  │  │ stm32f10x_bkp.h

    │  │  │ stm32f10x_can.h

    │  │  │ stm32f10x_cec.h

    │  │  │ stm32f10x_crc.h

    │  │  │ stm32f10x_dac.h

    │  │  │ stm32f10x_dbgmcu.h

    │  │  │ stm32f10x_dma.h

    │  │  │ stm32f10x_exti.h

    │  │  │ stm32f10x_flash.h

    │  │  │ stm32f10x_fsmc.h

    │  │  │ stm32f10x_gpio.h

    │  │  │ stm32f10x_i2c.h

    │  │  │ stm32f10x_iwdg.h

    │  │  │ stm32f10x_pwr.h

    │  │  │ stm32f10x_rcc.h

    │  │  │ stm32f10x_rtc.h

    │  │  │ stm32f10x_sdio.h

    │  │  │ stm32f10x_spi.h

    │  │  │ stm32f10x_tim.h

    │  │  │ stm32f10x_usart.h

    │  │  └ stm32f10x_wwdg.h

    │  └ src

    │     │ misc.c

    │     │ stm32f10x_adc.c

    │     │ stm32f10x_bkp.c

    │     │ stm32f10x_can.c

    │     │ stm32f10x_cec.c

    │     │ stm32f10x_crc.c

    │     │ stm32f10x_dac.c

    │     │ stm32f10x_dbgmcu.c

    │     │ stm32f10x_dma.c

    │     │ stm32f10x_exti.c

    │     │ stm32f10x_flash.c

    │     │ stm32f10x_fsmc.c

    │     │ stm32f10x_gpio.c

    │     │ stm32f10x_i2c.c

    │     │ stm32f10x_iwdg.c

    │     │ stm32f10x_pwr.c

    │     │ stm32f10x_rcc.c

    │     │ stm32f10x_rtc.c

    │     │ stm32f10x_sdio.c

    │     │ stm32f10x_spi.c

    │     │ stm32f10x_tim.c

    │     │ stm32f10x_usart.c

    │     └ stm32f10x_wwdg.c

    ├ SYSTEM

    │  ├ delay

    │  │  │ delay.c

    │  │  └ delay.h

    │  ├ sys

    │  │  │ sys.c

    │  │  └ sys.h

    │  ├ timer3

    │  │  │ timer3.c

    │  │  └ timer3.h

    │  └ usart

    │     │ usart.c

    │     └ usart.h

    └ USER

       │ JLinkSettings.ini

       │ main.c

       │ PID.uvguix.Administrator

       │ PID.uvoptx

       │ PID.uvprojx

       │ stm32f10x.h

       │ stm32f10x_conf.h

       │ stm32f10x_it.c

       │ stm32f10x_it.h

       │ system_stm32f10x.c

       │ system_stm32f10x.h

       │ Template.BAT

TAGPID
  • 8 次
  • 1 分