Go to Post Continuous improvement turns good to great. Continuous tinkering can lead to inconsistent behavior and headaches. - IKE [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-01-2007, 03:37
fauxnominal fauxnominal is offline
Registered User
no team
 
Join Date: Jan 2007
Location: n/a
Posts: 7
fauxnominal is an unknown quantity at this point
pwms

hi all, i'm new to FIRST, but not programming.
i've read all the recommended reading as per mark mcleod and whatever else i could dig up online.

i know how to program in c and have a little bit of an idea as to how things work.

what i still don't understand is, does pwm<integer goes here> == pin<$1>?

i should also mention that i like to work under linux and know that the 2.4 compiler works under wine, but can i load the hex output into the robot using ifiloader in wine?

all help is appreciated.

cheers
  #2   Spotlight this post!  
Unread 10-01-2007, 03:46
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: pwms

Quote:
Originally Posted by fauxnominal View Post
hi all, i'm new to FIRST, but not programming.
i've read all the recommended reading as per mark mcleod and whatever else i could dig up online.

i know how to program in c and have a little bit of an idea as to how things work.

what i still don't understand is, does pwm<integer goes here> == pin<$1>?

i should also mention that i like to work under linux and know that the 2.4 compiler works under wine, but can i load the hex output into the robot using ifiloader in wine?

all help is appreciated.

cheers
I don't really understand the first question.

As for the second about ifiloader, sciguy125 wrote a linux port called IFI Loader Reloaded. http://www.chiefdelphi.com/forums/sh...ad.php?t=38853
__________________
1139 Alumni
  #3   Spotlight this post!  
Unread 10-01-2007, 03:47
Tureyhall Tureyhall is offline
Registered User
AKA: Thomas Hall
FRC #0668 (Apes Of Wrath)
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2004
Location: San Jose
Posts: 40
Tureyhall will become famous soon enoughTureyhall will become famous soon enough
Re: pwms

pwm01 is the first pwm 3-pin set. I don't know if that's what your looking for, but ok. A slightly better explanation would be nice.
__________________
/*Nerd Camouflage*/

2005 SVR - 668+1072+840 - Semifinalists.
2006 SVR - 668+1280+1693 - Finalists.
2007 SVR - 668+604+624 - Quarter-finalists, Xerox Creativity Award, two highest scores (290-2, 128-0) at SVR.
2007 Nat's - TBA.
  #4   Spotlight this post!  
Unread 10-01-2007, 04:25
fauxnominal fauxnominal is offline
Registered User
no team
 
Join Date: Jan 2007
Location: n/a
Posts: 7
fauxnominal is an unknown quantity at this point
Re: pwms

what i still don't understand is, does pwm<integer goes here> == pin<$1>?

that was really weird short hand for pwm01 == pin01?

it would be nice if there was some sort of chart that displayed all of that, not just for pwm outputs of the rc but of the camera, etc.
  #5   Spotlight this post!  
Unread 10-01-2007, 07:00
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: pwms

Quote:
Originally Posted by fauxnominal View Post
what i still don't understand is, does pwm<integer goes here> == pin<$1>?

that was really weird short hand for pwm01 == pin01?

it would be nice if there was some sort of chart that displayed all of that, not just for pwm outputs of the rc but of the camera, etc.
The PWMs pins are in a 3x16 row. Each column of 3 is one PWM. One pin is the ground, one is the power and one is the signal. If you have any questions dont hesitate to ask.
  #6   Spotlight this post!  
Unread 10-01-2007, 08:59
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: pwms

I think what your are asking is how to turn on a motor. Just setting the variable pwm01 will turn on (or off) the motor connected to the first pwm output. The reason all you need to do is set it is because that variable is returned to the master controller and it "writes" it to the register that turns on the motor.

In the default code its just set to the value from the joystick:
pwm01 = p1_y;

Note: to turn a motor off, set it to 127. Values less than 127 are reverse, values greater than 127 are forward. Its range is 0-255.

You can see all the variable you get for input and that you can set for output in the header file ifi_aliases.h

Brian
  #7   Spotlight this post!  
Unread 10-01-2007, 09:10
Robby's Avatar
Robby Robby is offline
Registered User
AKA: Kevin Beranek
FRC #0269 (Cooney Robotics)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Wisconsin
Posts: 47
Robby has a spectacular aura aboutRobby has a spectacular aura about
Re: pwms

For programming in linux you can also use picloader to flash the controller. It's available from sourceforge: http://sourceforge.net/projects/ifi-picloader. There's no gui with this, but you can use a text mode view with it if you use picloader_textmode.
  #8   Spotlight this post!  
Unread 11-01-2007, 09:07
charrisTTI charrisTTI is offline
Ramblin' Wreck
AKA: Charles Harris
FRC #0623
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Vienna, VA
Posts: 106
charrisTTI has a spectacular aura aboutcharrisTTI has a spectacular aura about
Send a message via AIM to charrisTTI
Re: pwms

Assigning a value to a PWM output is not the same as turning a digital output on or off. PWM<x> is a data variable in the block of data which is passed back to the master microprocessor. The master microprocessor handles the radio link and generating the motor signals (there is a way to directly control some of the motor signals, but lets not worry about that at this point). PWM stands for Pulse Width Modulated. The signal on the pwm pin is a stream of pulses at a frequency of about 50-55Hz. The width of the pulse varies between 750 us and 2250 us. A 127 value to the pwm variable generates a pulse width of 1500 us and the motor response to this no movement. A 0 value is full speed in one direction and 255 is full speed in the opposite direction.
__________________
FRC 623 2003,2004,2005,2006,2007,2008, 2009, 2010, 2011
FRC 1900 2007
FVC 60 and 193 2006
FVC 3271 2007
FTC 226 and 369 2008, 2009, 2010, 2011
FTC 3806 2010
  #9   Spotlight this post!  
Unread 12-01-2007, 04:38
fauxnominal fauxnominal is offline
Registered User
no team
 
Join Date: Jan 2007
Location: n/a
Posts: 7
fauxnominal is an unknown quantity at this point
Re: pwms

i think what i am confused about the most is how does all the wiring work?
i think code wise i am fine, but when it comes time to test the code, i'm going to have a lot of problems. where do i connect what to make interrupts work beyond the software abstraction?

thanks for all the responses thus far. they are much appreciated.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Good-looking PWMs: is it possible? Chriszuma Electrical 2 10-02-2006 00:25
PWMs Active in Programming Mode? ldeffenb Control System 4 14-01-2006 07:35
pwms for relays reilly Motors 3 18-02-2005 15:02
pwms 13 and 15 in autonomous mode Chris Bright Programming 1 24-02-2004 22:25
Mapping Buttons to PWMs actorindp Programming 9 10-02-2004 11:11


All times are GMT -5. The time now is 20:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi