TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136552 times)
  2. FAT32 Library (69746 times)
  3. Network Ethernet Library (55849 times)
  4. USB Device Library (46189 times)
  5. Network WiFi Library (41811 times)
  6. FT800 Library (41001 times)
  7. GSM click (28930 times)
  8. PID Library (26386 times)
  9. mikroSDK (26289 times)
  10. microSD click (25303 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: 5035 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

PAC1921 click

0

PAC1921 click is a versatile power monitoring and measuring device intended for the high speed, low latency measurements. This device can measure current, voltage or the power of the connected load.

[Learn More]

Brushless 8 click

0

Brushless 8 Click is a compact add-on board suitable for controlling BLDC motors with any MCU. This board features the TC78B042FTG, a sine-wave PWM drive three-phase full-wave brushless motor controller from Toshiba Semiconductor.

[Learn More]

UWB click

5

UWB Click is an Ultra-Wideband transceiver Click board that can be used in 2-way ranging or TDOA location systems to locate assets to a precision of 10 cm and supports data rates of up to 6.8 Mbps. This board features the DWM1000 module based on Decawave's DW1000 Ultra-Wideband (UWB) transceiver from Decawave Limited.

[Learn More]