UP/DOWN counter with memory

This is a simple digital counter with a serial rs-232 and a 7 segment display, i started this project to count items on some shelfs, but it can be used for anything, it is also, for the exception of the connectors, completely on SMD components.

The circuit is made around a PIC16F88, and takes use of its internall EEPROM to store the number.

UP DOWN counter with memory

Im using PORTA to connect directly to the segment display thru a 100R resistor in each segment to protect each segment of the displays, then i use two lines from PORTB to multiplex the displays into showing units and decimals, by using the timer2 overflow interrupt with the presler at 1 meaning, if im not rong, that the display refresh at 250 nanoseconds thus impossible for the human eye to see. Each of this two lines connect first to the base of a transistor that drives the common anode on the 7 segment display, this way i spare my chip from suplying the main current thru it,prevents overheating and its always good practice to get power from the source.

Also on PORTB there are two lines from the switches, both switches have a pull-up resistor so when the button is pressed they go to ground, so the PIC is reading a 0 if the button is pressed.

I puted also a standard ICSP connector SV1, you can actually use this configuration of the ICSP connector to almost any microchip microcontroller, at least until today i havent found one that it didnt work.

The second chip on the schematic is a standard rs-232 level converter, ive wired it as in the datasheet and connected on the PIC AUSART(Addressable Universal Synchronous Asynchronous Receiver Transmitter) module, its the only part of the circuit not tested yet, i havent made any code to work with it.

The entire circuit is powered directly with 5V from the connector wich includes also the serial TX and RX lines to connect to a PC, i can later also see the numbers on the computer and even insert numbers into it, also ill write software to read several counters and colect the data into a computer to monitor shelfs items and manage stock.

And finally i have a two pins small header with the last remaining unconected pins, i usually do this so i can access them in the future if necessary, for example to add more functions to the circuit.

For more detail:Β  UP/DOWN counter with memory


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.