--- Quote Start ---
originally posted by niceguylow@Dec 7 2005, 02:56 PM
hi there...i'm currently having problem of understanding the pin input pio....
my nios is connected to the 16 bits pio pin in the development board...how to write a c code to retrieve the inputs from this pio..
since this inputs are in binary, do i need to convert to decimal or the system itself will convert for me in c language.
thnaks and regards
wayne
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11393)
--- quote end ---
--- Quote End ---
You can try using the PIO functions made available by Altera... like the one used in the count_binary example of the HAL...
The numbers you'll read from the PIO have to be interpreted as a set of bits inside a 32-bit integer... For example, if you have a 2 bit PIO, you'll end up having the 2 bits valies inside the 2 less significant bits of the integer you read from the peripheral.
bye
Paolo