First lets connect up the SAMA5D3 to the COG Driver as follows. You should look for the pin on the specified header. The XPLAIN board is Arduino compatible so thus the pin numbers should be equivalent to other Arduino boards. The board port/pins section is just for reference and not needed to connect up.
Pin Number | Description | Color | SAMA5D3 Pin | SAMA5D3 Header | Board Port/Pins |
---|---|---|---|---|---|
1. | Vcc 3V | Red | 3V3 | J14 | |
2. | (LED1) | White | - | ||
3. | (UART_RX) | Grey | - | ||
4. | (UART_TX) | Purple | - | ||
5. | (SW2) | Blue | - | ||
6. | Temperature | Green | A0 | J17 | C18 |
7. | SPI_CLK | Yellow | 13 | J15 | C24 |
8. | BUSY | Orange | 7 | J18 | C5 |
9. | PWM | Brown | PA20 | J19 | A20 |
10. | /RESET | Black | 6 | J18 | C6 |
11. | PANEL_ON | Red | 2 | J18 | C9 |
12. | DISCHARGE | White | 4 | J18 | C28 |
13. | BORDER_CONTROL | Grey | 3 | J18 | C8 |
14. | SPI_MISO | Purple | 12 | J15 | C22 |
15. | SPI_MOSI | Blue | 11 | J15 | C23 |
16. | (RST/SBWTDIO) | Green | - | ||
17. | (TEST/SBWTCK) | Yellow | - | ||
18. | FLASH_CS | Orange | 9 | J15 | C3 |
19. | /EPD_CS | Brown | 8 | J15 | C4 |
20. | GND | Black | GND | J14 |
The sample python 3 code is available at this site: https://github.com/photonthunder/thunderLightning/tree/master/pythonEink. There are three files: DebianIO.py, SpiBus.py, and EinkDriver.py.
To run the demo code just type ./EinkDriver.py
If you don't see anything on the display use the backside of the COG driver board and make sure that the PWM is running (should be between 100-300 kHz), that the pins are changing state, and that you are getting SPI data. There is no feedback so you really won't know if it is working until you see data on the screen. You can run DebianIO.py or SpiBus.py to test the IO or the spidev and see if they are working.
Good Luck