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
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.
Bookmarks