Code for my numitron clock. Based on the STM32F042 and using a TLC5916 per numitron to drive them.
Revision 3:e89157584674, committed 2017-01-22
- Comitter:
- riktw
- Date:
- Sun Jan 22 22:20:58 2017 +0000
- Parent:
- 2:e1d75e2ab77d
- Commit message:
- Back to 8Mhz, revision 1.0
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-dev.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r e1d75e2ab77d -r e89157584674 main.cpp --- 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
diff -r e1d75e2ab77d -r e89157584674 mbed-dev.lib --- a/mbed-dev.lib Sun Dec 25 09:59:26 2016 +0000 +++ b/mbed-dev.lib Sun Jan 22 22:20:58 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/riktw/code/mbed-dev/#4ad7ad749c0c +https://developer.mbed.org/users/riktw/code/mbed-dev/#0a78729d3229