Author |
Message |
Topic: pic18f46k22 counter using timer and interrupt |
miripek
Replies: 8
Views: 12416
|
Forum: General CCS C Discussion Posted: Wed May 30, 2012 2:00 am Subject: And if I change the internal code to: |
disable_interrupts ( GLOBAL );
setup_timer_0 ( RTCC_DIV_128 | RTCC_INTERNAL );
set_timer0 ( 61 );
enable_interrupts (INT_RTCC);
enable_interrupts (GLOBAL);
do{
output_low(pin_A0); output_ ... |
Topic: pic18f46k22 counter using timer and interrupt |
miripek
Replies: 8
Views: 12416
|
Forum: General CCS C Discussion Posted: Tue May 29, 2012 11:53 pm Subject: HERE IS THE FULL CODE - SO FAR |
I have to do a count - delay of 1 min, or 5 min, a delay that won't stop all program.
What is missing in my code?
#include <18f46k22.h>
#fuses INTRC_IO,NOMCLR,PUT,NOWDT,NOLVP
#use delay ... |
Topic: pic18f46k22 counter using timer and interrupt |
miripek
Replies: 8
Views: 12416
|
Forum: General CCS C Discussion Posted: Tue May 29, 2012 11:11 pm Subject: I tried to write this code |
output_high(pin_E1);
disable_interrupts(GLOBAL);
enable_interrupts(INT_TIMER1);
setup_timer_1 ( T1_INTERNAL | T1_DIV_BY_1 );
enable_interrupts(GLOBAL); ... |
Topic: pic18f46k22 counter using timer and interrupt |
miripek
Replies: 8
Views: 12416
|
Forum: General CCS C Discussion Posted: Tue May 29, 2012 8:13 am Subject: I use a ccs compiler |
What should be the code then? |
Topic: pic18f46k22 counter using timer and interrupt |
miripek
Replies: 8
Views: 12416
|
Forum: General CCS C Discussion Posted: Tue May 29, 2012 7:47 am Subject: pic18f46k22 counter using timer and interrupt |
Hi all!
I need some help - I need to write a counter of 20 sec,
I wrote this for the interrupt:
#include <18f46k22.h>
#fuses INTRC_IO,NOMCLR,PUT,NOWDT,XINST,LVP
#use delay( ... |
|