cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
umer_366
Observer
Observer
9,466 Views
Registered: ‎04-18-2010

ADC ip core attachment with Microblaze processor

hi,

i need to take a sine wave from signal generator for FPGA sparten 3e kit..

i dnt have the ADC ip core for Microblaze processor...

whrere to find it and how to attach this core with the microblaze processor...

is there any help for that??/

thanks

 

0 Kudos
25 Replies
drjohnsmith
Teacher
Teacher
9,440 Views
Registered: ‎07-09-2009

Hi

 

Ok, 

 

 So for converting digital to analog, you need a DAC.

 

FPGA does not have any analog circits to make a DAC.

 

So you need to use some sort of external hardware to do the translation for you.

   what you use depends upon what your board has, and what speed you need.

 

So look at the board.

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
kajulkumar
Observer
Observer
9,431 Views
Registered: ‎04-18-2010

sir,

my sprtan 3e starter kit has built in ADC...

i want to connect this ADC to microblaze processor...
is its core available ???
if its core is not there then how to connect it to the microblaze processor????

i want to take input from the ADC as i am providing input externally to microblaze via ADC which may be the sine wave or some signal...


regards and kind of u
0 Kudos
drjohnsmith
Teacher
Teacher
9,415 Views
Registered: ‎07-09-2009

Hi

 

OK,

 

so you have a board with an ADC on it,

 

Which spartan 3  starter board do yo have would be a good first question ? There are Lots.

 

 Does the board come with any example EDK code that uses the external chips ?

 

 

Then,  which ADC does the board have on it ?

 

If you know what ADC you have, then you know the interface  , so you might be able to look for a generic EDK block.

 

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
umer_366
Observer
Observer
9,402 Views
Registered: ‎04-18-2010

hi,

Spartan 3e HW-SPAR 3E-SK-UNI-G

its the board em using and its ADC is giving me output as SDO(Serial Data Out)

now can i use UART after ADC  that and connect the UART with MBprocessor to get data into it and use that data for further processing???

thanks

0 Kudos
umer_366
Observer
Observer
9,389 Views
Registered: ‎04-18-2010

i have found out the ADC manual...

it has SPI connections with the MB processor....

after making embedded MBprocessor in  Xilinx10.1.03  EDK BSB how to make connections with this ADC...

 

 

 

For pre programable amplifier

Signal FPGA Pin Direction Description

 

 

SPI_MOSI        T4      FPGA to AD Serial data:                     Master Output, Slave Input.

AMP_CS           N7     FPGA to   AMP                                     Active-Low chip-select.

SPI_SCK          U16    FPGA to  AMP                                      Clock
AMP_SHDN      P7      FPGA to  AMP                                      Active-High shutdown, reset
AMP_DOUT      E18     AMP to FPGA                                     Serial data.

 

 

 FOR ADC

Signal FPGA Pin Direction Description
SPI_SCK        U16        FPGA to ADC                       Clock
AD_CONV      P11        FPGA to ADC                     Active-High shutdown and reset.
SPI_MISO       N10        ADC to FPGA                    Serial data: Master Input, Serial Output. Presents
                                                                                  the digital representation of the sample analog
                                                                                  values as two 14-bit two’s complement binary
                                                                                   values.

i have to connect theses pins with the MB processor...

how to connect them plz help me out

0 Kudos
Anonymous
Not applicable
9,387 Views

Hi,

 

You can just implement a SPI IP core, from the IP Catalog.

 

Implement a GPIO core to drive the reset line into the ADC.

 

Tell us the part number and we may be able to help with the software.

 

Lachlan.

0 Kudos
umer_366
Observer
Observer
9,363 Views
Registered: ‎04-18-2010

hi Lachlan,

thanks 4 guiding....

 

its ok i have implemented SPI ip core and GPIO core from the ip catalog ....

  

there is an option in Assembly view in xilinx 10.1.03 EDK that make a connection of it...

mb_plb makes a connection of it with the same PLB bus as i em using it for the rest of the connections between MB processor and other peripherals...

should i make a new connection which results in new PLB bus connection i.e plb_v46_0???

same for GPIO ?/??

 

 

and in my manual UCF file constraints are given like

 

NET "SPI_MOSI" LOC = "T4" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 6 ;
NET "AMP_CS" LOC = "N7" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 6 ;
NET "SPI_SCK" LOC = "U16" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 8 ;
NET "AMP_SHDN" LOC = "P7" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 6 ;
NET "AMP_DOUT" LOC = "E18" | IOSTANDARD = LVCMOS33 ;

 

and for timing 

NET "AD_CONV" LOC = "P11" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 6 ;
NET "SPI_SCK" LOC = "U16" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 8 ;
NET "SPI_MISO" LOC = "N10" | IOSTANDARD = LVCMOS33 ;

 

should i have a change in them or i should just let them as they are mentioned in the manual???

 

kind of u

 

0 Kudos
Anonymous
Not applicable
9,344 Views

Hi,

 

What is the part number of the ADC you are using?

 

 

0 Kudos
umer_366
Observer
Observer
9,312 Views
Registered: ‎04-18-2010

hi.

em using sparten 3e board and the name of my buit in ADC is LTC1407A-1 ...

it has SPI connection with the MB processor..

how to connect it with MB proceessor using EDK???

thanks

0 Kudos
umer_366
Observer
Observer
9,715 Views
Registered: ‎04-18-2010

hi sir i am using LTC1407A-1 ADC ... plz help me out that how to make connection of it with microblaze processor????
0 Kudos
umer_366
Observer
Observer
9,666 Views
Registered: ‎04-18-2010

hi

how to make an SPI connection with microblaze and ADC????

can any one can help me out????

Tags (1)
0 Kudos
soundarewl
Visitor
Visitor
9,593 Views
Registered: ‎08-23-2009

hi,

it seems your ADC Digital interface is not a SPI interface

XPS Serial Peripheral Interface (SPI) core may not support your ADC.

first read XPS SPI core Data sheet, it may give clear idea.

 you have to make customized core for your application.

better you use GPIO from Microblaze and read ADC data.

 

regards

soundar

0 Kudos
umer_366
Observer
Observer
9,568 Views
Registered: ‎04-18-2010

hi

it ok..

i have made up my ip core in ISE..

now guide me the steps i have to take in XPS to attach it with microblaze 

0 Kudos
soundarewl
Visitor
Visitor
9,554 Views
Registered: ‎08-23-2009

Check out this Xilinx document

 

  UG683 (EDK Concepts, Tools, and Techniques).

 

0 Kudos
celojan
Visitor
Visitor
8,676 Views
Registered: ‎02-07-2011

You need an XPS SPI core for drive 2 peripheral. The amp and the ADC. 

The adc and AMP have special features shuch as the spi timing.

Read firs the manual of spartan 3e (In the ADC capture section),

Configure the IPCORE XS SPI, to transmit 8 bits (8 bits for set amp gain), clock ratio 32 (the max freq clock of adc is 1.5 mhz)and bits ss 2 (2 devices).

Be sure that all pins were asigned correctly in the ucf file.

 

 

Net xps_spi_0_MOSI LOC=T4 | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 6 ;
Net xps_spi_0_SCK LOC=U16 | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 8 ;  
Net xps_spi_0_MISO LOC=N10 | IOSTANDARD = LVCMOS33;
NET xps_spi_0_SS<0> LOC =P11 | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 6 ; # AD_CONV para ADC 
NET xps_spi_0_SS<1> LOC =N7 | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 6 ; # Preamp Chip Select 

 

 

The next step is reading and understand the spi low level example, you could find information of the documentation in ...Xilinx\11.1\EDK\sw\XilinxProcessorIPLib\drivers\spi_v2_01_a. All documentation and examples could you help.

 

This is only the hardware part. If you need more,...write some..!!!

 

 

0 Kudos
anrosan
Newbie
Newbie
8,622 Views
Registered: ‎04-26-2011

hi celojan

 

I have the same problem, I read the ADC with MicroBlaze and do not really know how to connect. I followed what I've seen discussed hereand the comments are in Spanish, you have some example code?

Thank you very much in advance

0 Kudos
rourabpaul
Explorer
Explorer
8,594 Views
Registered: ‎08-13-2010

i found a pin 'agtr' in adc
what should be the connection for it???
0 Kudos
rourabpaul
Explorer
Explorer
8,565 Views
Registered: ‎08-13-2010

I have added deltasigmaadc core and spi core,
we have 4 port in in delta sigmaadc
IP2INTC_Irpt,DACout,Sample, and agtr,
i think the all ports are not external, then what shpoul be the connection of that ports?
mu ucf is
Net fpga_0_SPI_FLASH_MISO_pin LOC=N10 | IOSTANDARD = LVCMOS33;
Net fpga_0_SPI_FLASH_MOSI_pin LOC=T4 | IOSTANDARD = LVCMOS33;
Net fpga_0_SPI_FLASH_SS_pin<0> LOC=U3 | IOSTANDARD = LVCMOS33;
Net fpga_0_SPI_FLASH_SS_pin<1> LOC=N8 | IOSTANDARD = LVCMOS33;
Net fpga_0_SPI_FLASH_SS_pin<2> LOC=N7 | IOSTANDARD = LVCMOS33;
Net fpga_0_SPI_FLASH_SS_pin<3> LOC=C3 | IOSTANDARD = LVCMOS33;
0 Kudos
celojan
Visitor
Visitor
8,511 Views
Registered: ‎02-07-2011

Hola, estoy desde hace algun tiempo trabajando en esto. En el EDK todo me funciona bien, la plataforma de hadware esta implementada. El problema es cuando se trata de manipular los dispositivos con el IPCORE SPI. Yo utilizo el SPIV2.01 del EDK 11.1.  Se necesita un IPCORE adicional que es uno de proposito general gpio, para manejar la adconv del ADC, ya que segun el mannual se debe generar una señal cuadrada de minimo 4ns.

El problema de intentar esta señal con el vector SS, es que segun el manual del SPIV2.01, la conversion inicia y se detiene escribiendo este valor de bajo en el registro SPISSR.

 

Lo primero que se debe empezar es por asignar bien los pines, luego.Ten cuidado con el pin shdn del amplificador, es el que lo enciende, debes ponerlo en bajo. Los demas pines pues ya sabes MOSI (al la entrada de datos del AMPLIFICADOR), MISO (Salida de datos del ADC), ss(0) al amp_select pin, el ss(1) lo conecte a un led para simular. y el gpio(0) al pin adv_conv del ADC.

 

Pues una vez que tengas eso, vamos a la parte mas complicada de esto. Importa el proyecto a SDK,  pues bien ahi tienes que implementar el codigo, con los siguientes pasos.

--Inicia pon el controlador en modo maestro, con el bit de polaridad en polaridad cero y fase 1, no debe estar en modo loopback.

--Luego ecribe los valores a enviar al dispositivo en el SPIDTR-

-Bien ahora envialos desactivando el bit de inhibir y el de enable SPE, ademas selecciona el bit ss(0).

--Espera a que se decocupe la FIFO de salida. 

--desactiva el bit de ss(0).

Bien ahora se debe generar la señal cadrada, con un for la puedes hacer, y con el gpio que habiamos creado.

Al momento que terminas la señal cuadrada, selecciona el bit ss(1), para que empiece la recepcion. 

No te olvides que son 32 ciclos de reloj para obtener los datos, y son 28 datos con complemento a 2, se debe transformar y ademas el valor de voltaje se debe despejar de la ecuacion del manual de la espartan 3e.

 

Bueno pues yo tengo el problema de que no se guarda en el registro SPIDTR, los valores de ganancia que yo deseo.

 

Estoy aun trabajando en el codigo, espero pronto tener resultados. Pronto lo publicare.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Ingles

I'm still working on the code, I hope to soon have results. Soon I will publish it. 

 

 

Hello, I have been for some time working on this. EDK In all, I work well, the hardware platform is implemented. The problem is when it comes to handling the devices with SPI IPCORE. I use the SPIV2.01 the EDK 11.1. IPCORE is needed is an additional general purpose gpio to manage the adconv the ADC, since according to the manual must generate a minimum square signal 4ns. 
The problem with trying this with the vector signal SS is that according to the manual SPIV2.01, the conversion starts and stops writing this value in the registry under SPISSR. 

The first thing to start is to assign the pins well, then. Beware the SHDN pin of the amplifier is you turn it on, you put it on low. Other MOSI pin as you know (at the input of the amplifier), MISO (Data output of ADC), ss (0) to amp_select pin, SS (1) connecting it to an LED to simulate. and gpio (0) to pin adv_conv ADC. 

For once you have that, go to the most complicated part of this. Import the project SDK, well there you must implement the code, the following steps. 
- Start put the controller in master mode, the polarity bit of polarity in phase zero and 1, should not be in loopback mode. 
- Then write the values ​​to send to the device SPIDTR- 
'Well now send them by clearing the bit to inhibit and to enable SPE bit also selects ss (0). 
- Wait for the FIFO from emptying out. 
- Disable bit ss (0). 
Well now you must generate the square wave, with the can do for and with the gpio we had created. 
When you end the signal box, select the bit ss (1), to start the reception. 
Do not forget that there are 32 clock cycles to obtain the data, and is 28 2's complement data, and it must transform the voltage should be clear from the equation of the Sparta manual 3e. 

Well I have the problem that is not stored in the registry SPIDTR, gain values ​​I want. 

0 Kudos
jbrenesh
Newbie
Newbie
5,696 Views
Registered: ‎07-26-2011

Saludos, 

 

He tenido un problema parecido, sé  que mi módulo de spi y el código que utilizo esta bien, ya que he hecho pruebas y efectivamente funciona a la perfección. Pero hay algun error en el pre_amplificador, ya que no importa que haga la salida que envía es 255 (la entrada esta en "1" siempre),  hice pruebas poniendole valores fijos("1" y "0") a la entrada del mismo, pero siempre la salida amp_dout es "1", el reloj esta como lo dice la hoja de datos, los valores de amp_cs y amp_shdn estan en "0" antes de iniciar la transmición, pero nada.

 

Si su problema es la recepcción de la ganancia puedo ayudarle, pues esa parte la tengo bien, y si verificando la salida amp_dout de su proyecto envía la ganancia correcta mas no lo recive bien puedo ayudarle.

 

Le agradecería cualquier ayuda.

 

Jose.

 

0 Kudos
robn
Moderator
Moderator
5,688 Views
Registered: ‎11-10-2010


@jbrenesh wrote:

Saludos, 

 

He tenido un problema parecido, sé  que mi módulo de spi y el código que utilizo esta bien, ya que he hecho pruebas y efectivamente funciona a la perfección. Pero hay algun error en el pre_amplificador, ya que no importa que haga la salida que envía es 255 (la entrada esta en "1" siempre),  hice pruebas poniendole valores fijos("1" y "0") a la entrada del mismo, pero siempre la salida amp_dout es "1", el reloj esta como lo dice la hoja de datos, los valores de amp_cs y amp_shdn estan en "0" antes de iniciar la transmición, pero nada.

 

Si su problema es la recepcción de la ganancia puedo ayudarle, pues esa parte la tengo bien, y si verificando la salida amp_dout de su proyecto envía la ganancia correcta mas no lo recive bien puedo ayudarle.

 

Le agradecería cualquier ayuda.

 

Jose.

 


Translated for English Speakers (the best I could do)

 

Salutations,

 

I had a similar problem, I know my spi module and the code I use is fine, since I have tested it and it works perfectly. But there is an error in the "pre_amplificador" because no matter what is sent, the output is 255 (the input is "1" always), I tested by putting fixed values ​​("1" and "0") to the input of the same but always amp_dout output is "1", the clock is as stated in the data sheet: values ​​are amp_shdn amp_cs and "0" before starting the transmittance, but nothing.

 

If your problem is the Gain reception I can help, because that part I have it right, and if verifying the output of amp_dout in your project sends the correct gain but does not receive correctly I can help.

 

I would appreciate any help.

 

Jose.

0 Kudos
celojan
Visitor
Visitor
5,681 Views
Registered: ‎02-07-2011

Un coordial saludo. Sigo con el problema.

Quiza el problema se encuentra en el registro DTR, cuando hago depuracion los registros no se escriben como quiero para establecer las ganancias en el amplificador. Quiza estas pautas te puedan ayudar a solucionar tu problema.

 

1  Ten cuidado con la fase y la polaridad del reloj SCK.

2  Asegurate que el reloj este correctamente conectado en EDK.

3 Utiliza un IPCORE GPIO para asertar el bit de conversion del ADC ya que segun el manual spi, especifica que la asercion de un bit en el registro SS espieza la transmision una vez deshinibido el driver.

4 La conversion de los datos para el ADC, son complemento a 2 y ademas, ten en cuenta que el buffer de entrada puede contener datos que corresponden a el otro canal del adc.

5 Asegurate de estar ingresando un voltaje que no este fuera del rango de entrada del AMPLIFICADOR.

6 Por ultimo prueba si el sistema de hardware esta bien, puedes descargar un buen ejemplo de picoblaze con spartan 3e.

 

Bueno pues cualquier novedad o duda estamos en contacto,

 

Saludos Coordiales.

0 Kudos
celojan
Visitor
Visitor
5,665 Views
Registered: ‎02-07-2011

Un cordial saludo amigo. Pues al parecer nos encontramos en el mismo dilema. Lo mejor seria compartir un poco de codigo y de info. Estoy utilizando el IPCORE SPI v2.01a en modo maestro con 1 bit de selector de esclavo. Pues me diras por que solo 1, pues es simple el formato SPI de la senal ADV_CONV es diferente, se nececita una senal cuadrada, que si se generara con un SS (Selector de esclavo), la comunicacion se interrumpiera. No se si te ha pasado.

 

Bueno, para superar este problema he implementado un GPIO para generar la senal cuadrada adv_conv. En la imagen siguiente te muestro como he conectado los IPCORES.

conexion.jpg

0 Kudos
technovlsi
Explorer
Explorer
5,609 Views
Registered: ‎01-30-2011


@celojan wrote:

Un cordial saludo amigo. Pues al parecer nos encontramos en el mismo dilema. Lo mejor seria compartir un poco de codigo y de info. Estoy utilizando el IPCORE SPI v2.01a en modo maestro con 1 bit de selector de esclavo. Pues me diras por que solo 1, pues es simple el formato SPI de la senal ADV_CONV es diferente, se nececita una senal cuadrada, que si se generara con un SS (Selector de esclavo), la comunicacion se interrumpiera. No se si te ha pasado.

 

Bueno, para superar este problema he implementado un GPIO para generar la senal cuadrada adv_conv. En la imagen siguiente te muestro como he conectado los IPCORES.

conexion.jpg


sir, i want to do the same project in dsp platform.will i proceed according to the above pic or suggest me to successfully implement adc on spartan 3e with microblaze in dsp platform. thanks in advance

0 Kudos
celojan
Visitor
Visitor
5,584 Views
Registered: ‎02-07-2011

I think that yes, but remember that one embedded system envolves one or more component and you should have to determine the compatibility with this metod.

0 Kudos