![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
Andreas Klittich Guest
|
problems with timer1 |
Posted: Tue Sep 11, 2001 8:19 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: problems with timer1 |
Posted: Tue Sep 11, 2001 12:25 pm |
|
|
:=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 |
|
![](templates/subSilver/images/spacer.gif) |
Gabriel Caffese Guest
|
Re: problems with timer1 |
Posted: Sat Jun 22, 2002 10:30 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|