For receive you usually need to sample with at least twice the data bitrate, so that leaves no more that 5 RISC-V instructions for each sample interval. What would your RISC-V assembler for that look like? (Should fit easily in a tweet - it's only max. 5 instructions.)
-
-
Proper I2C is extra fun because slaves are allowed to stretch the clock
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I don't know RISC-V ASM -- I would expect a bunch of things like; init: if (get_pin() != 1) goto init v = get_pin() v <<= 1 v = get_pin() ... repeat 8 times ... if (v != my_addr) goto init etc..
-
How many RISC-V instructions is get_pin()? Also: That's certainly not i2c! You have to monitor clock and data, see if data is stable for a positive clock pulse (which can be of variable length) and if so you got a bit, otherwise you got a start or stop condition. All in 5 insns!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.