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 CCS Technical Support

RTOS and clock ...

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



Joined: 07 Dec 2005
Posts: 10
Location: Italy

View user's profile Send private message

RTOS and clock ...
PostPosted: Wed Dec 07, 2005 4:46 am     Reply with quote

I have a question: there is a minimum clock rate to use a rtos built in functions?

I'am using a PIC18F2525 and an external clock of 8MHz in EC mode, because i need the FOSC/4 for an external A/D converter.. I have no problem for the other function, but if i try to use tasks the chip seems dead... I wrong something? The clock is too slow?
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Wed Dec 07, 2005 2:47 pm     Reply with quote

Quote:

I have a question: there is a minimum clock rate to use a rtos built in functions?


Yes the clock seems too low for use a rtos built in functions, (the compiler would complain) at least if you are using timer0. A trick is to change to timer1.


Humberto
bernardinim



Joined: 07 Dec 2005
Posts: 10
Location: Italy

View user's profile Send private message

RTOS and clock
PostPosted: Fri Dec 09, 2005 9:19 am     Reply with quote

I tried to use timer0 in 16bit mode, with no prescaler ... but nothing
why the trick is to use Timer1 ?
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Dec 09, 2005 10:51 am     Reply with quote

Quote:

I tried to use timer0 in 16bit mode, with no prescaler ... but nothing
why the trick is to use Timer1 ?


For the same reason. Timer0 is 8 or 16 bit timer/counter software selectable. After Power_on Reset (default mode) is configured as 8 bit. (T0CON.T08BIT = 1 )
I (we ?) doesn't know how CCS implement itīs hidden built in rtos functions and by far also doesn't know how Timer0 was configured.
Suggesting to use Timer1 instead of Timer0 was a "trick" I used to do to get running the rtos with a 16F877 @20Mhz where Timer0 is 8 bit only.

#use rtos(timer=0,minor_cycle=100ms)
#use rtos(timer=1,minor_cycle=100ms)

Humberto
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