Hello group,

I am trying to do a project with several tasks, but I am having trouble 
getting it going.
Can anyone tell me why the following code doesn't work?

-- JAL 2.0.4
include 18f2520
pragma target clock 20_000_000        -- oscillator frequency
-- Configuration memory settings (fuses)
pragma target OSC  HS             -- HS crystal or resonator
pragma target WDT  disabled        -- no watchdog
pragma target LVP  disabled        -- no Low Voltage Programming
--
pragma task 2
-- Enable delays without blocking
const timer0_isr_rate = 1000            -- 1 kHz isr rate
const DELAY_SLOTS = 1                   -- support 1 delays at the same time
include timer0_isr_interval
timer0_isr_init()                       -- init timer0 isr
--
enable_digital_io()                -- Make all pins digital I/O
--
PORTA_direction = OUTPUT
--
task Something() is
    forever loop
        --do something   
        suspend
    end loop
end task
--
start Something()
set_delay(0, 100)
forever loop                 
    if (check_delay(0)) then
         pin_a0 = ! pin_a0
         set_delay(0, 100)
    end if
    suspend
end loop

I expected the led on pin  A0 to blink every 10th of a second, in stead it 
blinks at a much slower rate (every minute).

Please help me out. 
Greetz, Dirk 

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/jallib/-/d5RX2TFoiAgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to