View Single Post
  #4   Spotlight this post!  
Unread 13-01-2004, 18:41
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: Trouble with pwm outputs

Quote:
Originally Posted by misterikkit
I don't think it was a problem with the printf() function. We were trying to cast an int as an unsigned char, in order to be able to properly work with the pwm outputs. The variable pwm02 is #define'd to txdata.rc_pwm02, which is an unsigned char.
It wasn't clear from your response if you tried my suggestion or not. I went through similar machinations trying to get a printf to work, and casting within the printf was the only way that would work for me. (BTW, I eventually tried it that way because I noticed that that was the way the default program did it.)
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me