【E538】基于STM32多功能(自动校时,天气,温度,农历,节气)的万年历时钟

2021-08-24 00:33:56      索炜达电子      889     

项目编号:E538

文件大小:1.54M

源码说明:带中文注释

开发环境:C编译器

简要概述

一种基于STM32多功能(自动校时,天气,温度,农历,节气)的万年历时钟

main.c : Charactor Encoding :System

boot0 boot1 x 0 Normal 0 1 ISP 1 1 SRAM

编译器: iar730

调整时间的方法: 

1.烧录的时候自动同步PC端时间; 

2.串口协议更新时间 打开串口调试助手,buad =115200,16进制发送 例如调整时间为 2015.08.08 20:18:09 发送数据如下: 【AA BB 20 15 08 08 20 18 09 FF 】

 3.GPS模块授时功能

  1. 登录网站:http://tool.chinaz.com/Tools/unixtime.aspx# 查询得到Unix时间戳,复制 下来,再调整8个时区(28800S)(格林威治时间,北京时间需要+8小时), 然后串口发送给时钟即可完成校时。

程序后续需要进行优化和改进的工作如下:

 1.加入遥控调整时间功能;

 2.加入UART IAP 功能;

 3.加入闹钟1~3组的功能;

注意: 1.在使用带jtag接口的I/O时要特别注意 PA13:SWDIO/JTAG_TMS PA14:SWCLK/JTAG_TCK PA15:JTAG_TDI PB3:JTAG_TDO PB4:JTAG_RST

LCD12864实际连线:

  1. RS

  2. R/W

  3. E 4.VCC 5.GND 6.BLKA 7.BLKN

其他均可以不连接(VO,RST.……)

部分硬件结构说明:

  1. 按键按下,(上连接VCC)连接电阻下拉到地,检测IO连接上端,检测到高电平。

目录│文件列表:

 └ Calendar_LCD12864

    │ keilkilll.bat

    │ LCD12864_calendar.siproj

    │ LCD12864_calendar.sip_sym

    │ LCD12864_calendar.sip_xab

    │ LCD12864_calendar.sip_xad

    │ LCD12864_calendar.sip_xc

    │ LCD12864_calendar.sip_xf

    │ LCD12864_calendar.sip_xm

    │ LCD12864_calendar.sip_xr

    │ LCD12864_calendar.sip_xsb

    │ LCD12864_calendar.sip_xsd

    │ LCD12864_calendar.siwork

    │ readme.txt

    ├ application

    │  ├ APP

    │  │  │ calendar.c

    │  │  └ calendar.h

    │  ├ BSP

    │  │  │ bsp_coerboard_led.c

    │  │  │ bsp_coreboard_led.h

    │  │  │ bsp_ds18b20.c

    │  │  │ bsp_ds18b20.h

    │  │  │ bsp_shenzhou1_key.c

    │  │  │ bsp_shenzhou1_key.h

    │  │  └ ST7920_LCD

    │  │     │ draw.c

    │  │     │ draw.h

    │  │     │ LCD12864.c

    │  │     └ LCD12864.h

    │  ├ Driver

    │  │  │ chipid.c

    │  │  │ chipid.h

    │  │  │ rtc.c

    │  │  │ rtc.h

    │  │  │ SysTick.c

    │  │  │ SysTick.h

    │  │  │ timer.c

    │  │  │ timer.h

    │  │  │ uart.c

    │  │  └ uart.h

    │  ├ Project

    │  │  │ UART1T4.dep

    │  │  │ UART1T4.ewd

    │  │  │ UART1T4.ewp

    │  │  │ UART1T4.ewt

    │  │  └ UART1T4.eww

    │  └ User

    │     │ delay.c

    │     │ delay.h

    │     │ main.c

    │     │ system_stm32f10x.c

    │     └ system_stm32f10x.h

    ├ doc

    │  └ QQ截图20151031132337.jpg

    ├ STM32f10x_Libraries

    │  ├ CMSIS

    │  │  └ CM3

    │  │     ├ CoreSupport

    │  │     │  │ core_cm3.c

    │  │     │  │ core_cm3.h

    │  │     │  │ core_cmFunc.h

    │  │     │  └ core_cmInstr.h

    │  │     └ DeviceSupport

    │  │        └ ST

    │  │           └ STM32F10x

    │  │              │ stm32f10x.h

    │  │              └ startup

    │  │                 ├ arm

    │  │                 │  │ startup_stm32f10x_cl.s

    │  │                 │  │ startup_stm32f10x_hd.s

    │  │                 │  │ startup_stm32f10x_hd_vl.s

    │  │                 │  │ startup_stm32f10x_ld.s

    │  │                 │  │ startup_stm32f10x_ld_vl.s

    │  │                 │  │ startup_stm32f10x_md.s

    │  │                 │  │ startup_stm32f10x_md_vl.s

    │  │                 │  └ startup_stm32f10x_xl.s

    │  │                 ├ gcc_ride7

    │  │                 │  │ startup_stm32f10x_cl.s

    │  │                 │  │ startup_stm32f10x_hd.s

    │  │                 │  │ startup_stm32f10x_hd_vl.s

    │  │                 │  │ startup_stm32f10x_ld.s

    │  │                 │  │ startup_stm32f10x_ld_vl.s

    │  │                 │  │ startup_stm32f10x_md.s

    │  │                 │  │ startup_stm32f10x_md_vl.s

    │  │                 │  └ startup_stm32f10x_xl.s

    │  │                 └ iar

    │  │                    │ startup_stm32f10x_cl.s

    │  │                    │ startup_stm32f10x_hd.s

    │  │                    │ startup_stm32f10x_hd_vl.s

    │  │                    │ startup_stm32f10x_ld.s

    │  │                    │ startup_stm32f10x_ld_vl.s

    │  │                    │ startup_stm32f10x_md.s

    │  │                    │ startup_stm32f10x_md_vl.s

    │  │                    └ startup_stm32f10x_xl.s

    │  └ STM32F10x_StdPeriph_Driver

    │     ├ inc

    │     │  │ misc.h

    │     │  │ stm32f10x_adc.h

    │     │  │ stm32f10x_bkp.h

    │     │  │ stm32f10x_can.h

    │     │  │ stm32f10x_cec.h

    │     │  │ stm32f10x_conf.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

    └ tools

       └ mcuisp.exe

TAG万年历时钟
  • 8 次
  • 1 分