|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Motors and the High Port Numbers
Quote:
Generate_PWMs(pwm13, pwm14, pwm15, pwm16); every time you want them updated. They can glitch with interrupts, but I have never seen this happen personally. ![]() |
|
#2
|
|||
|
|||
|
Re: Motors and the High Port Numbers
I will try commenting out sections of the interupt code on monday, to see if I can locate the glitch, I'm also wondering if theres any chance of a conflict between cmuCam2's TTL input interfering with high port numbers for motors? We are generating the pwms each run through the code as you have written above, and it seems are problem with a slight twich is associated with the camera tracking or initializing, but I have yet to pinpoint what in it, and it seems no one else has had this problem yet...
|
|
#3
|
||||
|
||||
|
Re: Motors and the High Port Numbers
Quote:
-Kevin |
|
#4
|
|||
|
|||
|
Re: Motors and the High Port Numbers
Our lead programmer wrote his own PID code. In testing, nothing worked right using the high PWM ports. He used Generate_Pwms, too. When we moved the control to PWM 3 & 4, it started working. No worries, it only cost us a day...
|
|
#5
|
|||
|
|||
|
Re: Motors and the High Port Numbers
Check me but the lower PWM ports are controlled by the master proc. the high ones are software generated by the user proc. Interrupts are almost guaranteed to affect the upper PWM ports.
|
|
#6
|
|||||
|
|||||
|
Re: Motors and the High Port Numbers
We've had some wacky stuff happen on ports 13-16. I would recommend forgoing them altogether.
|
|
#7
|
|||
|
|||
|
Re: Motors and the High Port Numbers
So, if we are using encoders, which use interrupts, to control speed on the four high PWM ports, which are interrupt-sensitive, we aren't just shooting ourselves in the foot, but actually firing an M16 on full auto directly into our arch, right?
|
|
#8
|
|||||
|
|||||
|
Re: Motors and the High Port Numbers
Just say no to PWMS 13-16.
Never used them, never will. They seemed like a good idea at the time... ![]() |
|
#9
|
|||||
|
|||||
|
Re: Motors and the High Port Numbers
We've been using pwm16...
...for camera power. ![]() |
|
#10
|
|||||
|
|||||
|
Re: Motors and the High Port Numbers
Quote:
![]() |
|
#11
|
|||
|
|||
|
Re: Motors and the High Port Numbers
Quote:
|
|
#12
|
|||||
|
|||||
|
Re: Motors and the High Port Numbers
The servo power on the pwm output pins comes from the backup battery.
|
|
#13
|
|||
|
|||
|
Re: Motors and the High Port Numbers
If you run those pwms on interrupts, does anything go wrong?
How about high priority interrupts? Can the function run fast enough? |
|
#14
|
||||
|
||||
|
Re: Motors and the High Port Numbers
Quote:
I think the Pwm's 13-16 are hardware generated from pins called CCP1, CCP2,... I don't understand how these can be affected by the software? The values are in software but if the software is slow to execute then the value just won't change really fast. Last edited by 6600gt : 04-02-2006 at 22:33. |
|
#15
|
|||||
|
|||||
|
Re: Motors and the High Port Numbers
Quote:
Any interrupts, interrupt the software timing these pulse widths, but the software doing the timing doesn't know this. Just like none of your other regular code is ever aware an interrupt has occurred. So the software happily generates what it thinks is a neutral pulse of 1.5ms, but any interrupt handler that pops in, suspends the execution of your code, does it's thing, and returns control will extend or stretch the time of your pwm pulse by the amount of time it took to service that interrupt. So instead of a 1.5ms pulse, for example, you'll end up with a 1.8ms pulse. And your robot drives away. Last edited by Mark McLeod : 05-02-2006 at 09:33. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "Automatic Transmission" | Madison | Technical Discussion | 70 | 24-11-2003 09:03 |
| The use of motors and parts in Dean's wheelchair | archiver | 1999 | 4 | 23-06-2002 23:12 |
| Looking for practice motors & extra tape drive parts? | archiver | 2000 | 1 | 23-06-2002 22:54 |
| The scoop on the Jideco motors... | Joe Johnson | Motors | 3 | 30-01-2002 10:00 |
| "Motors and Drive train edition" of Fresh From the Forum | Ken Leung | CD Forum Support | 6 | 29-01-2002 12:32 |