pic 18F2620

Owin portB.5 ,0,[strDta\9] (works!)

Owin 5 ,0,[strDta\9] (works!)

mypin var byte
mypin=5
Owin mypin ,0,[strDta\9] (doesn't work!)


Not very elegant but this way it works!

Code:
    One_W1  var PortB.5
    One_W2  var PortB.6
    One_W3  var PortB.7

    if CIndex = 1 Then 
    owout One_W1,1,[$CC,$44]     
    owout One_W1,1,[$CC,$BE]     
    owin One_W1,0,[STR Dta\9]     
    endif
    
    if CIndex = 2 Then 
    owout One_W2,1,[$CC,$44]     
    owout One_W2,1,[$CC,$BE]     
    owin One_W2,0,[STR Dta\9]    
    endif
    
    if CIndex = 3 Then 
    owout One_W3,1,[$CC,$44]     
    owout One_W3,1,[$CC,$BE]     
    owin One_W3,0,[STR Dta\9]     
    endif
Alberto