Go to Post "No wheels, no problem, we can fix it in programming." - clean399 [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 03-10-2007, 11:57
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: pwm signal delay

Quote:
Originally Posted by 3dude_2231 View Post
...where is the code that handles the pwm signals?
well, our team's camera servos are tweeching,
and I suspect it may be caused by irregulations in the pwm signal.
If you're using PWMs 13-16, your suspicion is justified. It isn't a matter of time delay between PWM pulses, though. It's the width of the PWM pulse itself that makes it happen.

The last four PWM signals are generated by the user CPU. The default code does not deal with interrupts perfectly, and the pulse width can sometimes be longer than desired when serial port and wheel encoder interrupts occur. Kevin Watson wrote some code to correct the jittery behavior, which you can find here:

http://www.kevin.org/frc/frc_pwm.zip

There is still some occasional twitchiness with Kevin's code when writing EEPROM. It doesn't affect normal robot operation, and I haven't taken the time to figure out whether it's due to interrupts being disabled briefly or some other cause.

The code for PWMs 1-12 runs in the master CPU, and is not usually a problem. If you're seeing twitchy camera servos connected to one of those signals, you are probably getting interference from the serial data signal. Try rerouting the wires to keep the servo and serial data physically separated.
 


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
Digital out signal speed on off, almost like PWM but at max 60Hz Generalx5 Electrical 2 27-03-2007 12:26
PWM Signal Noise? Danny Diaz Electrical 3 28-01-2007 17:02
Delay Gal Longin Programming 1 09-12-2004 10:37
Fading LEDs using a PWM signal from the Edubot DanL Programming 22 30-03-2004 00:07
Loss of signal in PWM cables. archiver 2001 6 23-06-2002 23:29


All times are GMT -5. The time now is 10:00.

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