published on in Electronics
tags: psoc ws0010

PSoC component for WS0010-based displays

Yet another PSoC component for a display module! This time it’s for WS0010-based character OLED displays.


The component’s source code can be downloaded from my repository on Github. I also included a small demo project to get you stared.

Source Code Releases

My previous article on the ST7565 component has some instructions on how to add the module to your projects.

This component is designed to be a drop-in replacement for the stock character LCD component provided by Cypress. Assuming the component is named WS0010 in your schematic, usage is pretty simple:

/* Initialize the module */

/* Write some text */
WS0010_PrintString("Hello PSoC!");
WS0010_Position(0, 1);
WS0010_PrintString("WS0010 Component");

/* Put the module into sleep mode and then wake up */
CyDelay(2 * 1000);
/* Display contents should persist through sleep */

I included a ‘datasheet’ documenting all the functions with the component, you can also find it over here.

Graphic Mode

The WS0010 driver supports graphic mode, letting the user draw individual pixels instead of characters. The library doesn’t include support but you can put the module in graphic mode manually:


// The display is now in character mode
// Let's make it all white
for (;;) {

Unfortunately, my module isn’t a continues grid of pixels, something extremely common for character displays. Still, graphic mode could be useful for using an unlimited amount of custom character and even multiple custom fonts!

The display in graphic mode turned white

Be aware that some functions (for example, WS0010_Sleep()) assume the display is wanted in character mode and will change it back after running. If you want to use these modules in graphic mode it’s probably a good idea to create a new component based on the character one.

Where to buy

You can order a display similar to mine (this one is in blue color) from Adafruit. There are more on the internet available in various colors, manufactured by Raystar. I am also pretty sure I once saw modules that had no character separation dead zones (great for graphics) but I can’t find them again.