P
Pubudu
Hi,
I am a beginner with PIC projects. I am using 16F877A with a 20 MHz
oscillator. This is a example of what I want to do. suppose there are
two activities.
1. Blink a LED once a second.
2. Read the status of a line continously. (I dont want to use
interrupts right now)
E.g.
While (1)
{
x := Read_input(RA.0)
if x = 1 then
{
...................
..................
}
else
{
......................
..................
}
Write_output(RB.1,1);
Delay_ms(500);
Write_output(RB.1,0);
Delay_ms(500);
}
This process is controlled by the dealy loop. Thus it is not reading
the read line continuously.
How can I do this ?. I need to run those two indipendantly.
In desktop programming we use something called threads. Is there any
possibility to use such thing here ? Please let me know.
Pubudu
I am a beginner with PIC projects. I am using 16F877A with a 20 MHz
oscillator. This is a example of what I want to do. suppose there are
two activities.
1. Blink a LED once a second.
2. Read the status of a line continously. (I dont want to use
interrupts right now)
E.g.
While (1)
{
x := Read_input(RA.0)
if x = 1 then
{
...................
..................
}
else
{
......................
..................
}
Write_output(RB.1,1);
Delay_ms(500);
Write_output(RB.1,0);
Delay_ms(500);
}
This process is controlled by the dealy loop. Thus it is not reading
the read line continuously.
How can I do this ?. I need to run those two indipendantly.
In desktop programming we use something called threads. Is there any
possibility to use such thing here ? Please let me know.
Pubudu