Alternative dso firmware [Application Software Design Entry]

Moderators: lily.li, violet, jeremy882, crail.lyu969

c.wilt
Pre-kindergarten
Pre-kindergarten
Posts: 27
Joined: Thu Jul 19, 2012 9:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Alternative dso firmware [Application Software Design En

Post by c.wilt » Fri Dec 28, 2012 2:52 pm

Tonight I added bluetooth to my DSO quad but I used a bluetooth mate gold which is based on roving networks RN-41. Loaded the example android app and everything is working. Would like more info on the serial commands returns if possible.

gabonator1
Kindergarten
Kindergarten
Posts: 85
Joined: Thu Sep 15, 2011 7:54 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: dso quad
Location: Sered, Slovakia

Re: Alternative dso firmware [Application Software Design En

Post by gabonator1 » Fri Dec 28, 2012 7:07 pm

c.wilt: Wow, great work!

Regarding jpa's pawn & my firmware installed on the same device - this is not possible, initial idea was having multiple applications installed on DSO flash and by holding some button when turning on, you could choose which one you would like to boot. My firmware is so huge, that it occupies whole flash, even some part of the extended ROM :) So when you install my firmware, you should not install any other application to the slot 2, 3, or 4, because it would overwrite my firmwares code.

jpa: can you tell us some more details about the extra RAM ? I am very curious :) Anyway, I was looking on the ST webpage looking for pin compatible processor with bigger memory:
http://www.st.com/internet/mcu/subclass/1169.jsp
the package is LQFP 100, the microcontroller inside dso quad is STM32F103VC and the STM32F103VG has 1MB flash and 96 kB RAM :)
And also the very small EEPROM should be replaced with SD card, because 2MB is horribly small disk space in era of terabyte disk drives :)
If I had more memory and reliable disk drive (the FAT implementation in DSO is buggy) I would like to put some javascript or lua interpreter into DSO, this would open new world for user applications. Your PAWN implementation is nice, but the main disadvantage is that you need to compile your code at PC side.
I imagine, that I am editing user application file from the DSO drive written in javascript in any editor and after saving this file, the DSO would recognize that something was changed, its firmware would reload the application and start executing it.

And the bluetooth commands:
https://github.com/gabonator/DS203/blob ... Sdk.h#L480
Inside Sdk.h there is a function getTokens which returns all available commands. Some commands can be used with different set of parameters, for example:
GEN::Output(1024); - sets the WAVE OUT DA converter value to 1024
GEN::Output(2.2); - sets the WAVE OUT voltage to 2.2V (important to calibrate the DAC first)
Print("Hello");
Print(20, 20, "Hello");

for getting CH1 resolution:
CH1::Resolution;
or
ENUM::Ampl(CH1::Resolution);

and for changing:
CH1::Resolution=4;
After this change you should setup the adc and trigger by calling "ALL::Setup();" and redraw the screen with "Update();"

Every command needs to be ended with ; and enter (\n)

c.wilt
Pre-kindergarten
Pre-kindergarten
Posts: 27
Joined: Thu Jul 19, 2012 9:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Alternative dso firmware [Application Software Design En

Post by c.wilt » Fri Dec 28, 2012 11:32 pm

gabonator1 wrote:c.wilt: Wow, great work!
Its not very pretty yet, but it does work.
gabonator1 wrote:Regarding jpa's pawn & my firmware installed on the same device - this is not possible, initial idea was having multiple applications installed on DSO flash and by holding some button when turning on, you could choose which one you would like to boot. My firmware is so huge, that it occupies whole flash, even some part of the extended ROM :) So when you install my firmware, you should not install any other application to the slot 2, 3, or 4, because it would overwrite my firmwares code.
I assumed as much. I would load your firmware and made sure it worked. Next I would load jpa's pawn. Your firmware would not boot but I could hold button 4 and boot to pawn.
gabonator1 wrote: Your PAWN implementation is nice, but the main disadvantage is that you need to compile your code at PC side.
I imagine, that I am editing user application file from the DSO drive written in javascript in any editor and after saving this file, the DSO would recognize that something was changed, its firmware would reload the application and start executing it.
If your going to edit your app on on a PC anyway, you might as well have it compile the code and make it faster.
gabonator1 wrote:And the bluetooth commands:
https://github.com/gabonator/DS203/blob ... Sdk.h#L480
Inside Sdk.h there is a function getTokens which returns all available commands. Some commands can be used with different set of parameters, for example:
GEN::Output(1024); - sets the WAVE OUT DA converter value to 1024
GEN::Output(2.2); - sets the WAVE OUT voltage to 2.2V (important to calibrate the DAC first)
Print("Hello");
Print(20, 20, "Hello");

for getting CH1 resolution:
CH1::Resolution;
or
ENUM::Ampl(CH1::Resolution);

and for changing:
CH1::Resolution=4;
After this change you should setup the adc and trigger by calling "ALL::Setup();" and redraw the screen with "Update();"

Every command needs to be ended with ; and enter (\n)
Maybe I can use these commands to recreate my pawn apps on my android tablet. Would it be hard to add commands?

jpa
Elementary-2
Elementary-2
Posts: 215
Joined: Wed Nov 02, 2011 4:06 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Alternative dso firmware [Application Software Design En

Post by jpa » Sat Dec 29, 2012 3:08 am

gabonator1 wrote: Regarding jpa's pawn & my firmware installed on the same device - this is not possible, initial idea was having multiple applications installed on DSO flash and by holding some button when turning on, you could choose which one you would like to boot. My firmware is so huge, that it occupies whole flash, even some part of the extended ROM :) So when you install my firmware, you should not install any other application to the slot 2, 3, or 4, because it would overwrite my firmwares code.
Oh, I did not know this.

How large is it? The extra flash is 256kB. I'm using 32kB of it for AlterBIOS.

So if you can fit your firmware in:
0x800C000 to 0x801BFFF (APP1 & APP2, 64kB)
0x804C000 to 0x807FFFF (Extra flash, excluding BOOT & SYS shadow areas, 208 kB)

That would be total of 272 kB, and it would not conflict with my Pawn nor Logic Analyzer.
gabonator1 wrote: If I had more memory and reliable disk drive (the FAT implementation in DSO is buggy)
AlterBIOS fixes the bugs:
https://github.com/PetteriAimonen/AlterBIOS

It transparently patches the bios so it works (should work) for all apps. If you don't mind requiring it, you can also use the fatfs interface directly instead of the crappy bios functions.
gabonator1 wrote: I would like to put some javascript or lua interpreter into DSO, this would open new world for user applications. Your PAWN implementation is nice, but the main disadvantage is that you need to compile your code at PC side.
Yeah, a stand-alone implementation would be nice. But the RAM on the DSO Quad is very limiting in this regard. Anything dynamic like Lua or Squirrel seems to require atleast 100kB of RAM to do anything useful.

c.wilt
Pre-kindergarten
Pre-kindergarten
Posts: 27
Joined: Thu Jul 19, 2012 9:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Alternative dso firmware [Application Software Design En

Post by c.wilt » Sat Dec 29, 2012 4:57 am

I have AlterBios loaded and the other firmware. Have not noticed anything wrong yet.

c.wilt
Pre-kindergarten
Pre-kindergarten
Posts: 27
Joined: Thu Jul 19, 2012 9:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Alternative dso firmware [Application Software Design En

Post by c.wilt » Sun Dec 30, 2012 11:07 pm

I went through the calibration process and I see that you had suggested an input of 4x the level being adjusted. Standard firmware suggests 5x and I used that. Seems to have worked ok but I keep noticing a common theme. It does not matter what firmware or calibration process is used Ch A is always less accurate than Ch B. Anyone else notice this?

gabonator1
Kindergarten
Kindergarten
Posts: 85
Joined: Thu Sep 15, 2011 7:54 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: dso quad
Location: Sered, Slovakia

Re: Alternative dso firmware [Application Software Design En

Post by gabonator1 » Sat Jan 05, 2013 2:08 am

New firmware is available - it occupies only APP1 slot and everything else is placed in the 200kB extra rom as jpa suggested. Now you can install my app together with jpa's pawn & logic analyser. I did not test it yet, but I hope it will work :)

c.wilt
Pre-kindergarten
Pre-kindergarten
Posts: 27
Joined: Thu Jul 19, 2012 9:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Alternative dso firmware [Application Software Design En

Post by c.wilt » Sat Jan 05, 2013 5:02 am

gabonator1 wrote:New firmware is available - it occupies only APP1 slot and everything else is placed in the 200kB extra rom as jpa suggested. Now you can install my app together with jpa's pawn & logic analyser. I did not test it yet, but I hope it will work :)
Sweet! :D
I will test it shortly. Combined with the pawn apps I am working on the DSO is starting to become useful.

Edit:
I can confirm that it loads properly. Currently have your alternate firmware in slot 1, jpa's logic analyzer in slot 3, and jpa's pawn loaded in slot 4. Everything appears to be working normally.

I just noticed something odd in the signal generator. When I select DC output there is only offset adjustment and no direct voltage output control. If I change the offset it does vary change the output but there is a problem. At 95% the output voltage is 2.707vdc and at 100% it goes to 58.25mv dc which is the same as 0%. It may have been like that before but I did not look at it.

I would also like to see an off setting for the generator.

c.wilt
Pre-kindergarten
Pre-kindergarten
Posts: 27
Joined: Thu Jul 19, 2012 9:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Alternative dso firmware [Application Software Design En

Post by c.wilt » Mon Jan 07, 2013 9:13 am

c.wilt wrote:I just noticed something odd in the signal generator. When I select DC output there is only offset adjustment and no direct voltage output control. If I change the offset it does vary change the output but there is a problem. At 95% the output voltage is 2.707vdc and at 100% it goes to 58.25mv dc which is the same as 0%. It may have been like that before but I did not look at it.

I would also like to see an off setting for the generator.
Along with the above I also found a bug in the RMS calculations that causes several volts drift over only a few minutes. I wonder if the same function is used during calibration process.

c.wilt
Pre-kindergarten
Pre-kindergarten
Posts: 27
Joined: Thu Jul 19, 2012 9:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: Alternative dso firmware [Application Software Design En

Post by c.wilt » Tue Jan 08, 2013 6:09 am

I have another suggestion. Make the voltage measurements auto ranging. Independent of the display range chosen. This would solve the complaints about voltage readings being different at different ranges and still allow the user to change the scale of the wave form being displayed.

You are probably already tired of hearing my suggestions.

Post Reply