Mar 6, 2010 #1 M 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.
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.
Mar 6, 2010 #2 cool.man Full Member level 6 Joined May 29, 2008 Messages 323 Helped 42 Reputation 84 Reaction score 29 Trophy points 1,308 Location Earth Activity points 3,307 Why you are not going to use built-in functions,this would be easy for you. how much delay you want to generate?
Why you are not going to use built-in functions,this would be easy for you. how much delay you want to generate?
Mar 7, 2010 #3 M 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, 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.
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.