You are reading a single comment by @Ruprect99 and its replies.
Click here to read the full conversation.
-
Just a guess, in this code
var command = function(c,d) { SPI1.write(c, cs); if (d!==undefined) { dc.set(); SPI1.write(d, cs); } }
you are not sending command+data as one block with cs low, not sure what device protocol there is but typically cs should be low for whole piece that belongs together. When cs goes high the device state machine typically goes to beginning (even to sleep) so forgets its state. But that's just a guess, don't know this device.
EDIT:
also don't seedc.clear();
before sending the command
Hi,
I've been looking at this code to try and convert to run an e-ink display (M5Paper) (https://github.com/gnzzz/IT8951/blob/89d505b26f130539644117522a0fdc128ffe44c1/lib/it8951.ts)
I'm pretty new to SPI so have been trying to figure it out.
looking through the forums I've managed to piece together 3 methods for reading, writing and sending commands
But it doesn't work. So for example in the code I'm looking at, this gets called
I've converted this to:
but info is just full of zeros.
I'm not sure if I'm totally on the wrong track or just missing some key bit of information.
Thanks,
Rob Smart