20M2 outpinB.x not working ...

albatros

New Member
Hello,

I searched the forum, but didn't find an answere to the topic below.
Why is the code with "outputB.x" not working on a 20M2 ?
Any idea ?

Code:
;** this code snip is [B]not [/B]working with a 20M2 (BUT it works with a 14M2)
Symbol vB0 = outpinB.0
main: 
    vB0 = 1
    pause 200
    vB0 = 0
    pause 200
    goto main
    
    
;*** This code snip is working with 20M2 and 14M2
main:
    High B.0
    pause 200
    Low B.0
    pause 200
    goto main


;** this code snip is working with a 20M2
Symbol vB0 = pinB.0
dirsB = $1    ;define pin0 as output
main: 
    vB0 = 1
    pause 200
    vB0 = 0
    pause 200
    goto main
I checked this with a LED connected to the pin B.0
And I'm still wondering why 'outpin' is not working .....according the manual it should ...

kind regards,
Albatros
 
Last edited:

Technical

Technical Support
Staff member
When using let outpinX = 1 you need to make the pin an output first (using let dirsB = or simply just a high/low command).

high/low commands automatically make a pin an output

B.0 on a 14M2 happens to be output only, try it on B.1 instead and you would see the same issue as 20M2
 
Top