Install AVR-GCC toolchain and make Python virtual environment.
(For PicKit4 users: AVRDUDE of Ubuntu repository does not support PicKit4. In this case, install AVRDUDE manually. For installing the latest AVRDUDE, see Using PicKit4 for AVR MCU programming in Arduino.)
$ sudo apt install gcc-avr avrdude avr-libc
$ sudo apt install python3-pip
$ python3 -m venv devenv
(devenv) $ pip install -r scripts/requirements.txt
Compile and program
$ cd src
$ make
$ avrdude -c pickit4_isp -p m328p -U flash:w:main.hex
Transfer image data to MCU to display.
$ cd ..
$ python scripts/tlay2comm.py doc/example.png
While doing a ePaper (or E-Ink) related project, I found that there was no public driver library for ShineWorld's epapers. As these Epaper displays were a way cheaper than other competitors, we wanted to use one of thir proudct, SOPM021EB 2.13in ePaper.
I tried several common Epaper libraries, but none of them were able to display data on ShineWorld's 2.13in ePaper.
The ePaper was using UC8251 as controller, and none of the above libraries have support for it. I contacted the ShineWorld company and they provided an example code written for MSP430, which had become the starting point of this project.
I got two custom made PCB.
- ePaper adapter board, which is a copy of common ePaper driving adapters like WaveShare E-Paper Driver HAT.
- MCU board, which is a copy of Arduino UNO R3. However, USB-UART chip is omitted and it is connected to external USB-UART adapter via FPC cable.
I connected PicKit4 and CH340 USB-UART adapter to the MCU board.
I had some issues on the first try using PicKit4 for programming. I had to manually compile the recent version of AVRDUDE and change ATmega328p's fuse bytes to use external 16MHz crystal just like on Arduino UNO.
For more details, I seperated this into another document Using PicKit4 for AVR MCU programming in Arduino
Although I named this project as "ePaper Driver", this has only very basic feature. The firmware just displays the image data received from UART. It should have common functions like
print('c', x, y)
printf("string")
- ...
Any contribution will be appreciated.