Its a fun little project and well worth building just for the entertainment value. Currently bandwidth is a little limited, but with a little extra effort it would be possible to make a fully functional 2MHz Scope for next to nothing. Ideal for probing i2c, audio and other low speed signals.
EDIT: We managed to squeeze the maximum speed out of the ADC, read further through the thread for details. The github code includes all of the enhancements made of the course of this thread.
Replies20
rexnanet Wed Nov 16, 2016 10:11 am
mausi_mick wrote:Hi rexnanet,
it was a good idea from You to use only one rotary encoder (and the switch-button on it).
Hi,
I need interrupt only on pin16 / PB6.
I use the EC-11 Encoder from ALPS with only 18 switch-positions. The switching characteristic is not symmetric :
EC-11_Switch_Characteristic.jpg
EC-11_Switch_Characteristic.jpg (77.1 KiB) Viewed 1377 times
rexnanet Fri Nov 18, 2016 11:10 am
Hi,
Ok, I see now. With the EC11-E… types you can use only one interrupt.
Maybe this was the main idea for them to create this type of switching… hummm
ThunderOwl Wed Nov 23, 2016 12:06 pm
Hello, mausi_mick! I finally got time to try your sketches. Looks like I have something wrong, maybe you and others experienced have some suggestions for me. Sketch 07 is kinda “frozen”, and picture refreshes only at moment if I do something with encoder. In sketch “06” screen refreshes in about 1 time in 1 second. For test, that I have hardware Okay, I uploaded old basic sketch “STM32-O-Scope.ino” – it works okay.
When compiling “06”, “07” I got warnings about “void dma_setup_transfer”, could be this related (sorry my poor knowledge)? Warnings:
E:\Elektron\OSC\STM32-O-Scope\mausi_mick\STM32-O-Scope-07\STM32-O-Scope-07.ino: In function 'void takeSamples()':E:\Elektron\OSC\STM32-O-Scope\mausi_mick\STM32-O-Scope-07\STM32-O-Scope-07.ino:732:3: warning: 'void dma_setup_transfer(dma_dev*, dma_channel, volatile void*, dma_xfer_size, volatile void*, dma_xfer_size, uint32)' is deprecated (declared at C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include/series/dma.h:563) [-Wdeprecated-declarations]dma_setup_transfer(DMA1, DMA_CH1, &ADC1->regs->DR, DMA_SIZE_32BITS,^E:\Elektron\OSC\STM32-O-Scope\mausi_mick\STM32-O-Scope-07\STM32-O-Scope-07.ino:733:85: warning: 'void dma_setup_transfer(dma_dev*, dma_channel, volatile void*, dma_xfer_size, volatile void*, dma_xfer_size, uint32)' is deprecated (declared at C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include/series/dma.h:563) [-Wdeprecated-declarations]dataPoints32, DMA_SIZE_32BITS, (DMA_MINC_MODE | DMA_TRNS_CMPLT));// Receive buffer DMA
rexnanet Wed Nov 23, 2016 2:30 pm
ThunderOwl wrote:Sketch 07 is kinda “frozen”, and picture refreshes only at moment if I do something with encoder. In sketch “06” screen refreshes in about 1 time in 1 second.
mausi_mick Wed Nov 23, 2016 5:17 pm
Only. if functions/parameters changed with the encoder you have to call set_func or set_value.
Therefore you need a flag, set in the encoder-isr and reset by the set_func/value:
volatile boolean enc_flag= false;
ahull Thu Dec 01, 2016 12:42 pm
I was playing with one of those tiny 1.44″ TFT ebay displays, and wondered if it would be possible to get the pig-o-scope working with it. This display is ILI9163C based, but the original code calls for a ILI9341 display. After a bit of head scratching and much pointless code refactoring… I present…
The Pointlessly Small Pig-O-Scope… complete with 128×128 pixels and 1.44″ of almost illegible 1kHz square wave for your amusement.
RIMG0090_small.JPG
RIMG0090_small.JPG (203.14 KiB) Viewed 1762 times
ThunderOwl Thu Dec 01, 2016 12:49 pm
ahull wrote:I present…
The Pointlessly Small Pig-O-Scope… complete with 1.44″ of almost illegible 1kHz square wave for your amusement.
If anybody fancies merging this cut down version back in to the main variant, send me a git pull request.
ahull Thu Dec 01, 2016 12:54 pm
ThunderOwl wrote:ahull wrote:I present…
The Pointlessly Small Pig-O-Scope… complete with 1.44″ of almost illegible 1kHz square wave for your amusement.
If anybody fancies merging this cut down version back in to the main variant, send me a git pull request.
ThunderOwl Thu Dec 01, 2016 1:08 pm
ahull wrote:ThunderOwl wrote:Thank You for this version! But, is this code still with serial-terminal-only controls?
zoomx Fri Dec 02, 2016 2:23 pm
ahull wrote:
Yes, the tiny version is a lunchtime entertainment project, not intended for anything other than keeping me amused.
zmemw16 Fri Dec 02, 2016 2:28 pm
+1
ThunderOwl Fri Dec 02, 2016 2:56 pm
zoomx wrote:
Why not the 0.96″ OLED?
ahull Sat Dec 03, 2016 3:47 pm
I did toy with using the 0.96″ OLED, and I may take a crack at that some time. In my quest to find the cheapest suitable screen with a touch panel, I came across these -> http://www.ebay.co.uk/itm/282274565558? … EBIDX%3AIT
They should work with the UTFT libs, so I ordered one. The OLED comes in several different flavours and is slightly more expensive, and obviously has not touch panel. I imagine that the majority of these cheap TFT displays with touch panels are “recovered stock”, similar to the large number of “Nokia 5110” monochrome displays. I think the Nokia ones still win out then it comes to low power consumption, but its a close run contest since for a lot of these displays, the majority of the power is used in the backlight.
I wonder if it would be worth adding supported displays to the Wiki, what does everyone think?
ThunderOwl Sat Dec 03, 2016 5:06 pm
ahull wrote:… quest to find the cheapest suitable screen with a touch panel, I came across these…