通过C进行7段显示 [英] 7 segment display through C

查看:77
本文介绍了通过C进行7段显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿..我有一件很有趣的事.有人知道如何在7段显示器上显示C程序生成的数字,而不是在计算机屏幕上显示它吗?

更多细节:
我希望通过8255来做..
是否可以通过C程序将参数传递给汇编语言(.asm)程序?
例如

C程序

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

#include ....

void main ()
{
int a=2,b=2,x=a+b;
//passing 'x' to .asm program which will display '4' on 7 segment display.
}

推荐答案

可能您应该首先将显示器连接到计算机.您必须阅读显示器的技术文档,以将设备连接到PC并了解如何以编程方式访问它.


好的,您想使用8255芯片.那您知道如何将8255连接到PC吗?

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写道:
rags112 wrote:

是否可以通过C程序将参数传递给汇编语言(.asm)程序?

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


通常有一种方法,您应该检查C编译器的文档.
但是,您的问题看起来大不相同:您需要将数据从PC发送到8255,然后依次发送到LCD显示).



:)


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).



:)


如果要在外部7段显示器上显示数据,如CPallini所说,则需要找到合适的显示器和接口电路.这将需要连接到Serial Com端口或USB端口.

如果您可以使用串行端口(RS232),那么类似这样的方法就可以了....

http://www.futurlec.com/4x7_Segment.shtml [
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:


rags112写道:
rags112 wrote:

而不是在计算机屏幕上显示?

instead of displaying it on a computer screen?


你是什​​么意思??您无法将计算机屏幕上显示的内容路由到7段显示器.

如果要在7段上显示数字,则需要首先确定几件事;
例如您打算如何将显示器连接到计算机?串行或并行连接?显示器是否通过移位寄存器连接?等等...


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...


这篇关于通过C进行7段显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆