When reading bits 16:23 of I/O Port1 into a byte variable, I'd normally do something like this... unsigned char Variable; Variable = (IO1PIN >> 16)& 0xff; I'm thinking of instead using a character pointer to access bits 16:23 (speeds up execution time). Variable = *Read_ptr; //where (unsigned char*)Read_ptr --> IO1PIN (bit 16:23) If this is possible, I'm not sure on the partial memory location that I must set the pointer to. Are the pin values for the IO1PIN register stored in little or big endian order?
Message
Port Reading
2004-09-01 by Leighton Rowe