|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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
|
||||
|
||||
|
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
|
||||
|
||||
|
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? |
|
#4
|
||||
|
||||
|
Re: pwm definition problems
Quote:
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... |
|
#5
|
|||||
|
|||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |