View Full Version : Newbie with Application Question
I am an aero engineer who knows next to nothing·about electronics.
However,·I am very·interested in microcontrollers and am·eager·to learn.
I am currently working on a data acquisition project and I·have·a need to verify the 5-bit pattern·being "streamed"·from a "high-speed" DIO card. Right now I am looking at 5 LEDs and its· not of much use. I was thinking of·finding a way to convert the·binary to BCD and then display it·with an LCD. I·looked around but could not find a·binary to BCD IC and·all the examples I could find for doing something remotely like this used microcontrollers. If the best way to do this is using a microcontroller then great - I wanted to learn anyway! But then again, maybe I am totally off-track and I don't even know it.
My question is: Am I on the right track? If so, can anyone give me a clue on how to get this working ASAP. If not, can someone set me straight?
03-04-2005, 03:56 AM
I think it could fairly easily be done with a micro. you'd need to post more specs though.
how fast is the io changing? by verifying what do you mean exactly? are you always looking for the same thing in the io. would you keep storage of the info. ect ect ect
you get the point
03-04-2005, 04:13 AM
And what do you mean "Streamed"?
Typically, a DIO card would present a set of bits, then give a 'strobe' to indicate when the bits should be read. The card would then setup the next set of bits, then issue the next strobe.
Depending on speed, this COULD be read by a BS2. If it was being done at 1000 strobes per second or less, it certainly could. So, more clarification please.
And if it's REALLY 'High-Speed', like 10 million samples per second, you may need an SX chip running SX/B.· If it's much higher than that, I don't know what would work.
Yep, the correct term is "strobed" - still learning.
The DIO card I am using is a PXI-6533 from National Instruments. The term they use is "Pattern I/O" - defined as generating patterns based on a clock signal. I am attempting to use "continuous output" using DMA transfers (NI states that there can be up to 3 bytes of data in a device FIFO). NI claims 4MS/s with 8-bit operation.
What I need to do is "count" from 1 to 32 in binary (5 lines TTL) over and over and over....and I would like to be able to transfer at up to 20kHz. On the software side, I fill up a half-buffer in a loop and call a driver function to transfer the pattern. It's hard to tell whether the transfer rate is being met or even if the pattern is correct.
I thought that a micro might offer an "easy" way to check that the pattern and the timing are correct - even if just to simply display the number I am sending out (at a slower transfer rate).
With regard to acquiring the output using the micro / storage / etc. I am not sure what is realistic/worth the effort.
03-04-2005, 07:14 AM
As to displaying the pattern and timing, you COULD use an "ANT-8" USB-Based logic analyzer. This would sample at a speed fast enough to capture your patterns, store them, then you could scan the resulting data file to see if you got what you expected. At $200 or so, this might solve your problem off the shelf.
I'd probably put the Ant-8 on a separate PC, so driving the DIO card would not be interrupted by the USB port accesses. This would also get you solid timing values measured from a known-good and independent device (the Ant-8). An ANT-16 is also available.
The BS2 is definitely too slow to do anything at 4 Mhz. Even 20 Khz (a 50 uSec cycle time) is faster than a BS2 can deal with. Its typical instruction time is around 100 uSec, though the BS2sx has a 30 uSec instruction time.
On the other hand, the SX-Key board and chipset would definitely be fast enough to deal with your 20 Khz signal, and probably fast enough to count a 4 Mhz signal. A small program to recieve the data, check that it is incrementing properly, and increment a counter, and flash a light that things are good, wouldn't be too hard to do in "SX/B", the compiled basic language Parallax supplies. The whole set would cost around $130 or so.
Then you only have the development time to write the program and verify it. You could in fact follow BOTH approaches. Use the Logic Analyzer to verify down to the 100 nSec level what you've got, and use the SX-Key to perform a more long-running test.
03-04-2005, 07:40 AM
You could get the new Basic Stamp Logic Analyzer for $99 bucks that will show you all of the signals going into the 24-pin stamps.· Then you can see if what your Stamp (and your code)·is reading is actually what is coming in on the I/O.
How large of a buffer to you want ?
The SX28 has about 136 bytes of RAM, the SX48/52 has 262 (I think).
Neither one of these is very large as a data buffer.
SX/B with an SX running at 50MHz should be able to handle 4Megasamples per second using an interrupt on the strobe signal.
Check out· the "SX-Video Display Module"
03-04-2005, 11:33 PM
You could get the new Basic Stamp Logic Analyzer for $99 bucks that will show you all of the signals going into the 24-pin stamps.
As handy as the BSLA is, it's rated for only 2 Ms/s. That's half of the need speed.
Then you could just use two of them.
It's too bad I'm the only one who thinks I'm funny.
I am impressed with all of the feedback to my question.
Great Forum. I appreciate the help.
I think I'll have a go with the logic analyzer (a get the answer now approach) and also give the SX a shot.......