Getting the uOLED 128 G2 to display a bmp file on the SD card
Mahonroy
Posts: 175
Hey guys,
I am attempting to display a bmp file on the uOLED 128 G2 display from the SD card located on the back of the display. I am using the oLED-128-G2_v2.1 library. I copied a single 128x128 bitmap file to the SD card with a computer.
The documentation mentions that I need to use "SetByteAddress" or "SetSectorAddress" somehow to point to the file that I want to display. And then call the method "DisplayImage(X,Y)".
Can anyone explain how to do this? I don't understand what the HIword and LOword parameters are and how to use them.
As a test, I tried this:
This did nothing.
Also on a side note... the documentation mentions that it can use a 64mb up to 2gb card. Is it possible to use a larger card (you will just be wasting space), or is that not possible? The reason I ask is that micro sd cards under 8gb are rare and hard to find.
Any help is greatly appreciated, thanks!
I am attempting to display a bmp file on the uOLED 128 G2 display from the SD card located on the back of the display. I am using the oLED-128-G2_v2.1 library. I copied a single 128x128 bitmap file to the SD card with a computer.
The documentation mentions that I need to use "SetByteAddress" or "SetSectorAddress" somehow to point to the file that I want to display. And then call the method "DisplayImage(X,Y)".
Can anyone explain how to do this? I don't understand what the HIword and LOword parameters are and how to use them.
As a test, I tried this:
myresult := LED.MediaInit 'this returned a 12... couldn't find in the documentation what this meant? LED.SetSectorAddress(0,0) LED.DisplayImage(0,0) 'display image at pixel coordinates 0,0
This did nothing.
Also on a side note... the documentation mentions that it can use a 64mb up to 2gb card. Is it possible to use a larger card (you will just be wasting space), or is that not possible? The reason I ask is that micro sd cards under 8gb are rare and hard to find.
Any help is greatly appreciated, thanks!
Comments
http://forums.parallax.com/showthread.php/157664-uOLED-128-G2-Having-Troubles-Displaying-Bitmap-Data?p=1298367#post1298367
It's against forum rules to cross post.
This thread is about putting a complete bitmap file on an SD card, and using SD card reading functions to display an image.
Carry on...
I have played around with 4D-Systems displays a couple of years ago so my tip may be expired.
Some, but not all displays support a file system on the SD card. 4D-Systems have a program (forgot the name) to test and simulate the displays and as well program them in their own language. Same thing you use to update the firmware as far as I remember.
So using this program you can write Images and scripts for the display on a SD card NOT formatted as FATXX but RAW access of the sectors/bytes/content.
It is quite crude but the older displays worked like that, not having the power to decode a FAT file system. Basically the content of the SD card is accessed by the display as Block device(?) .
You can NOT copy a file from your computer to the SD card via a file manager of your choice but need that 4d-system program to upload your images onto the SD card, giving you the addresses you need in your own code to access them.
As said before SOME of their displays can use FATxx file systems, but not all.
As for the problem getting SD cards below 2 GB.
FAT16 can just address 2GB. On SD cards supporting this a address of the smallest accessible unit on the SD card is a BYTE.
FAT32 circumvented this problem by making the smallest addressable unit a sector.
Same with SD cards. If devices need SD cards below 2 GB it is because they do not support sector addressing in the SDHC(?) format.
You can format a SD card greater the 2 GB to appear as a below 2GB card to the device but will most likely not be able to use the rest of the card.
Enjoy!
Mike
I