Hi,
I built a small digital picture frame, which automatically rotates itself into portrait or landscape orientation, depending on the picture displayed.
I connected a 2.4" LCD with a resolution of 320x240 pixels which I got from ITead to a PIC32MX120F032B using the PICs Parallel Master Port (PMP) peripheral. The display is setup to work in 8-bit mode, so using the PMP was a bit tricky, but I managed to get two 8-bit writes out of a 16 bit transfer by connecting the appropriate pins to two 1N4004 diodes and a pull-up resistor leading to a logical OR for the nWR signal.
The LCD breakout board also has an SD-card slot on its back. The file system is accessed by using FatFs and an MMC-driver which I modified to support software SPI. I did this because although this PIC32 has Peripheral Pin Select (PPS), it is not possible to use any of the hardware SPI pheripherals together with the PMP.
The perfboard is held and rotated by a conventional RC servo. After rotating, the PIC32 cuts off the power to the servo to prevent it from making annoying humming noises.
The Python script to convert JPEG images into an easy to read RAW format is also included. The script basically resizes the images, applies a gentle sharpening-filter, and does some Floyd-Steinberg dithering to reduce the color space to 16 bit (RGB 565). It also adds the information whether the image should be displayed in portrait or landscape orientation.
The PIC32 directly writes the image data to the display, and by syncing the line currently written with the hardware scrolling offset of the display driver chip, one can achieve a nice sliding transition between the images.
To give the device a nice looking finnish, I sprayed a piece of acrylic glass with some black paint and hot-glued it to the LCD board.
A video is available on YouTube: http://www.youtube.com/watch?v=yGzvt1zctiU
Please find the firmware and the converter script attached.
Have fun,
Markus


