gpio input/output function on PSoC 5 & Creatro 4.0

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

cross mob
qizh_1205111
Level 1
Level 1

Hi

i want to configure a pin as both input and output, such emulate SDA of i2c master,  what driver mode should i use to make it work ?

i tried strong driver/ pull up/down, found output works fine but input can't read right value in strong driver mode,

and in pull up/down, output can't driver right voltage.

appreciate your help and sharing your experience, thanks.

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

Use "Open Drain drives low" and an external pull-up resistor (5k), set initial drive state to "high". This is what I2C uses.

Bob

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Use "Open Drain drives low" and an external pull-up resistor (5k), set initial drive state to "high". This is what I2C uses.

Bob

0 Likes
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Hello Qipeng,

For more details, please make use of section Internal I2C Bus Multiplexing of I2C Master/Multi-Master/Slave datahseet.

Best Regards,

Geona Mary

0 Likes

Thanks all your answers. finally i found i2c controller can use external clock to get a very low i2c speed(<10K),  so don't need to emulated i2c any more.  only 50K/100K is supported for internal clock mode(i selected before).

0 Likes