@ MagIO2: I am by no means a video driver guru, but I really like the idea. I think it would be very easy if you wanted the display rotated 90 degrees, so the traces were vertical instead of horizontal, and only moderately difficult if you wanted to keep it horizontal. The idea of keeping text only on the top or bottom is a great one.
Of course, you'd probably need to make sure the driver worked for VGA and NTSC and PAL, otherwise 1/2 the code would need the large video buffer, and the other mode wouldn't. I would be willing to work on the VGA portion, but I have no way to look at composite (though I could probably view S-Video). ANd again, I'm probably not the best person to write a video driver ;-)
I did a dual "EKG" waveform plotter for XGA a long time ago that did this type of thing on a vga monitor...
The traces were vertical instead of horizontal...
Personally, I'm thinking of using external SRAM (like in FlashPoint RamPage) to do a better job for things like this...
Where are the video driver gurus? Do you believe it is possible?
Good idea and doable, one could modify the TV and VGA drivers to only work normally on the top and bottom lines, while on the lines in between check the captured arrays at the present X position matches the desired Y coordinates desired.
But not actually the direction I would like to take this project. I hope PMDO becomes viewed more as a reference design//training/learning tool to wrap other projects in.
Now that is relatively stable I going to expand function_generator.spin to show how simpler test code can be integrated to allow users to test and demonstrate their ideas.
Next I want to add commands that modify parameters in function_generator.spin to enable things like "faster,more and wilder"!
Seems easy enough, just calculate the slope between the samples higher and equal to the next scan line and the points below the next scan line to determine the point to plot on the next scan line and only store the x values to draw, for the grid this is even easier just output the grid color at a consistent interval, or continuous on lines that have the y grid lines. Text is very simple for the data displays (thanks to parallax giving us a font in ROM). I would think that this could be done in 2 Cogs + 1 long HUB ram (1 cog displays a scan line while the other plots out the next scan line, then they switch function), assuming that the x length is less than 508 (the x values will take 1 byte per value, so 508 is 127 longs).
Also if the only concern is reducing hub ram usage, use the space in hub ram that is used by the PASM code for the video driver and ADC to store data, as this PASM code should only need to be loaded one time (do not forget to put a sufficient delay near the beginning of the spin after the cognew statements for loading the PASM)
So you are using DIP propeller, that's good news.
Many people will be interested in the displays that you can produce.
Have you tried the dump screen to SD card yet?
Also if the only concern is reducing hub ram usage, use the space in hub ram that is used by the PASM code for the video driver and ADC to store data, as this PASM code should only need to be loaded one time (do not forget to put a sufficient delay near the beginning of the spin after the cognew statements for loading the PASM)
What about using Dr_Acula's cogjets to get more hub-ram ?
There's a lot of pasm-code that could be load from sd-card.
That would have exactly the same effect as what I suggested.
It's slightly different because only one 2KB buffer is necessary for multiple PASM COGS; it does require more infrastructure overhead. BTW, if you preinitialize a mailbox value to non-zero before starting a cog, you could wait until the cog writes zero to it before continuing to eliminate any arbitrary waiting.
Change display of trace values to voltage display use the square wave generator to calibrate your ADC's
I just did a rough calibration by dividing the highest value shown by 3.33 and stuffed that into the code.
Both function generators accept input values in Hz and change immediately. You end up having to hit their toggle switches twice to turn them off.
Discovered that my hearing is going. I think the sine wave goes from about 150Hz to 14K Hz but I can't hear any thing above 12K. Normally I am testing with a video camera module. The audio channel is channel A with capacitor coupling and the microphone will pick up the sine wave at the higher frequency, but not me.
Channel B is video direct coupled with 100 ohms to ground.
Most future work should be documentation an usage examples.
You see a new number just above the clock, that's the percentage of cpu cycles still available for use.
I get my sd-socket and there it is, my first captured bmp on SD via propeller !
(@Perry: in the newest version there's missing tv.spin and vga.spin)
Nice work, sorry about the TV and VGA drivers, must have had the propeller library still on the search path when I made the archive. Use the ones from the previous upload or the standard parallax drivers.
I am presently commenting out parts of graphics.spin to give enough memory for larger function generators.
#3 is my favorite...I think that is the most critical feature for this to be useful, at least to me. To that end, I volunteer to add it to EasyADC, just let me know what features you want.
As to #1, I'd rather embed those values in the EEPROM. Use an initial value that is reasonable in the code, then you could save changes back into the EEPROM at the address of the variable, so on next reboot the values are kept. There is an object floating around the OBEX or the forum for doing just that, but I don't remember the name, sorry!
What did you think of the idea of having two ranges per channel, just by having 2 different resistors on the feedback pin and sense pin? Just swap the pin numbers in the counter setup (when calling EasyADC's start method), and you get a different scope range.
What Op Amp would be best for a sample and hold at the higher speeds? I am no good in the analog world, and would like to get this DSO working at higher sampling rates (then I can through away my hunk of junk 10MHz analog scope, that is only reliable to 1MHz)
Very interesting A+. I am just a beginner with the prop. Do you have a basic schematic? I am old school and read schematics easier then programming for sure. I work more with robotics. Good Job.
Comments
Where are the video driver gurus? Do you believe it is possible?
Of course, you'd probably need to make sure the driver worked for VGA and NTSC and PAL, otherwise 1/2 the code would need the large video buffer, and the other mode wouldn't. I would be willing to work on the VGA portion, but I have no way to look at composite (though I could probably view S-Video). ANd again, I'm probably not the best person to write a video driver ;-)
Jonathan
Basically you'd need to build a scan line buffer based VGA renderer, and hope you can render lines fast enough from the acquired samples.
Using sparse rendering - that is not drawing an interpolated line between data samples - would make it much more likely to be feasible.
The traces were vertical instead of horizontal...
Personally, I'm thinking of using external SRAM (like in FlashPoint RamPage) to do a better job for things like this...
Good idea and doable, one could modify the TV and VGA drivers to only work normally on the top and bottom lines, while on the lines in between check the captured arrays at the present X position matches the desired Y coordinates desired.
But not actually the direction I would like to take this project. I hope PMDO becomes viewed more as a reference design//training/learning tool to wrap other projects in.
Now that is relatively stable I going to expand function_generator.spin to show how simpler test code can be integrated to allow users to test and demonstrate their ideas.
Next I want to add commands that modify parameters in function_generator.spin to enable things like "faster,more and wilder"!
ok i checked out vga and after 2 hours, it works.
AAARRRGGGHHH,
config.spin:
InPinA = 18 ' A/D converter A
opinA = 17
these are my vga-sync-pins !!!!!
(and don't forget to change basepin from 12 to 16)
Sorry
what would be the recommended A/D settings for VGA users?
when using sd-card on P0-3, P4-P11 are free in many cases,
so maybe:
InPinA = 7 (DIPin8)
opinA = 8 (DIPin13)
InPinB = 5 (DIPin6)
OpinB = 10 (DIPin15)
for DIP-Version of Propeller
So you are using DIP propeller, that's good news.
Many people will be interested in the displays that you can produce.
Have you tried the dump screen to SD card yet?
I ordered some and hope to get them next week.
What about using Dr_Acula's cogjets to get more hub-ram ?
There's a lot of pasm-code that could be load from sd-card.
Change display of trace values to voltage display use the square wave generator to calibrate your ADC's
I just did a rough calibration by dividing the highest value shown by 3.33 and stuffed that into the code.
Both function generators accept input values in Hz and change immediately. You end up having to hit their toggle switches twice to turn them off.
Discovered that my hearing is going. I think the sine wave goes from about 150Hz to 14K Hz but I can't hear any thing above 12K. Normally I am testing with a video camera module. The audio channel is channel A with capacitor coupling and the microphone will pick up the sine wave at the higher frequency, but not me.
Channel B is video direct coupled with 100 ohms to ground.
Most future work should be documentation an usage examples.
You see a new number just above the clock, that's the percentage of cpu cycles still available for use.
I get my sd-socket and there it is, my first captured bmp on SD via propeller !
(@Perry: in the newest version there's missing tv.spin and vga.spin)
Nice work, sorry about the TV and VGA drivers, must have had the propeller library still on the search path when I made the archive. Use the ones from the previous upload or the standard parallax drivers.
I am presently commenting out parts of graphics.spin to give enough memory for larger function generators.
Things to add to the program.
1 .Could read parameters from SD card...I/O ports and calibration for A/D converters
2. A/D calibration should have 2 values so it could accommodate the use of 2 extra input resistors that allow inputs below zero volts,
3 There needs to be some kind of triggering mechanism to narrow in on parts of waveforms
4 Make a function generator that replays the captured waveform.
5 should study the possibility's of cog overlays to dynamically load function generators and/or display views.
Any one have any ideas to add to this list?
As to #1, I'd rather embed those values in the EEPROM. Use an initial value that is reasonable in the code, then you could save changes back into the EEPROM at the address of the variable, so on next reboot the values are kept. There is an object floating around the OBEX or the forum for doing just that, but I don't remember the name, sorry!
What did you think of the idea of having two ranges per channel, just by having 2 different resistors on the feedback pin and sense pin? Just swap the pin numbers in the counter setup (when calling EasyADC's start method), and you get a different scope range.
Jonathan
Jonathan
Sure , I have made some changes .... some to do with Float formating
Here are my latest bst archives.
Perry