Cant get my outpins to work on an 18M2

Grant666

Member
Hi All

I just can get the command let outpinsB = %00000000 to work.

There seams to be no syntax error, but when I run the program, it will not make the pins output as per the %00000000 . ie%10010010

Im using a 18M2. Reading the manual, this command should work, so not sure what Im doing wrong.

So any suggestion are greatly appreciated.

Thank you
 

neiltechspec

Senior Member
Shouldn't you be using something like -

let dirsB = %11111111
do
let pinsB = %10101010
pause 1000
let pinsB = %01010101
pause 1000
loop

Neil
 

westaust55

Moderator
With M2 and X2 parts nearly all pins are set as inputs by default at power up.

Some commands such as HIGH and LOW will automatically set the designated pin(s) as an output.

Other commands such as PINSC (or other PINS<x>) variants do not change the IO pins to outputs and the DIRS<x> commands need to be issued/performed first.
 
Top