want to make a counter

Status
Not open for further replies.

shahood

New Member
can any one tell me about 8051 assembly language ......i want to make pulse counter when pulse comes form any pin of micro controller and count it and send it on LCD display ..i have connected lcd to port 2 and rs ,rw, en connected p1.0, p1.1, p1.2 repetitively plz plz tell how could i make a counter when pin suppose p3.4 goes high count one and display on LCD 1 .....and go on to 9999 ....plz plz plz plz help me
 
To use T0 input you need to re-direct the clock input to the timer.

How much code have you written?... Have you the routines to run the LCD?? If yoy post what you have I'll take a look and see if I can get you going!!!

Also!! Read this article. https://www.electro-tech-online.com/articles/simple-interrupts-on-the-8051.654/

Half way down the page there is a description on the TMOD register and how to implement it!!
 
We know you do.... But we won't write it for you without some of your input!!!

I haven't time to completely write code all day, If I help you I expect you to start by trying to do it first!
 
Write a portion of code for me, how you think it should go... Even if you know parts are not correct, I'll walk you through it..

Download MCU8051IDE and then you can quickly debug your code to make sure you understand as you go along..
http://mcu8051ide.sourceforge.net/

Its a cool tool and will help you heaps...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…