Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Port Reading

2004-09-01 by Leighton Rowe

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?

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.