OFF
GO LOCAL
| Company | Stock | Price |
|---|---|---|
MIKROE-6603
17 g
Status:
Counter 2 Click is a compact add-on board designed for accurate counting of external clock pulses, ideal for monitoring repetitive digital events in embedded systems. It is based on the S-35770, a 24-bit binary-up counter IC from ABLIC that communicates via the I2C interface. The board supports counting ranges from 0 to 16,777,215 and includes a red LOOP LED indicator connected to the LP pin for visual overflow detection. It features a dedicated RST pin for external reset and supports the Click Snap feature that allows the counting module to be detached and used independently with access to all relevant signal pins. This Click board™ is well-suited for use in industrial metering, instrumentation, amusement equipment, and life-cycle tracking applications.
Counter 2 Click is fully compatible with the mikroBUS™ socket and can be used on any host system supporting the mikroBUS™ standard. It comes with the mikroSDK open-source libraries, offering unparalleled flexibility for evaluation and customization. What sets this Click board™ apart is the groundbreaking ClickID feature, enabling your host system to automatically detect and identify this add-on board, alongside a Click Snap feature introducing a new level of flexibility and ease of use.
This product is no longer in stock
Availability date:
OFF
| Company | Stock | Price |
|---|---|---|
Counter 2 Click is based on the S-35770, a 24-bit binary-up counter IC from ABLIC with an I2C interface that provides an accurate external event counting solution. This highly integrated device is designed to count externally input clock signals via the IN pin, making it ideal for applications such as industrial metering, instrumentation, amusement systems, and life cycle counters. The S-35770 monitors a rising edge (LOW to HIGH transition) on the IN pin to increment the counter value. It features a wide counting range from 0 up to 16,777,215 (0xFFFFFF), and once the maximum count is reached, the counter rolls over to 0 upon the next LOW to HIGH transition on the IN pin.

Communication with the host MCU is handled through a fast I2C-bus serial interface, supporting frequencies up to 1MHz, allowing read and write access to the counter’s internal registers. In addition to the standard I2C communication lines, the Click board™ uses an RST pin for externally resetting the counter. During I2C communication sequences, defined from the start to stop conditions, the IC temporarily halts edge detection on the IN pin to preserve count integrity. However, a single count-up operation may be triggered if the IN pin is LOW at the beginning and HIGH at the end of the I2C transaction.
This Click board™ is designed in a unique format supporting the newly introduced MIKROE feature called "Click Snap." Unlike the standardized version of Click boards, this feature allows the main sensor/IC/module area to become movable by breaking the PCB, opening up many new possibilities for implementation. Thanks to the Snap feature, the S-35770 can operate autonomously by accessing its signals directly on the pins marked 1-8. Additionally, the Snap part includes a specified and fixed screw hole position, enabling users to secure the Snap board in their desired location.
For clear visual indication of counter overflows, the board includes an LP (Loop) pin connected to a red LOOP LED, which lights up when the counter loops back to zero, providing immediate feedback to the user.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Click Snap is an innovative feature of our standardized Click add-on boards, designed to bring greater flexibility and optimize your prototypes. By simply snapping the PCB along predefined lines, you can easily detach the main sensor/IC/module area, reducing the overall size, weight, and power consumption - ideal for the final phase of prototyping. For more details about Click Snap, visit the official page dedicated to this feature.
Type
Rotary encoder
Applications
Ideal for use in industrial metering, instrumentation, amusement equipment, and life-cycle tracking applications
On-board modules
S-35770 - 24-bit binary-up counter IC from ABLIC
Key Features
24-bit binary-up counter with a wide counting range, I2C communication, external clock pulse detection, reset capability, counter overflow indication, temporary counting pause during I2C communication to preserve data integrity, support for the Click Snap feature, and more
Interface
I2C
Feature
Click Snap,ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
This table shows how the pinout on Counter 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
| Label | Name | Default | Description |
|---|---|---|---|
| LD1 | PWR | - | Power LED Indicator |
| LD2 | LOOP | - | Counter Loop LED Indicator |
| JP1 | VCC SEL | Left | Power Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
| Description | Min | Typ | Max | Unit |
|---|---|---|---|---|
| Supply Voltage | 3.3 | - | 5 | V |
| Counter Resolution | - | 24 | - | bits |
| Count Value | - | - | 16.777.215 | - |
Counter 2 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.
Example Description
This example demonstrates the use of the Counter 2 Click board. The application reads the current pulse count from the board and handles rollover events using the loop counter mechanism. It logs the total number of detected pulses, including those beyond the register's capacity.
Key Functions
counter2_cfg_setup This function initializes Click configuration structure to initial values.counter2_init This function initializes all necessary pins and peripherals used for this Click board.counter2_reset_counter This function performs a hardware counter reset by toggling the RST pin and synchronizing with the LOOP pin.counter2_get_counter This function reads the current 24-bit counter value via I2C.counter2_check_loop This function checks if the LOOP pin state has changed since the last call.Application Init
Initializes the logger and the Click board driver and resets the internal pulse counter.
Application Task
Periodically reads the counter value and checks for rollover (loop) events. Logs the total pulse count every second.
Application Output
This Click board can be interfaced and monitored in two ways:
Additional Notes and Information
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.