cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ Creator & Designer

Anonymous
Not applicable
        We have typed the following code to acces a port:   
   
mov a, REG[PRT2DR]   
OR A,0X0FF   
MOV REG[PRT1DR],A   
   
but the value at the port is not changing   
   
please do help ASAP   
0 Likes
1 Reply
MR_41
Employee
        When you want to control a Port pin by accessing the PRTxDR register, the pin should be set to StdCPU and the drive mode should be other than HighZ or HighZ Analog. Try setting the drive mode to StdCPU / Strong and the code should work. Also, you can directly modify the pin state by using the following instruction.   
   
or reg[PRT2DR], 0xFF   
0 Likes