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

PCD Assembler Error?

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







PCD Assembler Error?
PostPosted: Tue Jul 01, 2008 11:20 pm     Reply with quote

For a PIC24HJ64GP210 I used the latest CCS Compiler version 4.071.
I used this code to set a timer:
Code:
set_timer1 (TMR_INTERNAL | TMR_DIV_BY_8);

It works OK.

When I used this
Code:
set_timer1(TMR_INTERNAL | TMR_DIV_BY_64);

the timing is totally out.

The assembler memonics code looks OK.

Has anyone come across similar issue?

Teddy,
dew
Guest







PostPosted: Sun Aug 23, 2009 8:30 am     Reply with quote

same CCS Compiler version 4.084

TMR_DIV_BY_1 and TMR_DIV_BY_8 work

TMR_DIV_BY_64 and TMR_DIV_BY_256 not work(can not SET_TIMERX(XXXXX))
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Aug 23, 2009 1:01 pm     Reply with quote

Seems like you confused set_timer1() and setup_timer1()!
It doesn't make sense at all to write a mode constant as timer value.
Code:
set_timer1(TMR_INTERNAL | TMR_DIV_BY_64);

Useful timer function calls are:
Code:
setup_timer1(mode,period);
set_timer1(value);
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