LoPy4 - I2C - FRAM Memory - MicroPython Library
-
@Elizar interesting idea! You probably want to use a camera to record that, though, it’ll make transcription easier.
-
@Elizar There are low cost logic analyzers available for about 10€, with 8 channels at 24MHz max sampling rate. Software is available as supporting the most common serial protocols. For I2C, UART, SPI that is extremely valuable. It does not help you though when there are analogue problems like with voltage levels.
-
Base i2c gives me and TypeError when I pass in a byte array
>>> i2c.writeto(0x51, 2,) 1 >>> i2c.readfrom(0x51, 5) b'\x00\x00\x00\x00\x00' >>> i2c.writeto(0x51, bytes(0,0,1,2,3,4)) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: wrong number of arguments >>>This returns the entire memory all zero
>>> i2c.readfrom_mem(0x51,0x0,32768,addrsize=16) b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\........ Returns all memory -
@Eric-Tremblay 100K may be too weak (i.e. the numerical value is too high) for the pull-up. Can you easily change those to a different value? Usual recommandations are 4.7K or 10K, though some use much lower values.
It seems weird that the scan still works if that is indeed the problem, but it might be an edge case due to rise/fall times.
You may also want to try different speeds to see if that changes anything. Lower speeds are less sensitive to pull-up issues.
-
@jcaron , They are SMD resistors on a custom PCB. I'm not equipped to change them. I will talk with the engineer that designed my board and see if he can make the change he has a few boards incomplete (missing chips) as we are just starting to test them.
-
@jcaron I just double-checked to make sure and I read the schematic wrong they are indeed 10k, SMD 1002.
-
Hello everyone who was helping me diagnose this issue. I finally got my logic analyzer.
See if something looks odd in the serial data
here is an example of a I2C capture
code:
i2c.writeto_mem(0x51,0x3,4,addrsize=16)
-
@jcaron i got a logic analyzer to help me with this issue.
it looks like i'm getting an extra byte of 0x00 in there.
what do you think?
-
@Eric-Tremblay could you share what you see?
-
@jcaron i had it posted in June its in the thread bellow
-
@Eric-Tremblay Ah sorry I had missed that.
No, the message is correct. The address is on 16 bits, so takes two bytes to send.
What happens when you try a read?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login