Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL I2C MASTER SIGNAL STATES

Status
Not open for further replies.

megaqujik

Newbie level 1
Joined
Jul 14, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Krakow
Activity points
1,292
vhdl i2c master slave

hi everybody

i am trying to write i2c master controller in vhdl and i am a bit confused :/ I know there is discussion in this forum from 2005 about it, but there is not clear explanation. I know protocol but i am not sure tha signal state i am using are correct. So i do it this way:

About SCL all is claer ofcourse.
If i want to write to SDA i just do
SDA <= '0' or SDA <= '1'.

What should i do when i need read from slave( acknowledge and data )? i2c protocol description tells to release SDA setting it to high. In vhdl should I set it to 'Z'? What is diffrent between 'z' and 'h' ? I know that 'z' connected to pull up resistor can be interpreted as '1'.

So if bit 9 ( reading ackwnoledge from slave) coming should i set SDA to 'Z' during SCL low and simply check if SDA='0' during SCL high?

Please ask for further information if needed.

PS: If my english is bad - sorry :)

Best Regards
Michael
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top