View Single Post
  #2   Spotlight this post!  
Unread 05-02-2007, 13:46
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Didn't Like Digital Handling

You're likely to cause great confusion by redefining things that everyone else programming the robots in MicroChip C understands in a specific way. I suggest instead that you leave the existing #defines alone and create your own aliases for your own use, like this:

Code:
/* Digital input aliases that evaluate to 0 when the input is open and 1 when grounded by a switch. */
#define rc_sw01     !(PORTBbits.RB2)
#define rc_sw02     !(PORTBbits.RB3)
#define rc_sw03     !(PORTBbits.RB4)
...