View Single Post
  #9   Spotlight this post!  
Unread 15-01-2004, 00:24
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Trouble with pwm outputs

Quote:
Originally Posted by Just3D
Notice the ampherstand (&). This will tell printf to read the value of pwn02 rather than the memory address of pwn02
Correct me if I'm wrong but from my knowledge of C syntax and printf() the & would cause printf() to read the address of the variable, not the value. If you are working with a pointer (which you are not in this case) you would use * to access the value, not &. Unless in a function declaration (or in a binary/logic statement) & always references the address of a variable.

Still, I could be wrong with the C18-based printf() library, you never know...
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic