My test are made with PICAXE 18X:
I run this code on the test-board without any devices to control.
My test board get a reset 3 times today with this program.
Haven't get any error with this circuit and program yet.
Circuit:
Potentometer 1 kohm...10 kohm:
1 = +
2 = input 0
3 = -
AXE033 LCD-display:
+ to +
- to -
LCD in = output 1
1. Set a potentiometer a middle.
2. Run a program.
3. Look a SV number (Start value) and write it up.
4. Set a potentiometer to - side.
5. Keep program running as long as you like.
Notes:
SV: should NOT change, otherwise Picaxe is have done a reset. When Picaxe get reset, value will be read from input 0 (pot).
E1: Variable value error.
E2: Output error.
I run this code on the test-board without any devices to control.
My test board get a reset 3 times today with this program.
Haven't get any error with this circuit and program yet.
Circuit:
Potentometer 1 kohm...10 kohm:
1 = +
2 = input 0
3 = -
AXE033 LCD-display:
+ to +
- to -
LCD in = output 1
Code:
' PICAXE-test
' Made By Pekari 14.10.2008.
pause 1000
w0=0 w1=0 w2=0 w3=0
readadc 0,b1
goto show
reset:
b0=0
low 0
pause 1
low 2
pause 1
main:
w2=w2+1
if w2=65535 then counter
if bit0=0 and bit2=0 then part1
if bit0=0 and bit2=1 then part2
if bit0=1 and bit2=1 then part3
if bit0=1 and bit2=0 then error1
if outpin0=1 and outpin2=0 then error2
pause 10
goto main
part1:
bit0=0
bit2=1
low 2
pause 1
low 0
pause 1
high 2
pause 1
goto main
part2:
bit0=1
bit2=1
low 2
pause 1
low 0
pause 1
high 2
pause 1
high 0
pause 1
goto main
part3:
bit0=0
bit2=0
low 2
pause 1
low 0
pause 1
goto main
error1:
b2=b2+1
goto show
error2:
b3=b3+1
goto show
counter:
w3=w3+1
show:
serout 1,N2400,(254,1)
pause 50
serout 1,N2400,(254,128,"SV=",#b1," Cou=",#w3)
pause 1000
serout 1,N2400,(254,192,"E1=",#b2,", E2=",#b3)
pause 1000
if b2<255 and b3<255 and w3<65535 then reset
end
2. Run a program.
3. Look a SV number (Start value) and write it up.
4. Set a potentiometer to - side.
5. Keep program running as long as you like.
Notes:
SV: should NOT change, otherwise Picaxe is have done a reset. When Picaxe get reset, value will be read from input 0 (pot).
E1: Variable value error.
E2: Output error.
Last edited: