Prev Problem
Next Problem

23. Open-Drain I2C SDA line

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 

 

Code


module i2c_line(

input wire drive_low,
output reg sda

);

always @(*) begin
    if(drive_low == 1) begin
        sda = 0;
    end
    else begin
        sda = 1;
    end
end
endmodule
Was this helpful?
Upvote
Downvote