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

problems with timer1

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







problems with timer1
PostPosted: Tue Sep 11, 2001 8:19 am     Reply with quote

Hallo together,

I am beginning to work with PICs, therefore I have very easy questions to you.
PIC: 16C62A

I try to program timer1, but the timer1_isr is never starting.

First I init timer1:
tmr1l =0x00;
tmr1h =0x00;
t1con = 0b00110000;

Then I enable the interrupts:
ENABLE_INTERRUPTS (GLOBAL);
ENABLE_INTERRUPTS (INT_TIMER1);

Perhaps you can help, and tell me what is missing/wrong.
Thanks in advance.

Andreas
___________________________
This message was ported from CCS's old forum
Original Post ID: 241
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: problems with timer1
PostPosted: Tue Sep 11, 2001 12:25 pm     Reply with quote

:=I am beginning to work with PICs, therefore I have very easy questions to you.
:=PIC: 16C62A
:=I try to program timer1, but the timer1_isr is never starting.
:=First I init timer1:
:= tmr1l =0x00;
:= tmr1h =0x00;
:= t1con = 0b00110000;
:=
:=Then I enable the interrupts:
:= ENABLE_INTERRUPTS (GLOBAL);
:= ENABLE_INTERRUPTS (INT_TIMER1);
-------------------------------------------------------------

You are writing code as if you have Hi-Tech C, where
PIC peripherals have to be handled by low-level code.

But with CCS, you have high-level C functions to handle
these things. For example, CCS has these functions:

setup_timer_1(mode);
set_timer1(value);

These are describe in the manual, and if you look
in the folder for \PICC\Examples, you will see these
files, which show how to do it:
EX_FREQC.C
EX_PATG.C
EX_SPEED.C
___________________________
This message was ported from CCS's old forum
Original Post ID: 242
Gabriel Caffese
Guest







Re: problems with timer1
PostPosted: Sat Jun 22, 2002 10:30 am     Reply with quote

PCM Programmer,
I havenīt got the Freqc and the Speed examples. Where can I download them from ? (cause can not do it from the CCS web site.)

Gabriel.-

:=:=I am beginning to work with PICs, therefore I have very easy questions to you.
:=:=PIC: 16C62A
:=:=I try to program timer1, but the timer1_isr is never starting.
:=:=First I init timer1:
:=:= tmr1l =0x00;
:=:= tmr1h =0x00;
:=:= t1con = 0b00110000;
:=:=
:=:=Then I enable the interrupts:
:=:= ENABLE_INTERRUPTS (GLOBAL);
:=:= ENABLE_INTERRUPTS (INT_TIMER1);
:=-------------------------------------------------------------
:=
:=You are writing code as if you have Hi-Tech C, where
:=PIC peripherals have to be handled by low-level code.
:=
:=But with CCS, you have high-level C functions to handle
:=these things. For example, CCS has these functions:
:=
:=setup_timer_1(mode);
:=set_timer1(value);
:=
:=These are describe in the manual, and if you look
:=in the folder for \PICC\Examples, you will see these
:=files, which show how to do it:
:=EX_FREQC.C
:=EX_PATG.C
:=EX_SPEED.C
:=
___________________________
This message was ported from CCS's old forum
Original Post ID: 5129
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