View Single Post
  #1   Spotlight this post!  
Unread 15-09-2005, 22:38
astro1652's Avatar
astro1652 astro1652 is offline
Registered User
FRC #1652 (Team Overdrive)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Kenosha
Posts: 2
astro1652 is an unknown quantity at this point
Question Addressing I/O in Sections

I was wondering if it is possible to address sections of the I/O of the RC all at once. For example, I have a parallel LCD which uses 8 I/O lines for data. Thus, I want 8 pins of the I/O to be assigned either high or low at the same time instead of addressing them individually.

Code:
LCD_port = 5;
Assuming you can assign LCD_port a number of I/O pins, then telling it to assign 5 would turn on pins (bits) 0 and 2 (5 in binary is 101).

Is there anyway to do this that I am unaware of? Similarly, can I access just the upper and lower half of an unsigned int somehow? Please pardon me if these sound like n00b questions, as I am certainly a beginner in the C language.