--- In jallist%40yahoogroups.com">jallist
yahoogroups.com, "hansvanveldhuizen"
<hansvanveldhuizen
...> wrote:
>
> --- In jallist%40yahoogroups.com">jallist
yahoogroups.com, "hansvanveldhuizen"
> <hansvanveldhuizen
> wrote:
> >
> > Hi all,
> > I am still looking for an interval routine to be used for serial
> > communications (not the standard start, 8bit,stop) for the 16F877
> under
> > jal 2.0.( f.e. a sony sytem uses start,5 bits, 2 stops)
> > I have tried to do something with the Tasks but no result.
> > I hope there is a background routine for this.
> > In my seatalk remote I have used a certain value in usec but that
> > depends on the number of commands to be executed. Try and error!
> > Who helps?
> > Cheers
> > Hans
> >
> Here is something I have tried, but not working, please comments:
>
This little program works (I mean the leds are going on and off)
But I am still not sure of it.
Please comment!
Cheers
Hans
-- JAL 2.0.4
include 16f877a_bert
pin_d0_direction = output
pin_d1_direction = output
pin_d2_direction = output
var bit flag at intcon : 2
-- enable timer 0
option_reg = 0b_0000_0111
procedure init_interval is
intcon = 0b_0000_0000
flag = low
tmr0 = 55
end procedure
procedure next_interval is
while !flag loop end loop
flag = 0
tmr0 = 50
end procedure
forever loop
-------------------------------------
pin_d0 = low -- green led on
delay_1S(1)
pin_d0 = high
delay_1S(1)
init_interval
for 201 loop -- now reading the bits, big number for test!
next_interval
pin_d1 = !pin_d1 -- yellow led on/off
end loop
pin_d2 = low ------ red led on
delay_1S(1)
pin_d2 = high
delay_1S(1)
end loop
.