Skip to content

An industrial counter built using PIC16F877A microcontroller and displaying count and rate on LM016L LCD.

Notifications You must be signed in to change notification settings

SulaimanNiazi/Industrial_Production_Counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Industrial Production Counter

This project is a firmware application designed for the PIC16F877A microcontroller to count industrial production items. It displays the count and rate on LM016L LCD. The rate is refreshed every 10 seconds. The firmware is developed using the MPLAB X IDE and the XC8 compiler.

Table of Contents

Prerequisites

  • MPLAB X IDE
  • XC8 Compiler
  • PIC16F877A Microcontroller

Building the Project

  1. Open the project in MPLAB X IDE.
  2. Ensure the XC8 compiler is selected.
  3. Build the project to generate the .hex or .cof file.
  4. Alternatively, you can build the project using Visual Studio Code with the MPLAB extension. Set the project output file path, name, and extension using Ctrl+Shift+P and selecting "Edit Project Properties".

Apparatus

Necessary components that can't be changed:

  1. PIC16F877A microcontroller: To run the program.
  2. LM016L LCD display: To display output.
  3. Quartz Crystal and 2 1nF non polarized capacitors.

Optional components depending on your circuit:

  1. Button: For clear input button.
  2. LED: To indicate that an item is being detected.
  3. OP-47 Op - Amp: For amplifying sensory input.
  4. RLY-SPNO Magnetic Relay: to provide stable 5V to CCP pin.
  5. Rheostat: To adjust op - amp potential according to sensor input
  6. APDS-9002 Miniature Surface-mount Light Photo Sensor: For detecting the items.
  7. 5 Resistors

Uploading to the Microcontroller

After building the project, upload the generated .hex or .cof file to the PIC16F877A microcontroller using a suitable programmer. The file can be find in either of the following paths:

  1. In case of using MPLAB X IDE: dist\default\debug\Industrial_Production_Counter.X.debug.hex
  2. In case of using VScode (if the file name was set as default): out\Industrial_Production_Counter\default.hex