cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

I am reading from a UART sensor and using an external transistor to turn the sensor off when it's not needed. I noticed, however, that the output pin from my UART component stays "HIGH" the entire time. It seems that my this UART pin is actually supplying power to the senor, regardless if I've disabled power via the external transistor. As a result, this is draining unnecessary current. 

   

Is there a straightforward way to pull all my UART pins "LOW" when I'm not using them? It seems that calling UART_Stop() does not do this. The only way I've gotten this to work is to use a register to trigger the hardware-disable port on the pin. Is there a way to configure the UART components to do this automatically when calling Sleep() or Stop()?

   

Thanks!

0 Likes
2 Replies
Bob_Marlowe
Expert II

You may set the pin's drive mode to high Z, There are APIs for doing that, check the UART_Pins.h files.

   

 

   

Bob

0 Likes
odissey1
Honored Contributor II
        bkphat, Something like #define Pin_DM_DIG_HIZ (0x01u) // High Impedance Digital. #define Pin_DM_STRONG (0x06u) // Strong Drive. PIN_SetDriveMode(Pin_DM_STRONG); //digital output PIN_SetDriveMode(Pin_DM_DIG_HIZ); //digital input   
0 Likes