sts_it
Newbie level 1

Hi.
I am currently using Keil compiler with a at89S8253. I am using a co-operative scheme present in the book: Pattern For Time-Triggered Embedded Systems.
I have encountered a major problem. I have two tasks, one task executes every second and updates the LCD. The other task reads the ADC value (SPI). The call tree is:
- Dispatcher (calls task through a function pointer) -----> Task0 --> LCD routines
- Dispatcher -----> Task1 --> SPI Routine.
The SPI routine declares a global variable UINT16 ADC_VAL and writes this variable with the current adc value.
In task0 I declare the ADC_VAL as and extern. Problem is only reads the initialization value of ADC_VAL, say, if i declares UINT16 ADC_VAL=7, then it would print "7" in the LCD.
However if i print the ADC_VAL from within task1 (outside the SPI routine) it works fine.
Does anyone have a clue what's happening?
I am currently using Keil compiler with a at89S8253. I am using a co-operative scheme present in the book: Pattern For Time-Triggered Embedded Systems.
I have encountered a major problem. I have two tasks, one task executes every second and updates the LCD. The other task reads the ADC value (SPI). The call tree is:
- Dispatcher (calls task through a function pointer) -----> Task0 --> LCD routines
- Dispatcher -----> Task1 --> SPI Routine.
The SPI routine declares a global variable UINT16 ADC_VAL and writes this variable with the current adc value.
In task0 I declare the ADC_VAL as and extern. Problem is only reads the initialization value of ADC_VAL, say, if i declares UINT16 ADC_VAL=7, then it would print "7" in the LCD.
However if i print the ADC_VAL from within task1 (outside the SPI routine) it works fine.
Does anyone have a clue what's happening?