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
zmemw16 Sun Nov 13, 2016 8:54 pm
so pi is a no no then .
srp
mausi_mick Mon Nov 14, 2016 7:53 am
Hi,
I tested the touchscreen with the modified QuickDraw-Program in the URTouch-lib.
You can see, that the circa 10% of the visible Display at the top are not usable for touch-Function,
the same on the bottom and circa 5% on the right side.
(2.62 KiB) Downloaded 179 times
ThunderOwl Mon Nov 14, 2016 8:01 am
So, more or less finalized code will contain both encoder/button and touch control? Or, keeping both maybe cause some slowdowns, etc?
stevestrong Mon Nov 14, 2016 8:13 am
To use the whole screen for touch, just search the forum for “touch calibration”.
mausi_mick Mon Nov 14, 2016 8:40 am
I have it,
I will send it in a few minutes
mausi_mick
mausi_mick Mon Nov 14, 2016 8:55 am
Hi,
here the modified Touch-Calibration Program from the URTouch lib
with modifications for use with Adafruits-TFT-libs (ILI9341 SPI).
(14.18 KiB) Downloaded 222 times
mausi_mick Mon Nov 14, 2016 9:18 am
Hi ThunderOwl,
my test-program contains at this time both functions:
2 rotary- encoders and Touch-function (only 2 touch-fields realized for sign and timebase).
But if I test Touch (“timebase”), I switch the encoder0 in a other position , e.g yPosition or Offset.
But I think with the encoders it is more practicable and I would prefer it.
Perhaps with some “normal” switches (over interrupts), even if it is a little bit more expensive.
But I think all is open, perhaps I try Touch with a second spi display only for the parameters.
ThunderOwl Mon Nov 14, 2016 9:29 am
Thank You, mausi_mick. I would much appreciate, if You consider to share full code here, and I am fully aware it would be not finished, not to ask support questions about. I enjoy process itself And, on that way, looking into code, I learn thing or two. As I posted some pages back, I got basic setup working, I can test any new code for this osc device.
rexnanet Mon Nov 14, 2016 9:40 am
The framerate seems to go down a lot with the add of the touchscreen functions…
Also it’s a bit off showing 9fps and it’s visible that the wave is being refreshed at around 1fps.
But this is due to the way it’s being calculated (my fault? )…and probably something was added between the time sampling.
Seems that the encoder is a better approach in terms of speed…
mausi_mick Mon Nov 14, 2016 10:06 am
Hi ThunderOwl,
here is my latest code from yesterday.
On the screen top left are two numbers visible (for test), they changed their value, if you touch the screen. It’s for test the coordinates where you have pressed.
(42.22 KiB) Downloaded 202 times
ThunderOwl Mon Nov 14, 2016 10:11 am
Excellent! Liels Paldies! And, that is “Big Thanks” in latvian. I will post impressions as soon as I got time to test that (tomorrow, most likely).
ahull Mon Nov 14, 2016 12:31 pm
rexnanet wrote:The framerate seems to go down a lot with the add of the touchscreen functions…
Also it’s a bit off showing 9fps and it’s visible that the wave is being refreshed at around 1fps.
But this is due to the way it’s being calculated (my fault? )…and probably something was added between the time sampling.
Seems that the encoder is a better approach in terms of speed…
mausi_mick Mon Nov 14, 2016 2:45 pm
hi,
I think the price difference between encoders and pots is not big. You can get encoders for 1 or 2 US$.
But you have more flexibility.
E.g. I need encoder 0 for the functions (timeBase, Positions, trigger …) and the second encoder 1 for the values of the function.
And I am free : I take perhaps 12 switch-positions for the timebase, 20 for yPos … and I can change it by SW.
And the reaction is – because of the interrupts – quick.
mausi_mick
rexnanet Mon Nov 14, 2016 3:08 pm
The encoder has a push button, so there’s no need for 2 encoders.
With the push button you can switch between the 2 (or more) functions.
For example:
1- rotate to choose function (timescale, amplitude, trigger, etc)
2- press to select function.
3- rotate to change value.
4- press to return to main “menu”.
ahull Mon Nov 14, 2016 4:15 pm
mausi_mick wrote:…
I think the price difference between encoders and pots is not big. You can get encoders for 1 or 2 US$.
…
mausi_mick
ahull Mon Nov 14, 2016 4:22 pm
rexnanet wrote:The encoder has a push button, so there’s no need for 2 encoders.
With the push button you can switch between the 2 (or more) functions.
For example:
1- rotate to choose function (timescale, amplitude, trigger, etc)
2- press to select function.
3- rotate to change value.
4- press to return to main “menu”.
it was a good idea from You to use only one rotary encoder (and the switch-button on it).
But a little bit work …
Now the test-program is usable.
I the last line of the screen their are now tree fields with numbers for
– the last set function (1…7)
– for the last set parameter ( different depending on function)
– for the position of the encoder (yellow textcColor)
If the switch of the encoder is in Position 1 (change function), the field is grey and the text Color Black.
If the switch is in Position 2 (change parameters) , the field is magenta and the text Color Black.
If the switch is In Position 0 , the two fields are normal in green/black an the Encoder-Position
has no influence.
ThunderOwl Wed Nov 16, 2016 9:54 am
mausi_mick wrote:
it was a good idea from You to use only one rotary encoder (and the switch-button on it).
Now the test-program is usable.
…