Go to Post If you are content with where you are, you have celebrated the right things. If not, perhaps it is time to reconsider... what’s most important to you. - StephLee [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 22-08-2007, 14:51
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,113
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: servo PWM sampling-what Fosc should I use?

Quote:
Originally Posted by 3dude_2231 View Post
if a 4MHz = 1MHz internal clock,
so with a 1:1 prescaler I should get 1 sample every 1 mS.
if I'm correct, a servo's pulse is between 0.9mS and 2.1 mS,
meaning I need something quicker, am I correct?
You've got the right idea, but the wrong numbers.

First correction: a standard hobby servo signal has a pulse width that varies from 1 to 2 milliseconds. If you want to measure that range with eight bits of precision, you'll need a resolution of 256 counts per millisecond.

Second correction: with the clock running at 1MHz, each cycle is one microsecond. That's almost four times as fast as the task requires. If the processor you're using can measure pulses using the raw clock speed, you'll be fine with a 4MHz crystal.

(If you're indeed using a different servo standard with only a 200 microsecond range from end to end, a 1MHz clock will still give you more than 7 bits of resolution.)
 


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
What program should I use for website design? radioshackkid Website Design/Showcase 35 03-02-2007 22:12
Trying to use a new servo team1500 Electrical 1 20-02-2006 21:27
What size breaker should I use for the RC? Excelsior Electrical 4 18-01-2006 07:34
Did you use Auto Servo Mode? Greg Marra Programming 8 27-04-2005 15:35
What Motors Should I Use? dddriveman Motors 20 16-07-2003 21:19


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

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