New to SX, data aquisition question
Hi folks,
I'm mostly a software guy, but I'm doing some research to find a replacement for a data aquisition board we use. I think the SX line might have something that would fit the bill.
Here's the data I'm working with:
-One pulse width modulated value, being sent up to about 5KHz, clocked at 80MHz. I need the pulse width, counted at 80MHz.
-Three analog lines, which need to be captured at the rising edge of the pulse (or nearly, some delay is tolerable).
-Two lines from a quadrature encoder.
I'd like to be able to capture these values and echo the data out to a PC over a serial port.
Question 1: I'm reading on the "SX Tech Tool Kit PRO" page and I see the following about the SX Key: "The frequency output of this clock is adjusted from the software with a sliderbar between 400 kHz and 100 MHz." So can I use that clock on the SX Key to time my PWM signal? Is this clock running the whole chip (that is, is the chip 'overclocked') or is it just an external clock?
Question 2: Can one of these chips keep up with sending serial data out to the host while it's waiting for the next signal, and keeping a quadrature count? I figure 48KBytes/sec would be fast enough to keep up with all the above data (16 bit pulse width timer, 16 bits quadrature count, 8+8+8 bits for A/D, all times 5000 samples/sec).
I understand an FPGA might be the best solution, but I don't have any VHDL/Verilog background. Basic, C, or assembly are not problems for me. The SX line looks like it migh be a good fit.
Any comments you all would have would be appreciated.
Thanks,
Les Elkins
I'm mostly a software guy, but I'm doing some research to find a replacement for a data aquisition board we use. I think the SX line might have something that would fit the bill.
Here's the data I'm working with:
-One pulse width modulated value, being sent up to about 5KHz, clocked at 80MHz. I need the pulse width, counted at 80MHz.
-Three analog lines, which need to be captured at the rising edge of the pulse (or nearly, some delay is tolerable).
-Two lines from a quadrature encoder.
I'd like to be able to capture these values and echo the data out to a PC over a serial port.
Question 1: I'm reading on the "SX Tech Tool Kit PRO" page and I see the following about the SX Key: "The frequency output of this clock is adjusted from the software with a sliderbar between 400 kHz and 100 MHz." So can I use that clock on the SX Key to time my PWM signal? Is this clock running the whole chip (that is, is the chip 'overclocked') or is it just an external clock?
Question 2: Can one of these chips keep up with sending serial data out to the host while it's waiting for the next signal, and keeping a quadrature count? I figure 48KBytes/sec would be fast enough to keep up with all the above data (16 bit pulse width timer, 16 bits quadrature count, 8+8+8 bits for A/D, all times 5000 samples/sec).
I understand an FPGA might be the best solution, but I don't have any VHDL/Verilog background. Basic, C, or assembly are not problems for me. The SX line looks like it migh be a good fit.
Any comments you all would have would be appreciated.
Thanks,
Les Elkins
Comments
Question 2: You would need an external sample-and-hold ADC to measure the analog voltages. It could possibly be done on an SX, but it would be quite a challenge. How fast is the quadrature changing ?
I would get one of the SX48 protoboards (the SX48 has 2 16-bit counter/timers onboard) for $10 and start experimenting.
SX48 Protoboard http://www.parallax.com/detail.asp?product_id=45300
SX Programming Starter Kit http://www.parallax.com/detail.asp?product_id=45181
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
Post Edited (Bean (Hitt Consulting)) : 8/1/2006 5:58:39 PM GMT
If 100MHz is toasty, would 80MHz be a viable option for an outdoor summertime application? (Like, on a day like today... Gosh, it's withering in DC.)
If we'd have to test ten to find one that would be stable at this speed, that would be fine for our application. We're replacing a $1K+ USD semi-custom board (overpriced, IMHO), so I'm sure I can get support for going through some spare $3-$5 chips if it comes to it.
The encoder is 4K counts, and runs at about one rotation per second. Keeping accurate track of 16K quadrature counts on an 80MHz processor doesn't *sound* too hard.
I'm reading the ADC0834 8-bit 4-channel A/D datasheet and I think I understand it. Sounds like adding one of those wouldn't be a huge leap.
So, if this thing can run reliably at 80MHz I think it'll work fine for our application. I'll pick up the kit and board and we shall see what happens. Thanks for the info.
-Les