Go to Post Holy Orbit ball Batman!!!!!!!!!!:yikes: - yodameister [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 02-02-2005, 09:42
Anton's Avatar
Anton Anton is offline
Anton Povzner
#1581 (Element)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Israel
Posts: 51
Anton can only hope to improve
pwm definition problems

Each time I try using any pwm with index lower than 13 I get something like
'symbol pwm10 not found...' and I don't know what could it mean.
I tried using 'generate_pwms' but it says there are too much parameters.
If someone could explain the problem, it could really help me(I don't really like being limited to 4 motors).
Thanks
  #2   Spotlight this post!  
Unread 02-02-2005, 09:55
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: pwm definition problems

Anton,

Can you describe which file, and which function you are adding code to? (i.e. user_routine.c -> Default_Function)

I am also assuming you are using one of the default code packages provided this year.

Can you describe what modifications you made to the code?

The only thing that comes to mind is that you might be opening only the C file, and not the workspace file, meaning you might not have access to your other C files and headers. Maybe try opening the .mcp file first, and then open the C file through the workspace window and try again?

-SlimBoJones...
  #3   Spotlight this post!  
Unread 02-02-2005, 10:06
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,854
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: pwm definition problems

You could be missing a particular compiler flag.

In MPLAB go to:
Project -> Build Options... -> Project
then the MPLAB C18 tab
Look under "Marco Definitions" and you should see _FRC_BOARD

Missing this will cause the errors you describe, because the compiler thinks you are targeting the EDU controller which takes different arguments for the Generate_PWMs command, and it only has 8 PWMs.

If this is indeed the problem click on "Add.." and type in _FRC_BOARD.
Then re-build everything.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #4   Spotlight this post!  
Unread 02-02-2005, 10:42
Anton's Avatar
Anton Anton is offline
Anton Povzner
#1581 (Element)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Israel
Posts: 51
Anton can only hope to improve
Re: pwm definition problems

well, I'm sure I used the .mcp file(I mean, I wouldn't see the project tree if I hadn't, would I?)
I'm using the 2.2 code version(from ifirobotics.com), with minor difications to the default routine.c & .h
I thought that mabe I didn't use the generate_pwms properly, could you please explain how to use it?
  #5   Spotlight this post!  
Unread 02-02-2005, 13:01
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: pwm definition problems

Quote:
Originally Posted by Anton
well, I'm sure I used the .mcp file(I mean, I wouldn't see the project tree if I hadn't, would I?)
I'm using the 2.2 code version(from ifirobotics.com), with minor difications to the default routine.c & .h
I thought that mabe I didn't use the generate_pwms properly, could you please explain how to use it?
I believe the generate_pwms function handles only PWM outputs 13-16. All the other PWM outputs are handled elsewhere. PWM 13-16 are a little different from 1-12, in that there is explicit code to generate the PWM signals. For pwm 1-12, no such explicit code exists, and to us, those PWM signals are auto-magically generated.

Basically, you should never have to use generate_pwms with pwm outputs 1-12. Just do "pwm01=255;" and get out of the way =).

-SlimBoJones...
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
FYI about using PWM 13-16 with interrupts cabbagekid2 Programming 6 22-01-2005 00:54
Using an Operator Interface with the 2004 EDU RC wirelessly Dave Flowerday Robotics Education and Curriculum 34 19-04-2004 19:06
Fading LEDs using a PWM signal from the Edubot DanL Programming 22 30-03-2004 00:07
pwm 13-15 wayne 05 Programming 2 04-10-2003 12:08
PWM and burning out motors patrickrd Technical Discussion 7 19-06-2003 15:30


All times are GMT -5. The time now is 19:18.

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