Forum Discussion

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

Question about NIOS II and DE0-Nano

Hi all,

What NIOS II CPU and on-chip memory should i use if all i want to do it blink some LEDs?

3 Replies

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

    first of all, your English is broken.

    therefore I may miss your point.

    but I want to help you.

    - you want to blink LEDs.

    - you want to use NiosII.

    - you don't know which NiosII should you use.

    according to DE0-nano.

    it has 32MByte SDRAM.

    so you don't have to use on-chip memory, you can use SDRAM memory.

    I think DE0-nano board has CD(or something).

    it may contain basic project.

    can you check it out?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    In the CD-ROM comes along with DE0-Nano, there is a "demonstration" folder. In side that you can find "myfirst_niosii" folder. It contains all the Quartus Project + Software for LED demo. Just open the project in Quartus, SOPC or Qsys and Nios II IDE or SBT. The example project blinks the LED using the Nios II Processor.

    The Example Application uses the On-Chip RAM and the 'C' application just prints "Hello from Nios II" and start incrementing the LEDs.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hi,

    first of all.

    your English was not wrong.

    I'm sorry for that.

    does your SOPC have PIO(Peripheral I/O)?

    and, is that connected to LEDs?

    then what you have to do is writing C-code. like ...

    //------------------------------------------------------------------

    # include <stdio.h>

    # include <io.h>

    # include "system.h"

    int main()

    {

    // PIO_BASE is the address of PIO which is declared in system.h

    // 0x01 will be condition of LEDs, LED[0] will be lit.

    IOWR_8DIRECT(PIO_BASE,0,0x01);

    }

    //------------------------------------------------------------------

    since, I don't know abaout DE0-nano boards information.

    I can not answer to your question exactly.

    if you have problem, ask me again.

    bye bye.