Go to Post ...I've changed my position. I'm fully supportive of Joe's suggestion... - Chris Hibner [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-11-2005, 04:03
BorisTheBlade's Avatar
BorisTheBlade BorisTheBlade is offline
lead programmer 2004
AKA: Dane
FRC #1351 (TKO)
Team Role: Mentor
 
Join Date: Oct 2005
Rookie Year: 2004
Location: San Jose, Ca
Posts: 23
BorisTheBlade has a spectacular aura aboutBorisTheBlade has a spectacular aura aboutBorisTheBlade has a spectacular aura about
Send a message via AIM to BorisTheBlade
programming motors with programming kit

just curious I must be doing something wrong or something but I'm trying to teach our new members how to program and I tried just going into the default routine and just setting the motor to full forward like this:
Code:
pwm01 = 255;
then when I download it it does nothing is this not the way to do it anymore? Back when I was using the EDU bot 2 years ago this always worked just fine. could really use some help on this one. thanks
__________________
Team 1351 TKO Robotics (click for our website)
2007 sacramento regional Johnson & Johnson Sportsmanship Award winners
2007 CAL Games Finalists
Reply With Quote
  #2   Spotlight this post!  
Unread 01-11-2005, 10:23
billbo911's Avatar
billbo911 billbo911 is online now
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,361
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: programming motors with programming kit

Quote:
Originally Posted by BorisTheBlade
... I tried just going into the default routine and just setting the motor to full forward like this:
Code:
pwm01 = 255;
could really use some help on this one. thanks
I was unable to get of my own code to work until I changed one particular section. This is in the "user_routines.c" near line 193.

In the following code, you define who controls the PWM, the USER or the MASTER PIC. You will have to write the code for generating PWMs if you want the USER to to control them. ( For seriously custom code )
Code:
/* SEVENTH: Choose which processor will control which PWM outputs. */
  //Setup_Who_Controls_Pwms(MASTER,MASTER,MASTER,MASTER,MASTER,MASTER,MASTER,MASTER);
  Setup_Who_Controls_Pwms(USER,USER,USER,USER,USER,USER,USER,USER);
If you have not changed this, the USER will be controlling the PWMs and your code will not. Change these lines according to what you want to control and your code should work.

Last edited by billbo911 : 01-11-2005 at 11:23.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-11-2005, 16:44
BorisTheBlade's Avatar
BorisTheBlade BorisTheBlade is offline
lead programmer 2004
AKA: Dane
FRC #1351 (TKO)
Team Role: Mentor
 
Join Date: Oct 2005
Rookie Year: 2004
Location: San Jose, Ca
Posts: 23
BorisTheBlade has a spectacular aura aboutBorisTheBlade has a spectacular aura aboutBorisTheBlade has a spectacular aura about
Send a message via AIM to BorisTheBlade
Re: programming motors with programming kit

cool thanks alot I'll give it a try!
__________________
Team 1351 TKO Robotics (click for our website)
2007 sacramento regional Johnson & Johnson Sportsmanship Award winners
2007 CAL Games Finalists
Reply With Quote
  #4   Spotlight this post!  
Unread 01-11-2005, 18:41
Morenoh149
 
Posts: n/a
Re: programming motors with programming kit

just clearing up. Is this right?
Quote:
Code:

/* SEVENTH ...
Setup_Who_Controls_Pwms(USER,USER,USER,USER,USER,U SER,USER,USER);
Reply With Quote
  #5   Spotlight this post!  
Unread 01-11-2005, 19:03
billbo911's Avatar
billbo911 billbo911 is online now
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,361
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: programming motors with programming kit

Quote:
Originally Posted by Morenoh149
just clearing up. Is this right?
I'm working from memory here, I won't bet my pay check on what I am about to say, but I believe I am correct.

You will need to set that line to:
Code:
Setup_Who_Controls_Pwms(MASTER,MASTER,MASTER,MASTER,MASTER,MASTER,MASTER,MASTER)
This will cause the master processor to handle the PWM signal generation. If left at the value from the default code:
Code:
Setup_Who_Controls_Pwms(USER,USER,USER,USER,USER,USER,USER,USER);
then the user processor would have to generate the PWM signals. This means that you have to write the code yourself that will tell the user processor how PWMs should be created.
BTW, If I'm not mistaken, this line will also allow you to mix both USER and MASTER for the various PWM outputs. Thereby, having complete control over certain PWMs while allowing the master processor control the output of others.
Reply With Quote
Reply


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
Programming Vex Starter Kit To Recieve From Serial Port firetrap FIRST Tech Challenge 0 26-09-2005 17:27
Q&A Discuss: How many Van door motor(s) come with the kit? CD47-Bot Extra Discussion 1 08-01-2003 11:07
Looking for practice motors & extra tape drive parts? archiver 2000 1 23-06-2002 22:54
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32
Drill Motors TF8 Motors 19 12-12-2001 13:13


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

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