TURNING TECHNOLOGY INTO ART APPLICATION NOTE Application Note: Displaying an Image, Video or Animation on the Goldelox Modules in Serial Environment Document Date: 25 th February 2013 Document Revision: 1.0
Description Application Overview This Application Note describes how an image or video can be displayed on the Goldelox modules in Serial Environment. In order to replicate this application note, the following items are required; Any Goldelox Display Module 4D Programming Cable micro-sd (µsd) memory card 4D Workshop4 IDE Displaying images and videos is a very important feature of the Goldelox based display modules. In the Serial Environment, one needs to use a Graphics Composer Software tool that writes the images/videos/animations to the usd card in the format recognized by the Goldelox processor. Once the media objects are loaded to the usd card, the address location details are generated in a text file that could be used by the Host Controller to call the images, videos and animations to be displayed on the screen. 2012 4D Systems Page 2 of 15 www.4dsystems.com.au
Setup Procedure Converting a 4D Goldelox Display to a Serial display Note: This step is not needed if the user is using a newly purchased Goldelox module, as the module is in Serial Environment configuration (i.e. pre-loaded with the SPE) by default. Connect the 4D Programming Cable to the PC, you will be prompted for the driver installation, if not then you may have to manually install the driver available here, http://www.4dsystems.com.au/prod.php?id=138 Create a new project in Workshop 4 (WS4), Press Next. Now, select the serial environment. We are using a uoled-128-g2 module for demonstration; you may wish to choose any other Goldelox Display module from the products list. Connect the display module to the 4D programming cable. Click COMMs tab on WS4. Ensure that the "Indicator Dot" is blue otherwise select appropriate COM port, click the dot and wait until it is blue indicating that communications with the module was established. 2012 4D Systems Page 3 of 15 www.4dsystems.com.au
Not Connected COM connected Simulation Procedure Loading the images, videos or animations to the usd card Open the Graphics Composer under Tools menu on the previously opened Serial project. Open Tools menu and click SPE Load. This procedure would load the necessary firmware and configuration to convert the display in Serial (SPE) mode. You may be prompted with the following message On the 4D display, you should see a splash screen scrolling at this point. Note: SPE is factory programmed on to the module. I.e. the Goldelox display modules are configured for Serial Environment by default. Customers can switch the environments, if they need to. Do you want to allow the following program from an unknown publisher to make changes to this computer? Press Yes. Creating a Graphics Composer Project Select the Screen Size which is 128 x 128 in case of uoled-128-g2. You may wish to check the screen of your Goldelox display module. Click Add to add an image, an animation and a video to the project. The image, animation and video used in this application are attached in the zip file. Uncheck Tiled option (applies to the images only). 2012 4D Systems Page 4 of 15 www.4dsystems.com.au
We are setting all the media objects to the maximum screen size (128x128) which implies that the X,Y position must be 0,0. The X, Y position can be changed provided that the media object size fits within the screen size. Uncheck Ignore screen size constraints to be able to view the whole object within the screen size. Bit depth could only be 16bit. 8bit doesn t apply to any of the Goldelox modules. Once the settings are completed, click the IC button to build the output. This is your final step before writing to the usd card; please make sure you have made a backup of any useful data on the usd card. After writing to the usd card, the FAT formatting will be lost. You can write to Sector offset if you wish to, choose 0 to start from sector zero. Choose 4DGL usd Raw GCI at Specified Offset option. Choose the Drive usd card is inserted in. Press OK to write to the usd card. If you previously had FAT formatting on the usd card, you will be prompted before writing to the usd card, press Yes to continue. 2012 4D Systems Page 5 of 15 www.4dsystems.com.au
Click the GC button and check the sector addresses for each media object. Displaying the image, video and the animation As mentioned earlier, the Host controller can now send the commands to the display module over the serial interface. We are using Serial Commander Software tool to simulate the Host controller. Serial Commander is a part of 4D Workshop4 IDE. Please also note, although, 4D Programming Cable is not needed by the Host Controller to connect to the Display module, it s needed to test the module with the Serial Commander. Now, insert the usd card in to the Display module, connect the module with the Host Controller and you are ready to send the commands to display the image, animation or the video using the sector addresses stated in the.gc file. Following section explains the relevant commands to be used to display the images, videos and animations. 2012 4D Systems Page 6 of 15 www.4dsystems.com.au
Click Media tab and send media_init command. 0xFF, 0xB1 Note: The actually quality of the image on the uoled-128-g2 is much better than the image shown, which is hampered due to lighting in the room from different sources. Send media_setsector command to set the sector address of the image as stated in the.gc file (Hi: 0x0000 Lo: 0x0000). 0xFF 0xB8 0x00 0x00 0x00 0x00 Send media_image command to display the image (X = 0, Y = 0). 0xFF 0xB3 0x00 0x00 0x00 0x00 Displaying the animation Send media_setsector command to set the sector address of the animation as stated in the.gc file (Hi: 0x0000 Lo: 0x0041). 0xFF 0xB8 0x00 0x00 0x00 0x41 Send media_video command to display the animation(x = 0, Y = 0). 0xFF 0xBB 0x00 0x00 0x00 0x00 TIP: You may wish to stop scrolling of the screen on the uoled-128-g2, if it is set to on by default, by setting the SSTimeout to 0. 0x00 0x0C 0x00 0x00 TIP: The Serial Commander accepts the Sector addresses in decimal. You may have to convert the hex to decimal, such as use 65 dec for41hex in the LoWord combo box in the Serial Commander. 2012 4D Systems Page 7 of 15 www.4dsystems.com.au
Note: Videos or animations are displayed using the same media_video command. Displaying the video Send media_setsector command to set the sector address of the video as stated in the.gc file (Hi: 0x0000 Lo: 0x0982). 0xFF 0xB8 0x00 0x00 0x09 0x82 Send media_video command to display the video (X = 0, Y = 0). 0xFF 0xBB 0x00 0x00 0x00 0x00 Goldelox SPE Command Set references All the above mentioned commands are explained in the following document, GOLDELOX-SPE-COMMAND-SET-REVXX.pdf Displaying a specific frame in a video Send media_setsector command to set the sector address of the video as stated in the.gc file (Hi: 0x0000 Lo: 0x0982). 0xFF 0xB8 0x00 0x00 0x09 0x82 Send media_videoframe command to display the video frame (say last frame of the video Nemo1, which is 604) at (X = 0, Y = 0). 0xFF 0xBA 0x00 0x00 0x00 0x00 0x02 0x5C 2012 4D Systems Page 8 of 15 www.4dsystems.com.au
Using the Host Controller As mentioned earlier, the Serial Commander is used here to simulate the Host Controller. User can send these commands from the Host Controller of their choice over the Serial Interface. There are Goldelox SPE libraries available for different Host Environments. Please check the Descriptions tab on the 4D Workshop4 IDE page. 2012 4D Systems Page 9 of 15 www.4dsystems.com.au
Proprietary Information The information contained in this document is the property of 4D Systems Pty. Ltd. and may be the subject of patents pending or granted, and must not be copied or disclosed without prior written permission. 4D Systems endeavours to ensure that the information in this document is correct and fairly stated but does not accept liability for any error or omission. The development of 4D Systems products and services is continuous and published information may not be up to date. It is important to check the current position with 4D Systems. All trademarks belong to their respective owners and are recognised and acknowledged. Disclaimer of Warranties & Limitation of Liability 4D Systems makes no warranty, either expresses or implied with respect to any product, and specifically disclaims all other warranties, including, without limitation, warranties for merchantability, non-infringement and fitness for any particular purpose. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. In no event shall 4D Systems be liable to the buyer or to any third party for any indirect, incidental, special, consequential, punitive or exemplary damages (including without limitation lost profits, lost savings, or loss of business opportunity) arising out of or relating to any product or service provided or to be provided by 4D Systems, or the use or inability to use the same, even if 4D Systems has been advised of the possibility of such damages. 4D Systems products are not fault tolerant nor designed, manufactured or intended for use or resale as on line control equipment in hazardous environments requiring fail safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines or weapons systems in which the failure of the product could lead directly to death, personal injury or severe physical or environmental damage ( High Risk Activities ). 4D Systems and its suppliers specifically disclaim any expressed or implied warranty of fitness for High Risk Activities. Use of 4D Systems products and devices in 'High Risk Activities' and in any other application is entirely at the buyer s risk, and the buyer agrees to defend, indemnify and hold harmless 4D Systems from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any 4D Systems intellectual property rights. 2012 4D Systems Page 10 of 15 www.4dsystems.com.au