We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2019-07-30
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: OSD
Downloaded: 7410 times
Followed by: 1 user
License: MIT license
This is a sample program which demonstrates the use of OSD click.
Program shows the time and date in corners of the screen and enable you to set the time and date, using the OSD menu.
Do you want to subscribe in order to receive notifications regarding "OSD click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "OSD click" changes.
Do you want to report abuse regarding "OSD click".
Library Description
The library covers all the necessary functions to control OSD click board. The library performs the communication with the device via SPI protocol by writing to registers and by reading from registers.
Key functions:
void osd_writeByte( uint8_t regAddress, uint8_t writeData )
- Write the byte of data function.uint8_t osd_readByte( uint8_t regAddress )
- Read the byte of data function.void osd_writeCharacter( uint8_t linePos, uint8_t rowPos, uint8_t symbol )
- Write a character by position function.Examples description
The application is composed of the three sections :
void applicationTask() { for ( cnt = 0; cnt < 30; cnt++ ) { if( HEADER_TEXT[ cnt ] != ' ' ) { osd_writeCharacter( 1, cnt, HEADER_TEXT[ cnt ] ); } if( MESSAGE_TEXT[ cnt ] != ' ' ) { osd_writeCharacter( 7, cnt, MESSAGE_TEXT[ cnt ] ); } if( FOOTER_TEXT[ cnt ] != ' ' ) { osd_writeCharacter( 14, cnt, FOOTER_TEXT[ cnt ] ); } Delay_1sec(); } osd_clearsCharPlaces( 0, 0, 16, 30 ); Delay_1sec(); }
Other mikroE Libraries used in the example:
SPI
UART
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.