View Single Post
  #3   Spotlight this post!  
Unread 16-01-2008, 02:36
ay2b's Avatar
ay2b ay2b is offline
Registered User
AKA: Andy
FRC #2928
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 1994
Location: Seattle, WA
Posts: 211
ay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant future
Re: Ever use a helicopter heading hold gyro before?

Quote:
Originally Posted by Mr.G View Post
All sounds good, but you can't read in PWM with the controller. Have looked into it ourselves though.
You can read a PWM signal, but it's a little tricky. You'll need to use one interrupt pin and a timer. When the input signal goes high, that'll trigger an interrupt. Start the timer. When the input signal goes low, that'll trigger another interrupt. Stop the timer. The PWM value is the timer value. Of course, you'll have to make sure you choose appropriate values for the timer. The PWM signal will give you a high bit that ranges from approximately 1.0 ms to 2.0 ms.

On the other hand, if you don't actually care what the value of the PWM signal is, you just want to "copy" it to an output PWM signal, you could just have an interrupt on the input PWM signal, and toggle your output pin. You would not need to use a timer at all.
__________________

2011 - SD Quarterfinalists (980), LA Quarterfinalists (980)
2010 - LA (2404) Finalists (980), AZ Motorola Quality (980)
2009 - LA Semifinalists (980); Las Vegas Quarterfinalists (980); SD (2404); IRI #1 Seed, Finalist (980)
2008 - SD Quarterfinalists (980), LA Champions (980), LA Rookie Inspiration Award (2404); CalGames Finalists
2007 - So.Cal Finalists (980), SD Quarterfinalists (980); CalGames Finalists
2006 - So.Cal Regional Champion (4), Toronto Judge's Award Day 1 (4)
2005 - SVR Champions, Delphi "Driving Tomorrow's Technology" (980); AZ Xerox Creativity (980); So.Cal Finalists, RadioShack Innovation in Control (980); Championship Archimedes Division Semifinalists; IRI Finalists (980)
2004 - So.Cal Regional Champions, Leadership in Controls (980); AZ GM Industrial Design (980); Championship Galileo Division #2 Seed; IRI Champions
2003 - PNW Semi-finalists (488)
2002 - PNW Finalists (488)
2000 - X-bot / 488 - Mentor / Founder
1994 - Sunny Delight - Driver - champion

Last edited by ay2b : 16-01-2008 at 11:36. Reason: typo