Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys .. i have very interesting thing. does anybody of you know how to display a number generated by a C program on 7 segment display instead of displaying it on a computer screen?

further details:
I wish to do it via 8255 ..
Is there any way to pass parameters to an assembly language (.asm) program through C program?
e.g.

C program
C
#include ....

void main ()
{
int a=2,b=2,x=a+b;
//passing 'x' to .asm program which will display '4' on 7 segment display.
}
Posted
Updated 30-Mar-10 22:46pm
v2

Possibly you should first connect the display to the computer. You must read the display's technical documentation both for connecting the device to the PC, and to know how to programmatically access it.


OK, you would like to use the 8255 chip. Do you know how to connect the 8255 to the PC, then?

rags112 wrote:
Is there any way to pass parameters to an assembly language (.asm) program through C program?

Usually there is a way, you should check your C compiler's documentation.
However your problem looks quite different: you need to send data from the PC to the 8255 and, in turns to the LCD display).



:)
 
Share this answer
 
v2
If you want to display your data on an external 7 segment display, as CPallini says above, you will need to find a suitable display and interface circuit. This will need to connect either to the Serial Com port or the USB port.

If you can use the Serial Port (RS232) then something like this would be good ....

http://www.futurlec.com/4x7_Segment.shtml[^]

It will come with a data sheet of commands which will explain how to drive it.

Good Luck! :thumbsup:
 
Share this answer
 
v2
rags112 wrote:
instead of displaying it on a computer screen?

What do you mean by that?? You can't route what you display on the computer screen to a 7-segment display.

If you want to display a number on a 7 segment, there are several things you would need to figure out first;
for e.g. How do you plan to connect the display to the computer? serial or parallel connection? Is the display connected thorough a shift-register? and so on...
 
Share this answer
 
I am sorry, I don't understand what you are trying to achieve here. The 8255 is a peripheral interface chip, so I guess you have an embedded system using a 8085 microprocessor or similar.

Is your 'C' code for the microprocessor or a PC? :)
 
Share this answer
 
I would use IO-Warrior24->(I2C)->MAX6955. Once the parts are on your desk, its a matter of 60 minutes or so to put them together.
 
Share this answer
 
Comments
Sandeep Mewara 24-Jul-10 12:39pm    
Reason for my vote of 1
Whats the point of replying to 3-4 month old question? By now, OP must have already moved on.
RealSkydiver 24-Jul-10 13:30pm    
Well, you read it. I check my posts every now and than - so could the OP. Or, even if not, someone else might stumble across this post, years later. What's wrong with making their lifes easier?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900