I have picaxe vsm with a licence key and the latest axevsm dll (1.0.3 or like that).
I have encountered a lot of problems when i try to run codes in vsm's picaxe chips, yet they run o.k. on the programming editor's simulator. here is a list of them...
1. [08m] in this code's if structure, even though all the 08m's input pins are high, the code just skips the if pin=1... line and does the code inside, and as the code touches the first elseif, it errors. [this is an oscillator for dtff phone tones.]
2. [08m] I have changed the above code to this... Still erroring as it hits the if pin1=0 line, regardless of the pin state.
(still the same error if i remove the 'goto's from the 'if' commands)
3. [08m] the code just goes past all the if commands regardless of the pin state, and gets stuck on the pulsout command, staying on it throughout the simulation, not moving on. If I remove the setfreq command, the code gets stuck on the first If command regardless of pin state.
4. problem not related to picaxe: on the keypad, current wouldn't come through any particular pins linked to a button even if i click on the button, e.g. on the phone keypad, even if i click on button 2 (looking like it's pressed in), no current comes through pins 2 and A, so it doesn't behave like how i have studied a phone keypad in my phone.
I have encountered a lot of problems when i try to run codes in vsm's picaxe chips, yet they run o.k. on the programming editor's simulator. here is a list of them...
1. [08m] in this code's if structure, even though all the 08m's input pins are high, the code just skips the if pin=1... line and does the code inside, and as the code touches the first elseif, it errors. [this is an oscillator for dtff phone tones.]
Code:
startup:
setfreq m8
nap 1
gosub interrupt
goto main
interrupt:
if pin1=0 then '0.81
let b0=62 '0.31
setint %00000010,%00000010
elseif pin2=0 then '0.74
let b0=48 '0.24
setint %00000100,%00000100
...2 more elseifs the same
else
goto interrupt
endif
return
main:
pause 1 '0.5
pulsout 0,b0
goto main
Code:
startup:
setfreq m8
nap 1
gosub interrupt
goto main
interrupt:
if pin1=0 then goto s1'0.81
if pin2=0 then goto s2'0.74
if pin3=0 then goto s3'0.67
if pin4=0 then goto s4'0.60
goto interrupt
s1:
let b0=62 '0.31
setint %00000010,%00000010
return
s2:
let b0=48 '0.24
setint %00000100,%00000100
return
s3:
let b0=34 '0.17
setint %00001000,%00001000
return
s4:
let b0=20 '0.10
setint %00010000,%00010000
return
main:
pause 1 '0.5
pulsout 0,b0
goto main
3. [08m] the code just goes past all the if commands regardless of the pin state, and gets stuck on the pulsout command, staying on it throughout the simulation, not moving on. If I remove the setfreq command, the code gets stuck on the first If command regardless of pin state.
Code:
startup:
setfreq m8
nap 1
main:
if pin1=0 then s1'0.81
if pin2=0 then s2'0.74
if pin3=0 then s3'0.67
if pin4=0 then s4'0.60
goto main
s1:
pause 1
pulsout 0,62 '0.31
if pin1=1 then main
goto s1
s2:
pause 1
pulsout 0,48 '0.24
if pin2=1 then main
goto s2
s3:
pause 1
pulsout 0,34 '0.17
if pin3=1 then main
goto s3
s4:
pause 1
pulsout 0,20 '0.10
if pin4=1 then main
goto s4
Last edited: