CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Delay_uS Errors

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ForceField



Joined: 26 Sep 2004
Posts: 1
Location: NW England

View user's profile Send private message

Delay_uS Errors
PostPosted: Sun Sep 26, 2004 4:12 am     Reply with quote

Beware of errors in the Delay_uS function .

Fixed but not mentioned in Ver 3.210. so if you recompile old code you might have timing problems if you have tweaked timing loops.

Prior to 3.210 with 4MHZ clock

Delay_us(764) Gives 764uS
Delay_us(766) Gives 731uS
Delay_us(767) Gives 612uS
Delay_us(768) Gives 733uS

Ver 3.210 with 4MHZ clock

Delay_us(764) Gives 764uS
Delay_us(766) Gives 765uS
Delay_us(767) Gives 766uS
Delay_us(768) Gives 765uS

As you can see if you were using 764us their is no problem but 767us has a 155uS error in versions prior to 3.210.

No doubt there are other values that would give problems and also that other clock frequencies would produce different results.


I used the Stopwatch in Mplab with a Break Point before and after the Delay to check the timing.

Geoff
Guest








PostPosted: Sun Sep 26, 2004 11:11 am     Reply with quote

3.191 An accuracy problem in the delay functions is fixed
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group