Its been a fair bit of time since I last posted, mostly attributed to the fact that I’m no longer living down south and have moved home for the next two weeks until I return to university! None the less, after re-arranging my room at home to my liking (my family have the obsession of moving everything to positions which make me hate my room entirely!), I’ve got a new update for you guys!
Its a relatively simple one. Combining my ILI9163 LCD library with the standard peripheral STM32F0 ADC library, I’ve made a really simple analog accelerometer test app. All it does really is display un-normalised analog values on the LCD at a rate determined by how fast the LCD can be updated. The actual accelerometer module that I’m using is a really cheap one that I got off eBay, probably the cheapest accelerometer you can buy due to the fact that all it does is spit out an analog voltage relative to the level of acceleration the board is receiving (£1.24! http://goo.gl/mBYkLG – Link will expire!).
With regards to the wiring, hopefully the code comments help tell this but none the less:
- ADCX -> PA0
- ADCY -> PA1
- ADCX -> PA2
- LCD_CD -> PA3
- LCD_RST -> PA4
- LCD_AO -> PA6
- LCD_DAT -> PA7
- LCD_CLK -> PA5
I’ve not bothered to wire up the backlight or VCC to dedicated pins on my STM32F0.
The easiest way to explain what is happening is through a video so voila!
As per usual, the code is available on my github for those interested!