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 (136554 times)
  2. FAT32 Library (69758 times)
  3. Network Ethernet Library (55855 times)
  4. USB Device Library (46196 times)
  5. Network WiFi Library (41817 times)
  6. FT800 Library (41012 times)
  7. GSM click (28931 times)
  8. PID Library (26386 times)
  9. mikroSDK (26297 times)
  10. microSD click (25307 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: 5036 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

AudioAmp 8 click

0

AudioAmp 8 Click is a compact add-on board that reproduces input audio signal at sound-producing output elements, with desired volume and power levels. This board features the MA12070, a super-efficient audio power amplifier from Infineon Technologies. This I2C configurable audio amplifier is based on proprietary multi-level switching technology, enabling low power loss during operation. It supports a supply voltage range from 4 to 26V, allowing it to be used in many applications. Besides, it is equipped with protection features, allowing a reliable operation.

[Learn More]

7x10 B click

0

7x10 B click can be used for displaying letters on display with 7x5 font resolution. It carries a matrix of 70 green LEDs driven by a pair of 8-bit serial-in, parallel-out shift registers, a Darlington Transistor array and a Johnson counter.

[Learn More]

I2C MUX 3 click

5

I2C MUX 3 Click is a compact add-on board that contains eight bidirectional translating switches dedicated for applications with I2C slave address conflicts. This board features the TCA9548APWR, a low voltage 8-channel I2C bus switch with an active-low reset input from Texas Instruments.

[Learn More]