TOP Contributors

  1. MIKROE (2652 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136630 times)
  2. FAT32 Library (69834 times)
  3. Network Ethernet Library (55887 times)
  4. USB Device Library (46226 times)
  5. Network WiFi Library (41861 times)
  6. FT800 Library (41081 times)
  7. GSM click (28943 times)
  8. PID Library (26402 times)
  9. mikroSDK (26316 times)
  10. microSD click (25328 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Fiber Opt click

Rating:

0

Author: MIKROE

Last Updated: 2019-07-30

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: Fiber optics

Downloaded: 5051 times

Followed by: 1 user

License: MIT license  

This is demonstration project how Fiber Opto click can be used in communication applications.
Example can be tested on single development system with loop connection(Rx1-Tx1) or in pair with other development system + Fiber Opt click (Rx1-Tx2; Rx2-Tx1).

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Fiber Opt click " changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Fiber Opt click " changes.

Do you want to report abuse regarding "Fiber Opt click ".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Front / Back View

Front / Back View

Fiber Opt click front and back view

View full image

Library Description

Defines and initializes driver's UART bus. Declares and defines driver's functions for sending and receiving data bytes, also for checking if data byte ready for reading.

Key functions:

  • void fiberopt_writeByte(uint8_t input) - Writes sinle byte.
  • uint8_t fiberopt_readByte() - Read received byte.
  • uint8_t fiberopt_byteReady() - Checks is there a new byte received.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes UART and LOG structures.
  • Application Initialization - Initalizes UART driver and makes an initial log.
  • Application Task - Example can either check if new data byte is received in rx buffer (ready for reading), if ready than reads one byte from rx buffer and displays on USART terminal, or transmit message every 2 seconds.
void applicationTask()
{
    char tmp;
    uint8_t rdyFlag;

    // RECEIVER - UART polling

    rdyFlag = fiberopt_byteReady();

    if (1 == rdyFlag)
    {
        tmp = fiberopt_readByte();
        mikrobus_logWrite( &tmp, _LOG_BYTE );
    }

    // TRANSMITER - TX each 2 sec
    /*
    for (tmp = 0; tmp < 9; tmp++)
    {
        fiberopt_writeByte( MESSAGE_DATA[tmp] );
        mikrobus_logWrite( "MESSAGE SENT", _LOG_LINE );
    }

    Delay_ms(2000);
*/
}

Other mikroE Libraries used in the example:

  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

Fiber Opt click schematic

Fiber Opt click schematic

The schematic of the Fiber Opt click board.

View full image

ALSO FROM THIS AUTHOR

LTE IoT 7 click

0

LTE IoT 7 Click is an add-on board representing a secure-cloud multi-band solution designed for IoT applications. This board features the SARA-R422M8S, a multi-band LTE-M/NB-IoT/EGPRS multi-mode solution with integrated high-performance standard precision M8 GNSS receiver for global position acquisition from u-blox. Equipped with familiar AT commands set over the UART interface, USB interface, and Network and Status indicators, it also provides over-the-air firmware updates, end-to-end trusted domain security, and u-Blox’s leading GNSS technology.

[Learn More]

Wireless SUN click

0

Wireless SUN Click is a compact add-on board representing a Wireless Smart Utility Network for Field Area Network (Wi-SUN FAN) solution. This board features the BP35C5, a Wi-SUN FAN-compatible wireless communication module from Rohm Semiconductor. The BP35C5 operates in the 920MHz band and includes a Wi-SUN software stack that enables operation at different transmission modes for high efficiency. Besides, certification under ARIB and the FCC allows immediate use in Japan and the US in large-scale (up to 1,000-node Sub-GHz) multi-hop mesh networks supporting channel hopping.

[Learn More]

Ambient 6 click

0

Ambient 6 click can sense the intensity of the ambient light, providing the measurement data in digital format over the I2C interface.

[Learn More]