Manuel Malagon

Individual IO pin control

Discussion created by Manuel Malagon on Nov 3, 2010
Hi everybody it's me again

I need to know how do I set individually the direction of the port pins with processor expert, I mean, I want from the port PTE in a 51CN128.

-PIN 1 - Input
-PIN 2 - Output
-PIN 3 - Output
-PIN 4 - Input
-PIN 5 - Output
-PIN 6 - Input
-PIN 7 - Input

I've tried with the component BitIO and BitsIO and any of these works, I just can't set individually the direction of the port pins. With BitIO I can but the methods doesn't allow me to put an 8 bit value on the port , the PutVal method just accept boolean values so I can't use it. I want to put the value of a variable called "Counter" in the port but I just need to output the bits 2,3 and 5 I don't want the other pins at port E to be outputs because I want to read signals through 'em. Help please