4Mhz Clock - Is the Prop up to it?
Philldapill
Posts: 1,283
I got some cool samples from TI the other day. They are TLV2543, 12-bit, 66KSPS, 11-ch, ADC chips. I'm building something that needs a lot of ADC's, but don't want to go the route of using the component·S-D ADC for the prop that it seems most people use. For one, it seems like it's too many components when you're talking 10 channels. Secondly, that's a lot of cogs and pins. This chip will only need 4 pins, and I get all 11 channels out of it. I'm sure there are better chips out there, but I want to do some learning and get an object working at top speed for it(or at least close to it).
Now, hardware and wiring aside, I'm wondering if the propeller can supply a fast enough clock to this chip. The datasheet states a typical clock of 3MHz, 4.1MHz maximum. Like I said, I'd like to get this thing sampling as fast as possible, but I'm worried spin isn't up to it. Should all the I/O be done in PASM instead? I'm fairly new to it, and would like to do spin if I can.
Now, hardware and wiring aside, I'm wondering if the propeller can supply a fast enough clock to this chip. The datasheet states a typical clock of 3MHz, 4.1MHz maximum. Like I said, I'd like to get this thing sampling as fast as possible, but I'm worried spin isn't up to it. Should all the I/O be done in PASM instead? I'm fairly new to it, and would like to do spin if I can.
Comments
·
I was afraid of the need for PASM. This isn't a simple matter since there is alot of averaging and querying of the chip. Thanks Mike.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
Chip already wrote an object for the MCP3208 in ASM (similar 8ch 12 bit single ended device). This puts out a 1MHz clock to achieve the 50ksps inputs and needs 3 wires (the Din and Dout are tied together)
Good luck with your project
I had requested some samples of these as well. I got round to putting 1 on a breakout board and writing a driver for it.
It uses a cog and samples all channels continously, creating a running average (7/8 of the previous + 1/8 of new sample) of all channels. I haven't done an exact calculation but it should be doing ~4000 samples per channel per sec. Seems to work well though getting the driver and chip in sync on reset was a pain (power up was easy)
adctest.spin has the crystal set to 6Mhz so you probably need to change that.
it has clk to prop pin 0, dataout from adc prop pin 1, datain to adc prop pin 2, eoc prop pin 3 and cs pin prop pin 5 but there easy to change.
Its only just working so it probably·still has bugs.
Edit: Updated the archive, tidied up the initialization code up and tightened up the conversion loops
Tim
Post Edited (Timmoore) : 7/24/2008 3:27:28 AM GMT