An attempt to show grayscale images on an LED dot matrix display with software PWM using PIC16F877A
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:-)
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.
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
Leave a Comment
You must be logged in to post a comment.