C# and hardware

Posted on 2005-04-25
Last Modified: 2007-12-19
Hi experts,

I am a beginner here. I was wondering if C# is good to incorporate with Hardware? For example, i would like to create a LED light up to some number based on C#. is it possible?

second question is "What is the most convenient and normally a programming language of choice when programming with hardware?"

third question is "How can i download the pogramming code into the Chips or LED or any board i programmed?"

Thank you very much
Question by:sokhodom
    LVL 21

    Expert Comment

    for all hardware programming if you don't use some kind of assambly language already, your choice would be C.

    C# is not appropriate since id doesn't support any native coding - it's not possible to write drivers using C#. You can find probably tricks and work arounds but in general one wouldn't use C# for any programming you're talking about.

    About downloading programming code is a bit different story. Your chip will understand only binary/octal/hexadecimal commands - like 01 00 01 00 10 11 11 00, or 0134 2500 4327, or F01B A1B3 435D.

    I'm not positively sure about nowadays but before you could manually program your chip with with instructions in any of the above commands using a programmator and it was very tiresome.

    In normal curcumstances, you would have some environment in which you write someting in C, for example, then it will be compiled into assembly, and downloaded into your chip(s).

    Though I have some doubts you can program LEDs directly since they're just diods and want accept any kind of programming language at all ;) they can be of course used as means of output

    LVL 8

    Author Comment

    thank you Yurich,

    So C is basically is used for Programming hardware ? HOw about C++? Which one would be an ideal programming choice?
    in term of C#? What kind of application that it found to be useful in? Window application? If that's so, what the advantage of C# over VB.NET? I've seen the trend in using C# but i do not understand why it is so. Thank you for enlighten me in this case.

    Could you explain me more about How can i download into a chip or something that i can programme a LED? (I've seen the product at the market, where one can make LED running like: "Thank you for shopping With Us"

    LVL 21

    Accepted Solution

    C is used not only for programming hadrware, it's just the "lowest" of the high-level languages and it allows effective manipulation of system resources etc. C++ is not as good for hardware programming as C. Windows is written for example in C and C++. C# is very good for windows-, web-, database- and etc applications. There is no much difference now between c# and as it was between c++ and vb but c# is still more functional, there're a lot of discussions over this online, and probably it's just a prejudice but even microsoft people count c# as more serious then ;) try run google search and enter c# vs, you'll get thousands results ;)

    As for your "Thank your for shopping with us", I think it's a lot less envolving - this product would be pre-programmed, or you would use a set of switches on the board to change the lettering. Anyway, it would hardly envolve any language at all as it doesn't need it.


    LVL 8

    Author Comment

    thank you once agian Yurich,
    That's answer it all.
    Great Job :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now