Coding in CCS to generate delay using timer

Status
Not open for further replies.

manrayap

Junior Member level 2
Joined
May 17, 2001
Messages
23
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,283
Location
Msia
Activity points
73
Hi,

Here the example of C18 MPLAB compiler code to generate delay using timer 0:

Void Delay()
{ T0CON=0x08;
TMR0H=0x35;
TMR0L=0x00;
T0CONbits.TMR0ON=1;
while(INTCONbits.TMR0IF==0);
T0CONbits.TMR0ON=0;
INTCONbits.TMR0IF=0;
}

I want to write the same code using CCS compiler without using built in function. Hope somebody can help me. Thanks.
 

Why you are not going to use built-in functions,this would be easy for you.
how much delay you want to generate?
 

Hi,

I want to know how to write program using CCS to access SFR and configure SFR bit. Built-in function just give us in general on using PIC timer,ADC,PWM etc. Thanks.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…