1. 程式人生 > >How to transplant OLED program to HAL Library program

How to transplant OLED program to HAL Library program

Yesterday my oled screen run sucessfully by test program along with the product from TaoBao just as following:

 

You can see from the picture that my OLED is produced from "中景科技園" and here is a warning that if your OLED is not the same kind as mine,you will gain nothing if you just copy the program in my blog. However you still can learn how to transplant the program step by step by what I am going to tell you.

OK,before starting it ,you need to prepare STM32C8T6(you can use another one, but do the same procedure.

Firstly,open th STM32cudemx,select STM32C8XX,and set the pin.

pin           PA5   PA7  PB0   PB1   PB4   VCC  GND

connect    D0     D1    RES   DC    PA4   VCC  GND

Then generate your program.