manrayap
Junior Member level 2
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.
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.