Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Using the SPI core for external devices

Hello all,

As I read through the Peripherals handbook about the SPI core of Nios, I wonder if it is applicable to any external device which works by SPI. Something tells me that the SPI core has peculiarities that make it less general than I'd like to.

Has anyone used the Nios SPI core with Analog Devices' SPI-based temperature sensors and A2Ds ? What about EEPROMS (like AT25 ...) ?

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi eliben,

    yes it is possible to use it on another external device. Where I did my intermship we used it for communication with another device.... I rewrote it myself and it works perfectly http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif I think the Altera-function is not good for use...

    Cheers,

    Danny
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Has anyone used the Nios SPI core with Analog Devices&#39; SPI-based temperature sensors and A2Ds ? What about EEPROMS (like AT25 ...) ?

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=12310)</div>

    --- Quote End ---

    I&#39;ve interfaced to Analog Devices A2Ds and the AT25.. Not temp sensor yet.

    George
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I would recommand using PIO, instead of the altera SPI core. I have been using PIO to interface to serial eerom/flash. SPI is slow, it is easy to use / customize it in software. You can find some sample programs from vendors.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi @ all,

    I used PIO only for SPI-select on my external board. But all I had to do was to send commands to set registers...

    Cheers,

    Danny