Continue to Site

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 microcontroller ,lcd and 4 decimal digit increment

Status
Not open for further replies.

Samrat005

Newbie level 3
Joined
Feb 20, 2019
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
31
In keil ,89s52 microcontroller,
I want to 4 digit show 16*2 lcddisplay ,I want to increment 0000 to 1000. What can I do?
 

Hi,

We don´t know nothing....

* What have you done so far?
* What are your ideas?
* What is your knowledge level?
* Draw and show the schematic
* Draw and show a flow chart.

Ask a detailed question... Because "What can I do" is much too global.

Klaus
 

8051 microcontroller

This is my increment number in8051 microcontroller keil program...
Code:
p=num/1000;
b=(num/100)%10;
a=(num/10)%10;
n=(num/1)%10;
p=p+0x30;
b=b+0x30;
a=a+0x30;
n=n+0x30;
lcddat(p);
lcddat(b);
lcddat(a);
lcddat(n);
..

This is my 4 digit number(0000 to 9999) increment c program in keil using 89s52 microcontroller .
But lcd only count 0000 to 0250 digit.
I want lcd conut 0000 to 9999 digit number.
Please help me sir/madam.
 

Re: 8051 microcontroller

Sir , please explain with c code !
What are you saying.i don't understand.so.
 

Re: 8051 microcontroller

Your variables are apparently 8 bit unsigned. Use 16 bit data type. I would use sprintf() for decimal output formatting.

- - - Updated - - -

Show your code with variable declarations.
 

Hi,

I´ve merged your threads.

Instead of starting a new thread you should try to give the requested informations.
Don´t expect that others do your job and write code for you. But you will find a lot of people here helping you to correct your code.

Klaus
 

Re: 8051 microcontroller

Sir I used sprint(ch,"%u",val)
But program can not run and
display error c267: requires ANSI -style prototype.
Please sir help me .,
Now what is this solution ????
 

Attachments

  • 15510140394799096053595852545134.jpg
    15510140394799096053595852545134.jpg
    481.4 KB · Views: 128

We can see what you wrote but it doesn't help with a diagnosis.
A missing ANSI prototype generally means you have written a function but not previously defined a prototype for it. The missing prototype is probably for the routine called 'counter()' but so much of your code is not shown that it could easily be something else. We need to see which '.h' files you have included and how the variables you are using have been declared.

Try attaching the code to your message so we can see it in full.

Brian.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top