DSO203 GCC APP - Community Edition (2.51+SmTech1.8+Fixes)

Having a new Quad with 2.72/8M I am wondering what to do about the community software.



Just a thought - would there be any way to reformat the 8M as a 2M and reduce the cluster size so it would not have the software issues? Or, could a small partition be copied onto the device with something like Partition Master?



-Cory

I don’t think one would be able to make the 8M device behave like a 2M one. It’s not about partitioning, it’s more about the fundamental hardware block size used when the device erases and writes new data. That means the routines that do writing have larger buffers.



I think the most fruitful approach is to use the SYS 1.60 which supports the 8M device and then adjust the apps to be compatible with this. The calls made to the SYS are pretty much the same with the main differences being in the memory allocation, so it should be relatively straightforward. This is also evidenced by the gabonator app which largely works with 1.6 except for storing data. I did start to look a this as a family member has a 8M model whereas mine is 2M, but have not had much time to pursue this further recently.

The 2.72 / 8M issues seem to be fixed, please see the last upload in this thread: <LINK_TEXT text=“http://www.seeedstudio.com/forum/viewto … 187#p19187”>http://www.seeedstudio.com/forum/viewtopic.php?f=26&t=5128&p=19187#p19187</LINK_TEXT>

New update:



Tentative support for 8MB devices. Integrated bobtidey’s mods. Note that this has not been tested

on other than 2MB units at this time.

Added persistence and map modes, BMP load, and 30db extra gain to all FFT functions.

Updated spectrograph and XY modes + many minor improvements and bug fixes. See

changelog in README.TXT for complete list and how to use these. Program still fits

within 2 slots.







Persistence mode of RF eye pattern

in RAW data mode





Persistence mode of a video signal

in NORMAL data mode





30db additional FFT gain with

auto scaling





Voice print of person speaking





MAP mode of video frame





XY display of stationary pattern

in persistence mode

I tried this latest on my 8MB 2.72 with 1.6. It seems to work though I don’t understand how to operate it. After bringing up the meters on the right, are you able to change what is displayed as in the original app?



Also, I assumed, maybe incorrectly, that app1, app2, app3 refers to the slot residency? I tried that and it looks like they boot in the correct slot but I get a blank screen.



Anyway, I applaud what everyone has coded and love the little device. I wanted something for on my desk as sometimes the DDS freq generators and other equipment I have won’t start and I can’t figure out what is going on without a scope. After purchasing this little unit, I also bought a larger inexpensive DSO as well so it was ‘scope week’ at my house. Been using an oldy but goody 300mhz tek 2465 for years which had a ton of functions with cursors, etc, but no storage.





So please keep up the good work. I would love to be able to boot wildcat from 2 or 3 keeping the original in 1. I have gabonator’s code in 4 which I like as well.





Jerry.

after installing the wildcat version and reinstalling the original factory app, I can no longer install the wildcat. It installs ok with .rdy message, but boots to a blank screen.



Any ideas?

App1, app2, etc do refer to slot residency. However, most apps, including mine and the originals occupy 2 slots.

So if, for example you have the original in slot 1, adding another version in slot 2 wipes off the last half of the one

installed in slot 1. Likewise, installing in slot 3 wipes off whatever program is in slot 4. The gabonator app installed

in slot 4 I believe adds the rest of the code in some undocumented part of the ROM. This needs to be kept in mind

when adding programs so they don’t overlap and destroy each other and kind of limits it to only 2 programs unless

2 of them can fit in only 1 slot each.

There has been some effort to rewrite the code to all these apps so only the first part of each of the programs fit in 1 slot

only, the rest to the aforementioned undocumented area. However this was only compatible with the older 2M devices.



The meters in my version can be changed like the original app, but the controls to do so may be different. While the

first “page” showing displays for both ChA and ChB can’t be changed, the 4 remaining pages, each set up for one

of the channels can be changed to any relevant meter with source from any channel, but only until the page is changed.

Change pages with long press left toggle center. To change the meter items or source, long press right toggle center,

this will change the focus (blinking) to the meters. Use the right toggle to change between meters and the left toggle to

change the meter item itself (Vdc, Frq, etc). With a meter highlighted (blinking) short press button 4 to cycle between the

different channels as the source (Item will change to the channel’s color). Note that voltage meters are not available for the

digital channels. Keep in mind what while you can cycle between small, large and no meters without changing the selected

items, changing pages will return the pages to their default settings.



Custom meter settings can be saved by saving the entire configuration to a different config file, but only 1 page can be

saved (the one showing), since changing between pages restores defaults. When recalled, the custom settings will be

restored. My version allows 9 additional config files to be saved/restored. Hold button 3 down to access config save,

then if desired, change file number with left toggle. Config #0 is the boot up file. In order for all this to work, 9 extra

config files MUST already be on the device’s flash drive as the program will only save them if a file already exists.

This was done for compatibility with older devices which had systems that corrupted files. Copying these files and

putting them early in the file allocation table prevented the corruption. The 8Mb devices I believe fixed the corruption

problem, as did the Alterbios add-on for the 2Mb devices. Simply copy 9 instances of the xxxxx.WPT file with a

Windows machine, then rename them CONF001.CFG to CONF009.CFG.



For further info on operation, check out the changelogs and other info in the readme.txt enclosed in the archive.

A brief description on how to use the different functions is included. Holding down button 1 on the device will show

a chart of button functions. I’ve started to write a comprehensive “user’s manual” for my version. When I can find the

time to finish it, I will post it, along with some likely further updates (finishing up an additional log amplitude screen

option for the FFT function). The program is getting a bit complex, hopefully this will be of help.

wildcat, thanks, all that above really helps.



Why do you think it won’t install? If I use app1 and have nothing in #2, I still get a blank screen when I load your program. It worked the first time. It is almost like it is stuck in standby mode???



Now that I know how to change the meter pages I would like to install it in slot 1.



Thanks.

What happens when you boot up? Do you see the startup screen with hardware,

FPGA, system version, program version and so on? Or does it just go directly to a blank screen?



If it shows the startup screen, there will be a message showing whether the

program loaded a config file: if it found a file it will read “Reload parameter from disk”.

If no file is found you will see “Parameters not found” or something like that.

If a config file is loaded and it freezes up after that, you should delete any

XXXXX.WPT on the flash drive; you will need to boot up to a running program

and connect to a computer via USB to do this. It’s possible a corrupt config

file may be causing this. Earlier versions used a WPT extension for their

config files, but I think the later (with 8Mb devices) versions use a different extension.



If it goes directly to a blank screen something likely got corrupted.



Can you load any other programs into slot 1 (or any other) and have them work?

I take it you get the .rdy file after copying the hex file when you instal the program

with the bootloader? If other programs load/run OK and there is no WPT config file

on the device maybe the HEX file got corrupted somehow?

I deleted the .wpt file, reloaded, and off it went. Thanks again.

How do you save screenshots and buffer with wildcat. I have 3.2 installed and accourding to the readme it appears it has the capability but my searches have turned up nothing.

The same way you do with the original apps. Didn’t write specific info as most were familiar with them already.



Select file menu: shift right toggle to the right until file menu appears in the notification area. You can just hold

the right toggle to the right until the selection stops the end with the file menu. The default from boot up will be

to “LOAD FILE000.CFG” This is to make it easy to select different config files. Button 4 will cycle between LOAD,

FILE000, and .CFG. With LOAD blinking, use left toggle to change it to SAVE. Select different files with

FILExxx. Cycle through the file types with left toggle, then save by center pressing left toggle.



CFG are configuration files.



BMP are screenshots of anything displayed on the screen, including the FFT, MAP and spectrograph,

etc. (you can use the load function to view these on the device or view them via USB on a computer),



DAT files save the screen trace buffer from all 4 channels (you view these by first loading them back into the

device with the LOAD function. This then makes them available to recall and display from channel D via

“REC_A, REC_B etc…” selecting the saved ch A, B, C, or D trace).



BUF files, unlike the DAT files which save only what is shown on screen, save the entire buffer. After loading

these back up, the device will be in PAUSE with the saved trace displaying. You can use the XPOS control to scroll

through the buffer, if it was saved with the full buffer. Pressing RUN will return the device to it’s previous state.



CSV files are a comma delimited readout of the entire buffer for all 4 channels, used to export the waveform

data to external programs that can then reconstruct the waveforms. These cannot be loaded back into the device.



Note that saving more than a few files on the early (2MB) devices will quickly corrupt them unless the Alterbios

add-on is installed. This is a problem with the early operating systems used on these devices and not the program.

Alterbios patches the OS so the files are saved correctly.

Hi Wildcat,



Awesome firmware! Unfortunately with version 3.2 it seems to limit voltage to 30V. Is this a bug or by design? I had version 2 installed and I don’t think it had that limitation, though I only had it installed briefly so I might not have noticed. I noticed it first after calibrating. My calibration source was 53V but the scope showed 30V as Vmax and using the markings on screen. I slid the pot down on my volt source and as it went below 30V the screen updated to show under 30V. I also looked at a sine wave peaking over 30V and it clips flat at 30V.



If it’s a bug and I downgrade to v3 to try to fix it, will it lose my calibration settings?



I’m running hardware v2.7 (2mb ram), sys 1.52, FPGA 2.61.

There is nothing in the program that can do this. If you are getting full screen voltage on the lower ranges then it’s

likely a hardware problem. Some of the later devices have clamping diodes at the inputs that clamp right around

30 volts. These have been reported to be found in hardware v2.72 Perhaps your unit has these?

There is no resistor ahead of these clamps to limit the current. This was a rather bad design to say the least, and it’s

recommended to remove them, since applying any more than 30 volts directly to the input could likely result in a shorted channel.



You can check if your unit has them by connecting a power source of say 50 to 60 volts through a limiting resistor in series

(10K ohm or larger) with a multimeter at the input (scope side of the resistor). If the voltage limits to 30 volts or so at the

input, this is your problem.



There is more info on this on the wiki:

<LINK_TEXT text=“http://www.seeedstudio.com/wiki/DSO_Qua … g_Firmware”>http://www.seeedstudio.com/wiki/DSO_Quad:Upgrading_Firmware</LINK_TEXT>



Also search the Quad forum for: Channel A short (bad) (solved)

Thanks Wildcat. You’re right that it’s limited to +30V but can see -43V. However, I didn’t have the +30V limit with the stock firmware. Before I installed Wildcat I was looking at +83Vmax sine waves that showed no clipping or distortion. Also, when I did the calibration with your firmware and it asked for 50-60V, I gave it 53V and the calibration screen read near 53. So it seems very unlikely that it’s a hardware problem.



I went back to Wildcat v2 and it had the same problem:

[attachment=3]IMAG001.png[/attachment]

but I found that when I slid YPOS down, Vmax started showing larger values:

[attachment=2]IMAG002.png[/attachment]

and when I slide it down far enough, I see +44.8V as expected, but I have to slide it almost to the bottom of the screen:

[attachment=0]IMAG003.png[/attachment]

I swapped the battery poles and it reads -43.6V but I don’t have to slide YPOS way up, I can see -43.6V even with the line at the bottom of the screen:

[attachment=1]IMAG000.png[/attachment]

In fact, I can slide YPOS down much father and it keeps reading -43.6Vmin for awhile but when it gets low enough (maybe 3/4 down the screen?) it starts scaling down and showing lower voltage for Vmin.

Does it limit at the top of the screen for any of the other lower ranges? Is there any offset to the trace with the probe

grounded?



The reason it was able to show 53 volts during calibration and not on the screen is because during calibration, the “0”

reference level is moved to the bottom of the screen.



If the limiting at the top of the screen does not happen with the other ranges, it would indicate that the 10 volt range

section in the scope’s preamp is causing this. If this is the case, the reason other programs may not show this is because

my program operates the ADC at between step 54 to step 254 (out of a total of 256 steps), while the original programs

operated it from step 0 to step 199, leaving the remaining (200 to 255) unused. So if clipping is occurring, like it seems

like it is around step 212 in your first screenshot, it’s because the full range of the ADC is being restricted.

The reason I shifted the operating point up 54 is because the first steps are somewhat non-linear, causing compression

of the waveform and inaccurate meter readings. This is also the reason you can go “below” the bottom of the screen, since

the bottom now sits at step 54.



Basically what it looks like is happening is simply that instead of clipping just above the top of the screen like it should,

something in the preamp is clipping a bit lower so it’s visible on screen. The original programs allowed 55 or so steps at

the top, and none at the bottom. My versions shift the operating point 54 up so it allows no room above the top, and

54 below the bottom. If the hardware is operating properly, it should make no difference, (except for the non-linearity near

the bottom).



I would check the calibration just to make sure something is not way off. You can save the WPT file as a backup from

the device onto a computer. Then perhaps boot the device with no config file in order to load the defaults. The original

WPT file could then be copied back to the device, restoring original calibration but the device’s drive should have any

file present deleted with a Windows machine before copying the config file back to avoid file corruption problems.



However, you will probably find the problem is with the preamp clipping, not allowing the full range of the ADC to be used.

You may also find that some of the other ranges may clip below the top also I just finished a new update, now just checking

out the added functions to make sure there is no problems and will be posting it shortly. I will see if I can include a control

(perhaps in the calibration process) to change the operating point of the ADC. With this, you could “shift the screen up” so

the clipping is above the top and not visible. Calibration may need to be redone.



Edit: Attached are executables recompiled with an offset of 25, placing the “window” in the middle of the ADC. It does not

appear to affect calibration. You can try these to see if it fixes the problem. Note however that with this, distortion

(compression) at the bottom of the screen is starting to be visible. (EG: if you have say a sine wave exactly centered in

the middle of the screen, as the level is raised, it will reach the top well before reaching the bottom) This is well known

problem inherent in the hardware and was quite noticeable with the original firmware.



Also note that this is a compilation of a new version with added functions, specifically, added:

A log amplitude scaling option for the FFT: When selecting gain in the notification area, all the way left will be the LOG

option, as well as the auto and manual settings (now go to +42db). Also updated the internal generator to produce high

quality waveforms (using up to 720 samples/period, depending on frequency) and added continuous frequency control

for the generator (Press left toggle center button while on the freq range menu the wave out, a frequency display

will show in the notification area, shift frequency up/down with left toggle) Also added a few other things and fixed a

couple of minor bugs.

New update. Also included is a “user guide”. See “UserGuide.rtf” included with source code.

Note that this is a bit of a work in progress, but is mostly complete. I’m posting what I have so far

in hopes it will be of help to someone. For the time being it’s in RTF format (disable word wrap

so text formats correctly).



CHANGELOG TO VERSION W3.3:



-Added LOG amplitude scaling option to FFT display. Use left toggle in Ch D menu in notification

area: LOG>AUTO>0db>+6db>…>+42db



-Changed FFT buffers to 32 bit. Allows proper dynamic range so LOG display works correctly, gain is

increased to +42db (+48 with log scale). Changed windowing from Hamming to Hann for better

compatibility with the increased dynamic range.



-Updated internal generator output to produce high quality waveforms using up to 720 sample points

(gradually reducing at the highest frequencies to remain within DAC capabilities: 5khz range

samples @ 360, 10khz @ 180 and 20khz @ 72)



-Added continuously variable frequency control for generator output: While in OUTPUT menu and freq

range item blinking, press left toggle center button to access frequency display in notification

area. Output frequency can be finely adjusted up or down with left toggle. Eg: if set to 100hz range,

frequency can be shifted from 50Hz to 200hz in steps of approx +/- 0.7% (0.7Hz). Note that at the

higher frequency ranges, highest frequency available will be limited and range step size increased

due to internal DAC sampling rate and clock divider limitations.



-Added frequency scaling and seconds ticks to spectrograph display.



-Program will now only save BMP screenshots in 64K colors if spectrograph or map mode is

displayed, otherwise will save in 16 color mode so files are not unnecessarily large. Either

type will load for viewing.



-Changed voltmeters from reading 0.XXX KV to XXX V when reading over 100 volts on X10 ranges



-Added ability to shift the ADC operating “window” to compensate for hardware issues. See

“README.TXT” latest changelog for more info on this.



-Fixed %Duty meter item (was not working at all in V3.2)



-Fixed a bug where, if not triggered in normal modes, certain items on the display would not

be updated or would show incorrectly when changing settings until the device triggered again.



-More code compacting to keep program within 2 program slots + misc minor bug fixes.





Frequency spectrum in log mode of 1Khz wave

sampled at 720 points from internal generator.





Frequency scale for spectrograph



EDIT:

As per Jerson’s suggestion I updated the archive I just posted with added beeps for the

push button functions.



In addition to the first short beep when you first push a button, the instant after holding the

button down that it enters the “long press” mode a somewhat longer beep is heard. Releasing

the button anytime after the beginning of this second beep, but before a third short beep

indicating the “hold” mode is engaging, assures that you will enter the long press mode.

I find that identifying button hold times this way greatly improves operation.



Thanks to Jerson for the suggestion…

Hello Wildcat



Just a small suggestion. Can you implement a beep when a button reaches Long press and another beep when it reaches HOLD? That will make it easy to release when you intend to long press and not hold.



Very nice work



Regards

Jerson

Thank you.



I like the idea of a beep when reaching long press. I find myself often not holding down long enough and

wind up with the wrong function. This way you would just wait for the beep, I like it.

Not sure how useful a beep when reaching hold would be though, because by then the hold function would pop up

anyways, it doesn’t wait until you release the button, the instant it times out the function engages.

The way I implement this in my embedded systems code is like this. I do not know how easy it will be to adapt it to the DSO

By this way, suppose the user wants to LONG press the button, s/he waits till the second beep and lets go. Since the timer is < level3 time, FuncLevel2 executes. Function only executes on releasing the button.

</s> On Keypress start background seconds timer with value 0 while (Keypressed) { if (timer == Level1) Beep(); if (timer == Level2) Beep(); if (timer == Level3) Beep(); } if (timer < Level2) FuncLevel1(); // execute function at level1 depth else { if (timer < Level3) FuncLevel2(); // function at level2 depth else FuncLevel3(); // function at level3 depth } <e>