Hi again
Thanks for all your anwers in my last post.
I have read the manual and although i still do not understand alot of it i have had a go at wirting my first bit of code.
I do not have the chips set yet so i have just run it on the simulator. It seams to run ok but i just wonderd what you guys thought of what i have writen. Is there an easyer wat of acheving my goal and have i understood the manual.
The following code shoud: When my micro switch connected to pin 1 is pressed and relesed the cuircit should turn on and chase up and down the leds untill the button on pin1 is pressed again and then it should switch off.
The only problems i can see is a delay on the last led before the cuircit returns to the start so it is not as smooth as i hoped.
Is this the best way to turn the cuircit on and off.
Thanks for all your anwers in my last post.
I have read the manual and although i still do not understand alot of it i have had a go at wirting my first bit of code.
I do not have the chips set yet so i have just run it on the simulator. It seams to run ok but i just wonderd what you guys thought of what i have writen. Is there an easyer wat of acheving my goal and have i understood the manual.
The following code shoud: When my micro switch connected to pin 1 is pressed and relesed the cuircit should turn on and chase up and down the leds untill the button on pin1 is pressed again and then it should switch off.
The only problems i can see is a delay on the last led before the cuircit returns to the start so it is not as smooth as i hoped.
Is this the best way to turn the cuircit on and off.
Code:
main:
button 1,1,200,100,b0,1,test
'jump to cont unless pin1 = 0
goto main
test:
high 0
low 0
high 1
low 1
high 2
low 2
high 3
low 3
high 4
low 4
high 5
low 5
high 4
low 4
high 3
low 3
high 2
low 2
high 1
low 1
high 0
cont: button 1,1,200,100,b0,1,test1
goto test
test1: end
Last edited: