asking
Full Member level 5
- Joined
- Sep 21, 2010
- Messages
- 279
- Helped
- 6
- Reputation
- 12
- Reaction score
- 6
- Trophy points
- 1,298
- Activity points
- 3,377
Hello guys,
i am using 16F628A for Multiplexing 7 Segment display. So my Port A has only 4 pins used. Now i want to use two pins for SCL/SDA (soft i2c)
i want to use soft i2c connection and that is where i m stucked. If i define TRISA = 0 (means all pins are set for output) then how can i define
sbit Soft_I2C_Scl at RA6_bit;
sbit Soft_I2C_Sda at RA7_bit;
because i think in serial i2c is bidirectional...so m confused...because 16F628A has no hardware i2c.
but how is it possible ? As we have already define TRISA = 0 (means all pins on PortA is output) then how it will works as input/out bidirectional ?
please help m really confused..about how to define any pin on pic microcontroller as bidirectional
any help would be appreciated..
i am using 16F628A for Multiplexing 7 Segment display. So my Port A has only 4 pins used. Now i want to use two pins for SCL/SDA (soft i2c)
i want to use soft i2c connection and that is where i m stucked. If i define TRISA = 0 (means all pins are set for output) then how can i define
sbit Soft_I2C_Scl at RA6_bit;
sbit Soft_I2C_Sda at RA7_bit;
because i think in serial i2c is bidirectional...so m confused...because 16F628A has no hardware i2c.
but how is it possible ? As we have already define TRISA = 0 (means all pins on PortA is output) then how it will works as input/out bidirectional ?
please help m really confused..about how to define any pin on pic microcontroller as bidirectional
any help would be appreciated..
Last edited: