vinodstanur
Advanced Member level 3
- Joined
- Oct 31, 2009
- Messages
- 751
- Helped
- 114
- Reputation
- 234
- Reaction score
- 114
- Trophy points
- 1,333
- Location
- Kerala (INDIA)
- Activity points
- 7,054
At first, let me tell that, am a beginner in PIC programming. Am using HTC PRO compiler.
I Have some doubts in C programming, i dont know asm.
In the below program,
#include <htc.h>
#define _XTAL_FREQ 4e6 // 4MHz
__CONFIG(0x3FFA);
void main()
{
TRISB=0x00;
TRISA=0xFF;
RB0=1; //STEP 1
__delay_ms( 30000 ); //DELAY ONE
RB0=0; //STEP 2
RB1=1; //STEP 3
__delay_ms( 30000 ); //DELAY ONE
RB1=0;
}
Is there any way to jump from DELAY ONE to STEP 3 while DELAY ONE is on its way (may be just started or just going to finish or any where in between 0 to 30 seconds) on giving a +trigger to any pin in the PIC.
I Have some doubts in C programming, i dont know asm.
In the below program,
#include <htc.h>
#define _XTAL_FREQ 4e6 // 4MHz
__CONFIG(0x3FFA);
void main()
{
TRISB=0x00;
TRISA=0xFF;
RB0=1; //STEP 1
__delay_ms( 30000 ); //DELAY ONE
RB0=0; //STEP 2
RB1=1; //STEP 3
__delay_ms( 30000 ); //DELAY ONE
RB1=0;
}
Is there any way to jump from DELAY ONE to STEP 3 while DELAY ONE is on its way (may be just started or just going to finish or any where in between 0 to 30 seconds) on giving a +trigger to any pin in the PIC.