Hi @Ruprect99 Rob, I do not have that hardware to test, but a few ideas do come to mind:
'but info is just full of zeros.'
If the commands going out are correct, it sounds like they aren't received, so no data transfer occurs. Is it possible MISO and MOSI are wired backwards?
This was a fundamental struggle I had, with my first experience with SPI. Your snippets do not show how SPI is setup, so I'd first double check to make sure the code definitions match the actual wiring. Also, make sure of a solid ground between the uP, the e-Ink display and the power supply.
Has an attempt been made to mirror the code shown in another e-Ink example:
The snippets shown in post #1 don't quite mirror the SSD1606 e-Ink example. I had a similar experience and the community helped with SPI examples and snippets:
Have you tried hard coding the register values in place of the constants, to verify that the constants are as they should be. e.g. 32bit vs 16bit, actual hex value and not a string representation, etc.
For what it's worth, after hours of struggle with SPI, I2C and UARTS, I eventually buckled and picked up a logic analyzer ~$20 that provides immediate feedback on what is on the data lines. I had a floating CS chip Select that rounded out the leading edge, so the receiving device never started the data receive, and thus nothing during the expected read was seen. Here are some sample images, but with a UART:
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Tue 2021.03.09
Hi @Ruprect99 Rob, I do not have that hardware to test, but a few ideas do come to mind:
If the commands going out are correct, it sounds like they aren't received, so no data transfer occurs. Is it possible MISO and MOSI are wired backwards?
This was a fundamental struggle I had, with my first experience with SPI. Your snippets do not show how SPI is setup, so I'd first double check to make sure the code definitions match the actual wiring. Also, make sure of a solid ground between the uP, the e-Ink display and the power supply.
Has an attempt been made to mirror the code shown in another e-Ink example:
Using the available SPI functions:
The snippets shown in post #1 don't quite mirror the SSD1606 e-Ink example. I had a similar experience and the community helped with SPI examples and snippets:
Have you tried hard coding the register values in place of the constants, to verify that the constants are as they should be. e.g. 32bit vs 16bit, actual hex value and not a string representation, etc.
Examples snippets
For what it's worth, after hours of struggle with SPI, I2C and UARTS, I eventually buckled and picked up a logic analyzer ~$20 that provides immediate feedback on what is on the data lines. I had a floating CS chip Select that rounded out the leading edge, so the receiving device never started the data receive, and thus nothing during the expected read was seen. Here are some sample images, but with a UART:
JPG Images
Here is a full example by @urish, follow the gist link: