Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8051 rpm program in assembly language

Status
Not open for further replies.

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
hi...
i am trying to design a rpm meter using 8051 in assembly language not in c programming....plz help me.....:cry:
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,145
A simple procedure of counting number of pulses in one second is shown in the attached file. Detailed procedure and logic is also discussed. This can be modified to count pulses for one minute or one second count could be multiplied by 60 to get count per minute.
To get RPM some sensor has to be included to provide TTL pulses that can be counted.
The result of counting is displayed as 16 bit binary number on port 0 and port 2. You can modify this to suit your requirement.
 

Attachments

  • Counting Pulses.doc
    33 KB · Views: 93
Last edited:
  • Like
Reactions: SUIT and azad5

    azad5

    Points: 2
    Helpful Answer Positive Rating

    SUIT

    Points: 2
    Helpful Answer Positive Rating

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
hey....where is the attached file....:-(

---------- Post added at 18:06 ---------- Previous post was at 17:55 ----------

thanks...i got the file but how would i covert it to 60 sec and another thing is that i want ot show my result on lcd........
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,145
The subroutine ONESEC is called 60 times for one minute = 60 second delay. That is all you have to do.
So far as displaying the same on LCD is concerned, you have to convert the number to BCD and then to ASCII and send to the LCD display. Interfacing LCD display is a different task altogether. If needed I can post a similar worksheet for LCD interfacing.
 

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
can you send me circuitry of counting pulses??????????????
 

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
thank you sir....my program has been done:grin:
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,145
You need to connect the input to port bit p3.5 and LED's to the two output ports, that is all. Hope you did the same best luck.
 

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
thank you sir....my program has been done
 

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
hi....i want to wireless this data using 89c51 and display on PC...can u help me???:|
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,145
hi....i want to wireless this data using 89c51 and display on PC...can u help me???:|

Wireless communication may prove bit lengthy. Most of the times the time constraint works against making the project too ornamental. Why dont you consider serial communication and receiving it on PC and displaying it some elegant impressive fashion.
Otherwise plan what wireless communication you would prefer !
Raoof
 

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
exactly sir i want to serially communicate my data and display on PC...so how will i do??
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,145
Use max 232 for serial communication. Can you show the schematic you are using in the present setup.
It is easy, you may need to replace the crystal with one of 11.0592 MHz, this is required for generating valid baud rates.
By the way did you find any of the above posts useful and could try its implementation !!
Raoof
 

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
i have already connected max232 circuit and i hav a problem in programming and i want to show on hyper terminal....if u want then i will give my coding..and give my ur email ID.....actually my project is that to count steps and to take pulses per min then both data show on PC...
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,145
Tell me one thing, I sent a doc file counting pulses.doc in post #2. Could you usefully use it ? Was it useful ?
If yes then I have a similar writeup regarding serial port communication with code in assembly and instructions.
Raoof
 

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
yes that was very useful to me...and i hav implemented in my project....
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,145
I am attaching a file with this post that gives step by step approach to send data to computer using serial port. Dont forget to press helped me button if you really find it useful.



Raoof
 

Attachments

  • Serial communication.doc
    37 KB · Views: 25

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
ok sir let me check & tell you...

---------- Post added at 12:27 ---------- Previous post was at 12:11 ----------

sir problem is that i want to sent bit of data just like 'wireless', so then what will i do and other thing is that and i want to display my counter on terminal.exe just like lcd...means when 2 is come then 1 is removed....means i have a problem in hyper terminal too......
 

hassanumer

Newbie level 6
Joined
Oct 14, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
actually...how will i send counter program to computer...and how will i display on hyper terminal......???????

---------- Post added at 22:31 ---------- Previous post was at 22:30 ----------

Another thing is that i have a problem in hardware too...
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,145
Please indicate the hardware problem clearly, you will be able to fix it soon, the forum is active with effective support.
For display purpose is the hyper terminal a necessity or other display options are open ?
actually...how will i send counter program to computer.
Actually you would be interested in sending the counter value, a number, so there seems to be no need of attempting to send program, if I understand the issue properly.
A Raoof Khan
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top