WCH ssd1306 oled display
Robby roboter @robby.roboter
I took as a starting point already existing project that use CH32V003
ch32v003-maker-projects It have big numbers and some text but I wanted to display any text.
// ===================================================================================
// Update Function
// ===================================================================================
void update(void) {
OLED_drawPixel(0, 0, 1);
char str[] = "Hello World!\n";
OLED_print(&str);
OLED_update();
}
int main(void)
{
Delay_Init();
USART_Printf_Init(115200);
printf("SystemClk:%d\r\n",SystemCoreClock);
// Setup internal peripherals
I2C_init();
// Setup external peripherals
OLED_init();
OLED_clear();
update();
Delay_Ms(500);
}
Source code
https://github.com/roboter/Hardware/tree/main/WCH/ch32v003f4p6-evt-r0-1v1-i2c
UPD! Embeetle integrated my project to their software so only 3 steps needed to run it
Reference:
- https://www.youtube.com/watch?v=StjnSeM30-Y&list=PLs00gIc4luIDke2g0jVK1qH7EwiB-SKYP&index=12 - ssd1306 explained
- https://embeetle.com/#supported-hardware/wch/boards/ch32v003f4p6-evt-r0-1v1 - Embeetle
- https://github.com/ndm736/ME433_2020/tree/master/ssd1306 - Font
- https://pallavaggarwal.in/2023/10/26/ch32v003-maker-projects/ - took insperation from this project
- https://www.wch-ic.com/products/CH32V003.html? - datasheet, reference manual