w_bwr
Member level 3
- Joined
- Feb 4, 2010
- Messages
- 66
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Karachi, Pakistan
- Activity points
- 1,810
I am using PIC 18f452 and CCS compiler with its built in RTOS, which is not Pre-emptive.
I just want to increase the count on the GLCD when a button is pressed. I have written the code and it works fine.
But if I press the button continuously, it misses some inputs. I want to make it smooth and need help doing that.
Here is the code:
There are others tasks running too! their frequency is:
I just want to increase the count on the GLCD when a button is pressed. I have written the code and it works fine.
But if I press the button continuously, it misses some inputs. I want to make it smooth and need help doing that.
Here is the code:
Code:
#use rtos(timer=0, minor_cycle=100ms)
#task (rate=500ms, max=10ms)
void Button()
{
if (!input(PIN_A4))
{
dt_lcd_gotoxy(100,2);printf(dt_lcd_printchar,"%Lu",timer0);
timer0++;
}
}
There are others tasks running too! their frequency is:
Code:
#task (rate=500ms, max=10ms)
void Sel_ADC_Channel()
#task (rate=100ms, max=40ms)
void Get_voltage()
#task (rate=1s, max=100ms)
void Update LCD()