Spark Logic

$10 O-Scope revisited

ILI9163C DT018ATFT · FPC-45 Pinout
ILI9341 MSP3223 · 14-contact header Pinout

Over the last few days I’ve been playing with Ray’s STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog Oscilloscope idea.

Image

Some preliminary results are available here..

https://github.com/pingumacpenguin/STM3 … ontruction

My take on the Scope Sketch is here..

https://github.com/pingumacpenguin/STM32-O-Scope

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

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).

But a little bit work …

Wed Nov 16, 2016 11:08 am

Just saw it on the code :)
attachInterrupt(but15, isr_15, RISING);  // sign (1=increase,0=decreas)

Thu Nov 17, 2016 4:51 am

Hi rexnanet !

as You suggested, I have changed the encoder.
Is working very good. No problems with bounce.Thanks !

here the code:

Thu Nov 17, 2016 9:13 am

mausi_mick wrote:Hi rexnanet !

as You suggested, I have changed the encoder.
Is working very good. No problems with bounce.Thanks !

Fri Nov 18, 2016 10:18 am

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

Fri Nov 18, 2016 11:10 am

Hi,
Ok, I see now. With the EC11EC11Sensors, encoders and cameras…er_0 B12 Encoder_1 B13 Encoder_1 B6 TEST_WAVE The program runs stable, the encoders ( EC11 , KY-040) have no problems with bouncing. Now I have to build the input amplifiers (with…View in hardware catalog -E… types you can use only one interrupt.
Maybe this was the main idea for them to create this type of switching… hummm :)

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 “STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -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

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.

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;

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 ILI9163CILI9163CDisplays, touch panels and LEDs…ered 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 scratch…View in hardware catalog based, but the original code calls for a ILI9341ILI9341Displays, touch panels and LEDs… shows on my screen. I have used and programmed a few different types of SPI screens( ili9341 , st7735) using Python very successfully and these parallel screens have many of the…View in hardware catalog 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

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.

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.

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?

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.

Fri Dec 02, 2016 2:28 pm

+1 :D

Fri Dec 02, 2016 2:56 pm

zoomx wrote:
Why not the 0.96″ OLED? :lol:

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 5110Nokia 5110Displays, touch panels and LEDs…FT 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 p…View in hardware catalog ” 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? :?:

Sat Dec 03, 2016 5:06 pm

ahull wrote:… quest to find the cheapest suitable screen with a touch panel, I came across these…

Post a reply

Optional · up to 10 MiB