Komparator-Click-Platine
Komparator-Click-Platine
Das Comparator Click Board™ von MikroElektronika ist ein Spannungskomparator auf einer Click Board™-Zusatzplatine mit einem Präzisionsspannungskomparator LM2903. Dieser LM2903 IC verfügt über zwei unabhängige Spannungskomparatoren, zwei Schraubklemmenpaare (zwei zusätzliche Schraubklemmen sind für GND-Verbindungen) und zwei Potentiometer.
Es kann mit einer einzelnen oder doppelten Stromversorgung über einen weiten Spannungsbereich verwendet werden. Die Schraubklemmen ermöglichen dem Benutzer den Anschluss separater Eingänge, während die beiden Potentiometer zwischen den Schraubklemmen und dem IC die Sollspannung konfigurieren. Jeder Eingang hat seinen eigenen Interrupt-Pin am Sockel, d. h. einer über den MikroBUS INT-Pin, der andere anstelle des standardmäßigen MikroBUS AN-Pins.
Das Comparator Click Board™ ist für die Verwendung einer 3,3-V- oder einer 5-V-Stromversorgung ausgelegt.
IC/module: LM2903 IC
The LM2903 IC consists of two independent precision voltage comparators on the Click Board™ that operate over an extensive range of voltages. The comparators can operate from a single power supply as well as dual supplies.
How Does The Comparator Click Board Work?
When paired with analog sensors, the Comparator Click Board™ allows user to hook up an analog signal. The voltage from this analog signal is used as an input and compared with the physical value set as a reference by using the potentiometer. The device will then digitally check if your input voltage is higher or lower than the referenced value. If the input value exceeds, an interrupt signal is triggered.
Power: Single-Supply or Dual Supplies
The Comparator Click Board™ is designed to be used with single or dual power supply. For single power supply,
Software Support
Library Description
The library covers all the necessary functions to control the Comparator Click Board™. The Comparator Click Board™ communicates with the device via GPIO driver. This library contains drivers for check state of the OUT1 and OUT2 pin function.
Key Functions
- uint8_t comparator_checkOutputOne() - Check state of the OUT1 pin function.
- uint8_t comparator_checkOutputTwo() - Check state of the OUT2 pin function.
Example Description
The application is composed of three sections:
- System Initialization - Initializes GPIO and LOG structures, sets AN and INT pins as input and start to write log.
- Application Initialization - Initialization driver enables - GPIO also, write log.
- Application Task - (code snippet) This is an example which demonstrates the use of Comparator click board. Comparator clicks checks state of the OUT1 and OUT2 pins. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 1 sec.
void applicationTask() { outStateOne = comparator_checkOutputOne(); outStateTwo = comparator_checkOutputTwo(); mikrobus_logWrite( " Output One : ", _LOG_TEXT ); if ( outStateOne ) mikrobus_logWrite( "High", _LOG_LINE ); else mikrobus_logWrite( "Low", _LOG_LINE ); mikrobus_logWrite( " Output Two : ", _LOG_TEXT ); if ( outStateTwo ) mikrobus_logWrite( "High", _LOG_LINE ); else mikrobus_logWrite( "Low", _LOG_LINE ); mikrobus_logWrite( "-------------------", _LOG_LINE ); Delay_1sec(); }
Other mikroE Libraries used in the example:
GPIO
UART
Conversion
Additional notes and informations
Depending on the development board you are using, you may need a 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
Software Support
Library Description
The library covers all the necessary functions to control the Comparator Click Board™. The Comparator Click Board™ communicates with the device via GPIO driver. This library contains drivers for check state of the OUT1 and OUT2 pin function.
Key Functions
- uint8_t comparator_checkOutputOne() - Check state of the OUT1 pin function.
- uint8_t comparator_checkOutputTwo() - Check state of the OUT2 pin function.
Example Description
The application is composed of three sections:
- System Initialization - Initializes GPIO and LOG structures, sets AN and INT pins as input and start to write log.
- Application Initialization - Initialization driver enables - GPIO also, write log.
- Application Task - (code snippet) This is an example which demonstrates the use of Comparator click board. Comparator clicks checks state of the OUT1 and OUT2 pins. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 1 sec.
void applicationTask() { outStateOne = comparator_checkOutputOne(); outStateTwo = comparator_checkOutputTwo(); mikrobus_logWrite( " Output One : ", _LOG_TEXT ); if ( outStateOne ) mikrobus_logWrite( "High", _LOG_LINE ); else mikrobus_logWrite( "Low", _LOG_LINE ); mikrobus_logWrite( " Output Two : ", _LOG_TEXT ); if ( outStateTwo ) mikrobus_logWrite( "High", _LOG_LINE ); else mikrobus_logWrite( "Low", _LOG_LINE ); mikrobus_logWrite( "-------------------", _LOG_LINE ); Delay_1sec(); }
Other mikroE Libraries used in the example:
GPIO
UART
Conversion
Additional notes and informations
Depending on the development board you are using, you may need a 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
Komparator-Click-Platine
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.