Botroniks Arduino codes for everyone = PCC1040A: Up to 2 separate pulse counters with status display on PC - FREE!

BotronikS - Final code for all types of Arduino and PC users: -- HOME -- CONTACT


misc: Wires: (link) 1--2--3
connections (click to enlarge)
- Need additional accessories:

PCC1040A: Up to 2 separate pulse counters with status display on PC - FREE!
After updating the offered Arduino code and PC Application, it is possible to read both counters status on PC screen...
For Arduino boards:: NANO -- UNO -- MEGA
Arduino pins are used: A0=CounterInput1 A1=CounterInput2 ( input connect to GND to counter increase )
Electrical note: (Recommendation:Use the following accessories for testing as well as for later use: Lnk1 - Lnk2 )
Used pins are connected to 5V via resistor(s) 3K3-4K7 (if the used sensor does not have a built-in resistor)
If only a USB power supply is used, pay attention to the operating voltage of the selected sensor (4.5-5.5V) and consumption (<50mA).
A push button (contact) or some NPN type of sensor (voltage 5V) can be connected to the counter input. - Lnk1
Code limits:
Max counter value is 30000 then start at 1
Max counter frequency is up to 2Hz.
Download the FreeHEX codes below, unpack and upload to the proper Arduino board (Use a free net tool for example XLoader)
1. uc ATmega328-16MHz-5V (NANO,UNO..): PCC1040A-M328
2. uc AtMega2560 (Mega (ATMEGA2560)...): PCC1040A-M2560
You can test the uploaded code using some free serial communication software such as Termite
Description of program commands
AT command (ASCII characters) - 9600 Baud ,8 Data bits,None Parity,1 Stop Bit - AT commands must be uppercase, lowercase invalid
AT - attention command (returns OK)
AT+INF - software code info (returns ucAppName)
AT+C1 - Reading Counter1 value (returns CNN1=xxx)
AT+R1 - RESET Counter1 value to 0 (returns CNN1=0)
AT+C2 - Reading Counter2 value (returns CNN2=xxx)
AT+R2 - RESET Counter2 value to 0 (returns CNN2=0)
For those familiar with ArduinoIDE programming: PCC1040A - PCC1040Azip
PC Application(s):
PC Application(s) (for WINDOWS): In order for the offered PC applications to work, it is necessary to download and install (only first time): VB6RunTimePlus2.2
Download the PC application, unpack and start (allow windows to start applications - how) enter the COM port number where the Arduino is connected and use that.
PC App: PCC1040A-PcApp1