TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (347 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 (136223 times)
  2. FAT32 Library (69491 times)
  3. Network Ethernet Library (55709 times)
  4. USB Device Library (45993 times)
  5. Network WiFi Library (41639 times)
  6. FT800 Library (40801 times)
  7. GSM click (28789 times)
  8. PID Library (26332 times)
  9. mikroSDK (26059 times)
  10. microSD click (25145 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: 4985 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

Mikromedia 3 for Kinetis Capacitive FPI

0

This project contains example for testing modules on Mikromedia 3 for Kinetis Capacitive FPI.

[Learn More]

Thermo 3 click

0

This application read the temperature

[Learn More]

DHT22 2 click

0

DHT22 2 click is used for measuring the environmental temperature and relative humidity. It uses the AM2322 sensor, with very accurate thermal and humidity measuring capabilities. It can use either 1-Wire or I2C protocol to communicate with the integrated circuit.

[Learn More]