virgoss / STC15F204EA-clock

STC15F204EA clock replacement firmware for ZM-907AA or equivalent pin out model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# STC DIY Clock Kit firmware ZM-907AA base on Jens J.(https://github.com/zerog2k/stc_diyclock) and Anatoli Klassen's work (https://github.com/dev26th/stc_diyclock_gps)
Firmware replacement for STC15F mcu-based DIY Clock Kit , aliexpress, et al.) Uses [sdcc](http://sdcc.sf.net) to build and official stc-isp tool, e.g stc-isp-15xx-v6.85I.exe to flash firmware on to STC15F204EA series microcontroller.


## features
Basic functionality
* time display/set 24 hour mode
* display seconds
* date display/set in MM/DD
* display auto-dim
* temperature display in °C
* alarm
* chime for selected hours


## hardware

* DIY LED Clock kit, based on STC15F204EA and DS1302, 
* connected to PC via cheap USB-UART adapter, e.g. CP2102, CH340G. 

## requirements
* sdcc installed and in the path


## firmware usage

If compiled with default options, pressing of S1 (the upper one) on start screen will cycle in:
set hour -> set minute -> set alarm hour -> set alarm minute -> alarm on/off -> chime start hour -> chime stop hour -> chime on/off

Use S2 (the lower one) to change corresponding value.

Pressing of S2 on the start screen will cycle in:
temperature -> date -> weekday -> seconds

To go to change mode, press S1 on corresponding screen.

On the start screen the last dot shows state if alarm (on/off).

## clock assumptions
Some of the code assumes 11.0592 MHz internal RC system clock (set by stc-isp or stcgal).

## disclaimers
This code is provided as-is, with NO guarantees or liabilities.
As the original firmware loaded on an STC MCU cannot be downloaded or backed up, it cannot be restored. If you are not comfortable with experimenting, I suggest obtaining another blank STC MCU and using this to test, so that you can move back to original firmware, if desired.

### references
stc15f204ea english datasheet:
http://www.stcmcu.com/datasheet/stc/stc-ad-pdf/stc15f204ea-series-english.pdf

[original firmware operation flow state diagram](docs/DIY_LED_Clock_operation_original.png)
[kit instructions w/ schematic](docs/DIY_LED_Clock.png)

About

STC15F204EA clock replacement firmware for ZM-907AA or equivalent pin out model


Languages

Language:C 92.5%Language:C++ 7.5%