Pin Drive Modes and the <pin_name>_Write() API

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JuRu_3481966
Level 1
Level 1
First like given

When a pin is set to Open-Drain, Drives Low, does this mean that when you use PIN_Write(1), the pin goes low, and high when you use PIN_Write(0)? The concept of the drive mode is very confusing to me and I cannot seem to get this information from the datasheet for the pins.

I am also trying to use the TM1637 with PSoC 4 (bit banging) and have had no success. If you could clarify this for me, it would help a lot.

Thanks,

Julian

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When you look at the diagrams for the drive mode at page 10 of pin's datasheet you will see that the output is driven only to one direction.

The "Open Drain drives low" will be connected to GND when the pin is written a 0 to. A pullup resistor will be needed to maintain the high state of the pin. This configuration allows for more than one devices actively driving the pin low as for instance I2C uses for clock stretching.

"Open Drain drives high" will work accordingly when a 1 is written to the pin.

Bob

View solution in original post

1 Reply
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When you look at the diagrams for the drive mode at page 10 of pin's datasheet you will see that the output is driven only to one direction.

The "Open Drain drives low" will be connected to GND when the pin is written a 0 to. A pullup resistor will be needed to maintain the high state of the pin. This configuration allows for more than one devices actively driving the pin low as for instance I2C uses for clock stretching.

"Open Drain drives high" will work accordingly when a 1 is written to the pin.

Bob