Forum Discussion
Altera_Forum
Honored Contributor
20 years agoSPI for nios
dear every1, i've been stuck with trying to tranfer data out the spi..i just dont know how to use it.i wanna use the alt_avalon_spi_command() but i just cant do it.i'm stuck witthe basic ...
Altera_Forum
Honored Contributor
20 years agofirstly.. is there any difference with the nios and niosii coding..
is the c coding suppose to be different ?? well.. i'm not sure if i'm doing it wrong.. basically i'm using the nios sdk to compiler the c code(nios-build). the changes i made was # define base 00x004A0 //Define SPI_base, less typing# define spi_cs 00x00470 //Define SPI_base, less typing btw, am i suppose to declare the dummybit,regbit,subregbit? and i'm new here.. so is the alt_32 or alt_8* portion of the code ment to be left alone , or changes need to be made.. i kinda dont understand the function of that... P/S can any1 attach or just copy paste the <altera_avalon_spi.c> and <altera_avalon_spi.h>..i dont know why i dont hv it in my nios installer.. i would like to see the content of it...i can hardly imagine how to use the alt_avalon_spi_command() thanks..urgent reply is gratefully appriciated..the deadline is killing me..http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif eddie