- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hi, I want to read a signal from a PIN.
Everything ist fine I built it up in the SOPC Builder and declare a 8bit for Input. I chose 8Pins in Quartus and everything wotks fine. I can write Output to other Pins and it works also fine. But now I want to read a Pin if it 1 or 0. int in = IORD_ALTERA_AVALON_PIO_DATA(PIO_IN_BASE); printf("%i\n",in); Always they console print me 255. It doesen´t matter which PIN is on 3,3V from the Board. What I do wrong?? thx everybody for help.Enlace copiado
4 Respuestas
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hi,maybe i ask my question in another way.
What must i normally do when i want to read an input pin. In the SOPC Builder I chose an 8bit wide input. The Pins are correct connected in the Pin planner. The Quartus II Software runs correct and I have communication with the Nios II Prozessor. What must i normally do when i want to read an input pin now??- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
IT looks like you are doing everything right. Using signaltap you can check the actual value of the 8-bti signal that you provide to the PIO, and verify that it is the value you set the pins to.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
And if your pins are defined as inputs with weak pull-ups (which is the default on most devices) then they will read 1 unless you connect them to ground. Connecting them to Vccio won't change their value.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
You are right.I did everything right but the only problem is I did`t put them on Ground. Now it works thx a lot Daixiwen. (http://www.alteraforum.com/forum/member.php?find=lastposter&t=35770)
Problem solved!
Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla