Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Parallel, serial or USB?

Status
Not open for further replies.

chris414

New Member
Hi there. I'm currently doing some research into building a PC-based oscillosope (disclaimer: I am fully aware that a homemade PC-based oscilloscope is not nearly as accurate as a proper scope, I'm just building this for the fun of it:)) and am wondering about the port to use (sound card is not an option). I have done some parallel port programming in Java before, but it was quite simplistic and I only really used the data lines as switches (rather than transferring bytes of data).

Some questions I have:

- From a speed point of view, which port would be the fastest in transfering data? (assuming that transfer rate could limit my potential sample rate)

- Similarly, would it make a difference in speed of communication with the port if I used Java or Python?

- I have always wanted to do a project with a USB port, but everyone seems to think it's more complicated to get working than the other ports... anyone have any experience here? What part is more complicated, the circuitry you have to make or the programming?

- Any good, detailed tutorials out there you've come across?

- Which port would *you* use and why?

Thanks a lot:)
 
USB is really the ONLY way to go, it's the only port most modern computers have.

It is considerably more complicated, but it's also far faster.

The trick though is to not need massive speed anyway, the entire scope is in the external box, apart for the display - for which the data is transfered to the PC.
 
Thanks for the response. As I say I'm quite keen to do a USB project, so the extra complications dont bother me too much. I've done a lot of searching on google but am kind of lost amoungst the mountain of information out there - is there a certain chip or certain concept I should be searching for when making the circuitry? It's hard to find the right info when you don't know what you're looking for!
 
This was one of my first projects when I started messing around with PICs. Interface speed is definitely the bottle neck.

You'll want to write the sampling software (on the MC side) so that it knows about the view window and only sends the data that is actually going to be displayed. You can still do oversampling, or have very wide sweeps, but only send what is actually going to be displayed.

And yes, USB is the only way to go.

BTW, one problem I found with PICs is there is internal cross-talk from executing instructions to the ADC modules. I started noticing noise once I got it going. After refining it even more, I noticed the noise was a very specific waveform that started right when the PIC was awoken to handle an interrupt. It was kind of cool that my own creation found the flaw in my own creation. :p
 
Last edited:
FTDI serial to USB chips are quiet nice, and with A DLL support bandwidths of 1mbits per second. As Nigel said though you don't need to maximize the speed to make a good oscope, what you need is a lot of ram on the oscope board so you can capture large hunks of data VERY fast and then transfer it to the PC at your leasure. What you're talking about by nature is a DSO, one of the key features of a DSO is it's sample buffer. So just make a massive sample buffer and you can use 115k baud standard serial (over USB if you want) link to transfer the data.
 
Your sweep rate is directly dependent on your baud rate though. If he's trying to build a DSO, then there are different approaches to take. And yes, you would need to have a huge buffer for a DSO.

For just a simple O-scope though, your buffer only has to be as large as your samples per second * display width.
 
I'd go the DSO route, the performance would be better, and at slower sampling rates it could be an active scope.
 
Okay wow I'm gonna have to do some googling here to understand all this... firstly, what's a DSO?

The way I thought this was going to work (in a very simplistic overview) would be:

varying line voltage -> ADC converter -> convert signal so it can be sent via USB (not sure what to do for this step) -> retrieve data on computer & perform calculations on computer to display data.

I like the sound of using RAM to store the data, but how would I do this? Can someone point me in the right direction? Eg. which components, are there any well known circuits i should be aware of, etc (it's hard to search google when you don't know what you're looking for!)
 
Digital Storage Scope.
Simply put it uses high speed ADC, stuffs the values into memory as fast as it can and then feeds them back to the PC at a slower rate later. It lets you capture very high speed 'windows' of data limited only by the capture buffer (memory) size, WAY higher than the interface can support real time. You can do an ADC fed directly over the bus you have available, but it will be much slower than you can capture the data on the local device.
 
Here is a **broken link removed** of a USB scope. You'd need to add more circuitry to make it more useful. **broken link removed** which uses it's own LCD. This one uses an AVR micro.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top