PDA

View Full Version : OLED 128x128 color display



Ron Marcus
- 1st May 2007, 18:24
I picked up an OLED display from Sparkfun and wondered if anyone had some working PBP code for it they could share. Speed is not a factor, but I do need to create some graphics screens. It is based on the SSD1339 controller.
Thanks,
Ron

skimask
- 3rd May 2007, 04:08
I picked up an OLED display from Sparkfun and wondered if anyone had some working PBP code for it they could share. Speed is not a factor, but I do need to create some graphics screens. It is based on the SSD1339 controller.
Thanks,
Ron

Isn't there working code at the Sparkfun website?

rhino
- 3rd May 2007, 04:15
Isn't there working code at the Sparkfun website?
Yeah, but it's in C and for the LPC2138 ARM. Kind of a pricey little bugger.

skimask
- 3rd May 2007, 15:04
Yeah, but it's in C and for the LPC2138 ARM. Kind of a pricey little bugger.

Doesn't look like it's that hard to convert over to PBP...looks like relatively straight-forward code, flip this bit, change that pin, etc.

Ron Marcus
- 19th May 2007, 16:50
I have gotten the OLED up and running in PBP with some test patterns. Even made a basic scaleable character generator for text using the branch command.
The OLED is an amazing little display! I'd suggest it for a full color display project as it is even readable in sunlight.
I'd be happy to post my code for anyone who has purchased the OLED . I just need to clean up the source code and add comments for the routines.
Now, here's the question... What would be an efficient way to input an ascii character, and jump to the subroutine with the info to construct the bitmap?
Each sub is labeled a:...b:...c:...etc.with eight bytes of info to go into a pixel array. Is converting the ascii number to a range of numbers starting at zero, and using the branch command the best way, or is there another neat trick for indirect addressing that would work better? I am using a 18LF2520, and would like to use as little assembly as possible, because I am using the project as a teaching platform for one of my kids.
Thanks,
Ron

Ron Marcus
- 20th May 2007, 18:16
Here is the OLED test program. I think some of the subs will be valid for other graphic LCDs too. Any questions, let me know. I know alot of the subroutines can be streamlined, but it's a start...
Ron

skimask
- 21st May 2007, 01:45
Here is the OLED test program. I think some of the subs will be valid for other graphic LCDs too. Any questions, let me know. I know alot of the subroutines can be streamlined, but it's a start...
Ron

Neat...just another reason for me to buy a couple more of these LCDs.
On the rectangle subroutine...
It would run quite a lot faster if you put those write_c and write_d subroutines inline...save 2+ cycles for each gosub/return * 4 gosub's per loop, roughly 160,000+ cycles to be saved, at the expense of code size of course.