Altera_Forum
Honored Contributor
19 years agoReading from an 8 Bit Component
Hi,
I connected the Nios to an 8 bit custom component. When I read from a register which contains a 1 as the most significant bit, i.e. all values from 0x80 to 0xFF, the remaining 24 bits get filled up with 1's. For example reading the value 0x70 residing in one of the component's registers gives the value 0x00000070 to the variable I'm saving it to. But reading 0x80 gives the value 0xFFFFFF80. So I guess the values are treated as signed values, which would explain why it fills the remaining bits with 1's. But how can I prevent that? Thanks in advance