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-03-04
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: RS232
Downloaded: 4778 times
Not followed.
License: MIT license
UART I2C/SPI Click is an all-in-one solution which allows ESD-protected RS-232 connectivity to any embedded application while bridging the UART and I2C/SPI interfaces at the same time.
Do you want to subscribe in order to receive notifications regarding "UART I2C/SPI click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "UART I2C/SPI click" changes.
Do you want to report abuse regarding "UART I2C/SPI click".
Library Description
Library contains basinc functions for working with the click board.
Key functions:
void uarti2cspi_init(uint16_t baud)
- Function for initializing the click board.uint8_t uarti2cspi_uartRead()
- Function for reading a character.void uarti2cspi_uartWrite(uint8_t wByte)
- Fucntion for writing a character.Examples description
The application is composed of the three sections :
void applicationTask()
{
uint16_t counter_var;
char text[5];
for(counter_var=0;counter_var<10;counter_var++)
{
WordToStr(counter_var,&text[0]);
Ltrim(&text[0]);
uarti2cspi_serialWrite(&text[0],_LINE_PRINT);
}
uarti2cspi_serialWrite(&str1[0],_LINE_PRINT);
uarti2cspi_serialWrite(&str2[0],_LINE_PRINT);
uarti2cspi_uartWrite(0x00);
while(1)
{
uarti2cspi_uartWrite(uarti2cspi_uartRead());
}
}
Additional Functions :
All additional functions such as timer initialization and default handler.
Other mikroE Libraries used in the example:
Conversions
C_String
SPI
I2C
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.