View Single Post
  #13   Spotlight this post!  
Unread 12-02-2004, 10:09
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,856
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Problems reading io pins as a group

Quote:
Originally Posted by emusteve
Mark's post has the greatest similarity to mine in code structure. I wonder why PrintByte worked for him, but using PORTA to transfer a value to another variable doesn't seem to?

Steve
I originally ran:
Code:
unsigned char port_a;
 
port_a = PORTA & 0x0f;  /* mask off unused bits */
PrintByte(port_a);
to more closely emulate what you were doing. I simplified it to the minimum number of lines before posting.
This works as well, so it isn't an assignment problem.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle