Code for my numitron clock. Based on the STM32F042 and using a TLC5916 per numitron to drive them.
Diff: main.cpp
- Revision:
- 3:e89157584674
- Parent:
- 1:c80f72f7ee20
--- a/main.cpp Sun Dec 25 09:59:26 2016 +0000 +++ b/main.cpp Sun Jan 22 22:20:58 2017 +0000 @@ -9,6 +9,8 @@ const uint8_t numbers[10] = {0x7B, 0x60, 0x57, 0x76, 0x6C, 0x3E, 0x3F, 0x70, 0x7F, 0x7E}; uint8_t flip = 1; +uint8_t SetSysClock_PLL_HSE_16M(void); + RTC_HandleTypeDef hrtc; HAL_StatusTypeDef status; void SystemClock_Config(void); @@ -60,7 +62,7 @@ wait_us(10); OE = 0; - secondticker.attach(&updatetime, 2); + secondticker.attach(&updatetime, 1); while( 1 ) { uint8_t bpressed = buttons; @@ -191,5 +193,4 @@ HAL_RTC_SetDate(&hrtc, &sDate, RTC_FORMAT_BCD); -} - +} \ No newline at end of file