Serial oscilloscope

This sounds like a really

This sounds like a really interesting project! specially if you get it working on Picaxe ! Would want a bit more info on it; what so I need to wire up and that sort of stuffā€¦

Picaxe

Well, Iā€™m not gonna make it work with a Pic since I donā€™t have one and donā€™t intend to get one (ever). But it should work. Serial is serial. As long as you send a stream of bytes (values between 0 and 255) it should work. And as long as the COM port and BAUD rate match, and youā€™re using 1 stop bit and NO parity bits. That should be it :slight_smile:

Try it and let me know if these settings arenā€™t adecuate for a Pic. I could easily add configuration of these settings to the user interfaceā€¦

More Picaxeā€¦

Just did a quick google on Picaxe serial standards. It seems youā€™re good to go: 8 data bits, no parity bit and 1 stop bit. Just remember to add N in the serout command before the BAUD rate (eg. N9600) meaning NOT inverted polarity, and it should work fine as isā€¦

Source code addedā€¦

Source code added at the request of Simon and Tinhead.

PS: Still anxious to get feedback from people who actually used the program :slight_smile:

Curious how fast it can go
I am from old school and have a dual trace 35 meg (.1 us/ div.). Even that is slow to what they have now. I have seen digital scopes but have to be patient with the time delays. The signal can be come and gone by the time you see it on the screen.

Testing

Well I was hoping to get some feedback from other people regarding the performance etcā€¦

But here is a small Arduino test program Iā€™m using:

byte val = 0;

void setup()
{
Serial.begin(115200);
}

void loop()
{
Serial.print(val, BYTE);
val++;
delay(1);
}

Iā€™ve set the BAUD rate to the max. supported by Arduino (115200). In the main loop it sends of 1 byte and then waits 1 millisec. It runs very fast on my screen and rather smooth too. In realtime. Sometimes there is a hickup (=it stops for a few millisecs to wait for the serial) but thatā€™s it.

When I get more time I will setup a timer calculating the (average) bytes received per sec etc, test it and play with different combinations of settings: BAUD rate, buffer size, delays, timeout etcā€¦

But as is it actually performs pretty well :slight_smile:

Hey, Aniss!Thanks for

Hey,

Aniss!

Thanks for posting the code. You are probably right about the win32/directX thing and that it doesnt make sense for a linux user to try to convert it to POSIX. Anyhow, its always more interesting to be able to see what you have done - rather then watch an .exe file i cant use. So thanks again.

BTW, I have an suggestion for your download/hosting situtation;

You should try out googlecode.com or a service similar(github). Will make it easier for you to share code and host the files at the same time.

-S.

Youā€™re welcome :slight_smile:

And on 2nd though perhaps it wouldnā€™t be SO dificult to export it to other other systems. The serial interfacing (which was the hardest part for me) would have to be rewritten off course. But as you see in the code I wrapped it into 3 functions: startSerial(), readSerial() and stopSerial(), which you could replace entirely with whatever works on Linux. The Dark GDK takes care of the graphics using simple functions such as dbLine(xA, yA, xB, yB) <- draws a line between the two point given. Likewise these functions would have to be replaced. But the rest is mostly standard C/C++.

I donā€™t think POSIX would be adecuate. The reason I chose to use DirectX was to get HARDWARE ACCELERATION of the graphics rendering, which is why it performs well. Even though the graphics is simple Iā€™m drawing 1000s of lines every 16th millisec.Without hardware acceleration itā€™s not possible.

I was thinking more in the lines of OPENGL which is a cross platform equivalent to DirectX. But I donā€™t know of any good wrappers/engines based on OPENGL?! Something as fast, easy and well documented as Dark GDK?!

PS: Thanks for the tip (regarding fileshare)ā€¦

Just wonderingā€¦

Is it possible to send serial data from a PIC to a PC using the programmer cable? If no then that would explain why you PICAXE folks donā€™t find this tool usefull. If yes then I recommend trying this tool. Just plug you MCU into your PC (USB or serial) and start sending your analog or digital readings by serial. Open the SerialScope, select the corresponding BAUD rate and com port and you have a pretty neat oscilloscope.

Anyway Iā€™m curious if this also works with PICAXE?!

You certainly can with a
You certainly can with a PIC, many these days even have USART, a built-in serial interface. PICAXE on the other hand use the same Ī¼C hardware but have significantly limited capabilities, so I donā€™t know how easy it is to interface those with a PC via serial using the programmer.

Congratulations

Ā 

I do think it is a good idea.

I havenā€™t had time to check it, but I will as soon as possible.

OK?! Interestingā€¦

If you canā€™t then it must make debugging your PICAXE code rather difficult?! When Iā€™m working on/debugging an Arduino sketch Iā€™m pretty much logging EVERYTHING via serial. In fact it was the very 1st thing I did with my Arduino (writing ā€œHELLOā€ via serial), so it never occured to me earlier that perhaps this wasnā€™t possible with PICAXEā€¦

Go for it :slight_smile:
Itā€™s extremely easy to use, itā€™s fast (up to 8 Bytes per millisec seems to be the limit) and the filter and scaling makes it a pretty usefull tool :slight_smile:

Thereā€™s absolutely no

Thereā€™s absolutely no problem sending serial data to a PC from a Picaxe. The ā€˜seroutā€™ and ā€˜sertxdā€™ commands handle this easily. Check the docs if you are interested.

The only problem with Picaxe, which isnā€™t a problem in a lot of cases, is the execution speed, as it decodes a tokenised program.

Ā 

Niceā€¦ but I think I will
Niceā€¦ but I think I will look into the code Iā€™m a Mac User, so maybe Iā€™ll give it a try porting ā€¦

**Im making a low speed**<br><p>Im making a low speed oscilloscope with the arduino to help debug a couple of other projects but the files from the original post seem to have expired or been taken down.

Can you reupload them Aniss? Or does anyone else have the newest version?

Links Down

IĀ“m kind of new with robots, and this could be a handy tool. Could you please upload the soft again. and also the source if that is available

Thanks!!!

canā€™t find serialscope

canā€™t find serialscope anymore, anyone know where the source and compiled version can be found?

download links down?

anyone has a mirror of the source and / or the compiled version?

noone answered, but I found a perfect alternative

I found a good software (free) alternative (which I wrote yesterday by myself since noone answered :).

Here is the youtube video:Ā http://www.youtube.com/watch?v=RjpFY2mqcv8

and here is the link: http://oktay.com/sso/SimpleSerialOszi_V1.0.rar Feedback in Youtube appreciated.

here is arduino code (itā€™s so small, itā€™s even not a code :wink: :

Ā 

// START

void setup() {Ā  Serial.begin(115200); Ā }

void loop() { Ā Ā  Ā  Serial.print(analogRead(0));Ā  Ā Serial.print(" ");}

// END

Ā 

Ā