Today I (mostly) completed my very first ever project using the STM8 microcontroller, and my first complete project using an environment other than Arduino. There are a bunch of features I want to implement sometime, but I achieved my main goal: to bumble around and get a development environment set up and working using SDCC and open source tools, and then to figure out the ST SPL.
The project itself is fairly straightforward. All it does is control an AD9833 DDS module, and displays the current settings on an LCD. But along the way, I got to figure out how to:
- write a driver from scratch using the datasheets
- implement software filtering and smoothing (and oversampling) on the ADC
- write my own delay routines using the timer peripherals
- get on-chip debugging working (and use the debugger to configure the alternate function registers)
- get printf() working to output to the LCD
.... and a bunch of other new-to-me stuff.
I documented everything as I went along on github and the accompanying wiki:
https://github.com/prosper00/STM8-AD9833-Function-Generator https://github.com/prosper00/STM8-AD9833-Function-Generator/wiki