An attempt to show grayscale images on an LED dot matrix display with software PWM using PIC16F877A

Introduction:
This is just a time pass hobby project, I am trying to display some pictures (JPEG/PNG/BMP etc) on my 8×8 led dotmatrix display.  You can see photos of my 8×8 led dotmatrix display showing some grayscale pictures. The main thing which you may notice is that the brightness of each led depends on the picture information respective to the scaled(8×8) pixel of the original picture.The original pictures are drawn using GIMP image editor in linux and saved as png. The scaled pictue is sent from the PC to PIC via UART.
Any way, this will be the worst monochrome display showing pictures:-)
8x8
Photos: 
Here you could see the led display showing few pictures opened in gimp editor… You could compare the pictures and observe the PWM effect on the led matrix.
Working:
A pic16f877a is the heart of the 8×8 display. It is configured to drive the matrix. Brightness of each led is controlled by software PWM. A 64 byte buffer(in pic) is used to store the brigntness information of 64 leds. Also another 64byte buffer is used to collect data(picture information) streamed out from PC via UART. Now, from PC side, every thing is done using a python script. Python image library (PIL) is used to convert any picture to 8×8  grayscale image. Now we get 64 bytes of data from a converted picture. Each byte value is divided by 4(since value 64 is the pwm max) and introduced to the PIC via UART using pyserial. When the 64 byte packet is completely received, it is introduced to the display. It show a single frame for about one second. Then next 64byte is sent from the PC and it is displayed and it continues.For more Detail: An attempt to show grayscale images on an LED dot matrix display with software PWM using PIC16F877A


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top