Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

how to use the spi interface?

Altera_Forum
Honored Contributor II
1,482 Views

I have some problems about the writing of driver of spi interface? 

I use the nios_apex_20k200 board ,because there are no example of the spi diver  

so I can't make it ,I want to know how to write the driver of it . 

I use it to drive a adc 

thank you so much !!! 

my email is wreadlee@hotmail.com 

please give me the mail
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
521 Views

I am developing spi C code for a 24 bit serial DAC. 

 

I would like to see dedicated IP for serial DACs and ADCs. Using SPI looks doable but the 24 bit stuff is a challange. I had Max+II logic in schematic form but would like to see vhdl or verilog for standard parts. 

 

I found these files useful ... 

 

C:\altera\kits\nios2\components\altera_avalon_spi\HAL\src\altera_avalon_spi.c 

C:\altera\kits\nios2\components\altera_avalon_spi\HAL\inc\altera_avalon_spi.h  

C:\altera\kits\nios2\components\altera_avalon_spi\inc\altera_avalon_spi_regs.h 

C:\altera\kits\nios2\components\altera_avalon_spi\sdk\spi_struct.h
0 Kudos
Altera_Forum
Honored Contributor II
521 Views

Standard parts like? 

 

If you're talking simple stuff like muxes, shift regs, etc.... then try the templates in quartus / maxplus (that's the recommended way to implement on Altera devices)
0 Kudos
Altera_Forum
Honored Contributor II
521 Views

 

--- Quote Start ---  

originally posted by eskotek@Aug 16 2004, 03:29 PM 

i am developing spi c code for a 24 bit serial dac. 

 

i would like to see dedicated ip for serial dacs and adcs. using spi looks doable but the 24 bit stuff is a challange. i had max+ii logic in schematic form but would like to see vhdl or verilog for standard parts. 

 

i found these files useful ... 

 

c:\altera\kits\nios2\components\altera_avalon_spi\hal\src\altera_avalon_spi.c 

c:\altera\kits\nios2\components\altera_avalon_spi\hal\inc\altera_avalon_spi.h  

c:\altera\kits\nios2\components\altera_avalon_spi\inc\altera_avalon_spi_regs.h 

c:\altera\kits\nios2\components\altera_avalon_spi\sdk\spi_struct.h 

--- Quote End ---  

 

could you give the document of spi ? 

what i use now is niosI ,so there are no copy of that ,thank you for giving me the doc!
0 Kudos
Reply