Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top