Sunday, 2 April 2017

How to interface two wire & three wire SPI device?


ADC AD9266 Here is the datasheet of ADC AD9266. page no 25 of it is SPI


I'm working on a Project where I have to interface my ADC with MCU 8051. The Problem I encountered with is my ADC supports two wire SPI mode ( SCLK , SDIO pins ) while my MCU has three wire SPI configuration ( SCLK , MISO , MOSI ).


How would I connect my MISO & MOSI pins to single SDIO pin..pins connection


My Actual problem is I have to program ADC first to through SPI Port for which I need my MCU to act as Master & connect MOSI to SDIO & During first instruction ADC will be programmed but after that I need to collect the data from ADC so ADIO must be connected to MISO. What is the remedy ?


thank you all in advance.



Answer




The "SPI" in your microcontroller stands for "Serial Perpheral Interface", which is an industry standard I/O port originally defined by Motorola. But the "SPI" in the Analog Devices' AD converter stands for "Serial Port Interface", which is not the same as the SPI in your microcontroller. It's Analog's own definition for a digital interface.


Analog has written an application notes on how to communicate with this port. It can be found here:


AN-877 Interfacing to High Speed ADCs via SPI: http://www.analog.com/static/imported-files/application_notes/56755538964965031881813AN_877.pdf


You might be able to use your microcontroller's SPI port for this, at least partly - the Atmel protocol seems at least somewhat compatible with Serial Peripheral Interface. You could connect your microcontrollers MISO port to the Atmel's SDIO port and then bit-bang the instruction header from your microcontroller to the ADC and then use the hardware SPI to read the data. Or you perhaps could connect both MOSI and MISO together in your MCU and use the pin's direction and mode bits (input-or-output, gpio-or-peripheral) to essentially disable the MOSI pin when you're reading data and MISO pin when you're writing data.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...