Monotonous Wednesdays – Creating an extremely simple waveform viewer using the STM32F0 Discovery board and ILI9163 LCD

Well! Today, I didn’t feel like doing anything particularly productive so libraries were pretty much not an option. Instead, I decided to make a really simple oscilloscope which merely displays the current sample voltage and a trace of the samples on the screen using my ILI9163 and graphics libraries. The input voltage is specified from 0-3v so my ADC inputs don’t break and the sample rate is currently abysmal at 1ms/sample! Its a really really inefficient piece of code which uses a delay (gasp!) between samples to set a “somewhat” normal sample rate. If I touch the input without the pot connected however, I can see the mains frequency! Anyway, enough of my babbling and onto the video:

As you can see, the line rate is pretty slow (128 samples with each sample having a 1ms delay ain’t fast!) and its not even well synchronised so you wouldn’t really be able to do anything useful with it! It does however have a somewhat “accurate” voltage measurement, accurate to about 3% or so, which to be quite honest isn’t very accurate at all! I’m not sure if I’ll be improving this in the future but regardless, its been a fun little experiment at seeing how hard it would be to get a simple waveform viewer!

Enjoy!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s