egg|anbo|egg_ has quit [Remote host closed the connection]
redstarcomrade has quit [Quit: Connection closed for inactivity]
redstarcomrade has joined #glasgow
GNUmoon has quit [Ping timeout: 276 seconds]
GNUmoon has joined #glasgow
egg|anbo|egg has joined #glasgow
redstarcomrade has quit [Quit: Connection closed for inactivity]
FFY00 has quit [Ping timeout: 252 seconds]
bvernoux has joined #glasgow
<d1b2>
<sarea> I was wondering about the specifics of I2C. Do I need to make use of the pull-up resistors on the board? It seems to me that the way this is programmed (enable-disable of the tristate instead of writing on the data signal) this is the only way to 'write' a ' 1'
<d1b2>
<Attie> hi @sarea - you don't need to use the on-board pull resistors, but they are handy, and will do the trick for many thing
<d1b2>
<Attie> if you're doing an open-drain topology (like I2C), then you'll need a pull-up somwhere on each line
<d1b2>
<Attie> if I'm understanding your question correctly, then yes - the pullup gives the 1 state, and enabling the output (set as low) will give the 0
<d1b2>
<Attie> if you're going for bi-direction, then you will also want to monitor the line to ensure that what you think you're transmitting is actually there, and you don't have a collision state (i.e: where two nodes drive low at the same time)
<d1b2>
<dragonmux> we can only add to this, use a dir=io pin type and when not transmitting, set the .oe part of the pin low and modulate that to generate the I2C waveform. The .o part of the pin is always low
<d1b2>
<sarea> okay, thanks for confirming this. so what is the best way to add pull-ups on the Glasgow Explorer? The silk screen indicates a resistor position but I think it just bridges across the ESD protection instead of pull-up/pull down? of course, it is always possible to add this to the other side of the I2C bus ...
<d1b2>
<Attie> Glasgow has 10kOhm built-in, so you can use them
<d1b2>
<dragonmux> it has inbuilt resistors and pull-{up,down}
<d1b2>
<dragonmux> the framework already supports this usage
<d1b2>
<Attie> otherwise, these through-holes can be used in conjunction with the 10kOhm (e.g: if you need a smaller value)
<d1b2>
<Attie> and as @dragonmux says - these "pulls" can be configured as "pull-up" / "pull-down" / "no-pull"
<d1b2>
<sarea> ah, nice. I somehow missed that. thank you
<d1b2>
<Attie> np!
<d1b2>
<sarea> just checked print(dir(pads.clk_t)) and it does not list io; how to make use of the internal pulls? this does not seem to be included in the I2C example
<d1b2>
<sarea> so the I2C example assumes external pull ups
<d1b2>
<Attie> so the pin.o == 0 (i.e: it's always low), and then pin.oe is toggled to "release" (i.e: pull-up makes the line 1), and "sink" (i.e: I/O pin pulls the line to 0)
<d1b2>
<Attie> it's abstracted away a bit, so you don't see it if you're looking at the I2C applet
<d1b2>
<sarea> hm, yes, the theory of operation seems clear; but the output in the logic analyzer says otherwise 🙂 so I was wondering if the pull ups need to be specifically activated or not