c example to read LTC1400 SPI AD?

Anyone know how to read the LTC1400 a/d in c using the SPI? Thanks

Reply to
BobGardner
Loading thread data ...

Bob, I'm sorry to say this is very dependent on the hardware (primarily) and to some extent the particular C compiler you're using. What are you intending to connect it to? A PC? A particular Micro? Now some micros have hardware SPI support, making the exercise fairly easy. Others don't and you have to "bit-bang" (emulate the hardware on a bit by bit basis) the interface, as you would, too, on a PC. Some embedded compilers will have library functions to access the SPI bus again making it easy, some don't making it harder. The ones that do will all have different function names and parameters. The answer to your question is yes, many of us know how to do this given a schematic of the hardware, the microprocessor data sheet, the LT1400 data sheet and the compiler manual. Unfortunately it's knowledge gained only by doing and cannot be passed on in the very general sens of your question. Now if you asked the question in the following way: "How can I read and LTC1400 on an Atmel ATMEGA32 using imagecraft C, with the clock connected to PortA bit 1, data connected to PortA bit 2 and Convert connected to PortA bit 3?" someone here might very well be able to help you further.

Cheers,

-- Alf Katz snipped-for-privacy@remove.the.obvious.ieee.org

formatting link

--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 3/11/2003
Reply to
Unbeliever

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.