1/1

|
Problems with I2C controller core
by 65c02fan on Feb 15, 2012 |
65c02fan
Posts: 2 Joined: Feb 3, 2010 Last seen: Oct 7, 2015 |
||
|
Hi, I am having a problem with Richard Herveille's I2C core.
I am trying to use it in a Spartan 6. I am using 4.7K external pull-up resistors on the SCL/SDA lines. I am observing $FF when I read the registers when the reset is active which is what I expect. When the reset is inactive, I read $00 on all registers. Setting the registers to different values and trying to read them back correctly is failing, I keep getting $00 on all the registers except register 1. When I program register 1 (prescale MSB) to any value, I am reading that value on all the registers. Is this normal? Also, I init the core by setting register 0 (prescale LSB) to 40MHz/(5x400kHz)=$1F, then I enable the core by setting register 2 (command)=$80. When I try to set the repetitive Start, and Transmit data I see no action on the SCL/SDA lines on my scope. In fact they both get pulled low after reset goes inactive. One last question: If there are only 4 registers, why does the core need 3 address bits? |
|||
|
RE: Problems with I2C controller core
by 65c02fan on Feb 15, 2012 |
65c02fan
Posts: 2 Joined: Feb 3, 2010 Last seen: Oct 7, 2015 |
||
|
Nix the last question, there are 5 registers...
I just noticed Richard has been updating the VHDL version. I have been trying to implement the Verilog version. Maybe this is the problem? |
|||
1/1

