Click here to Skip to main content
15,896,606 members
Home / Discussions / C#
   

C#

 
RantRe: Can I write programs in C # to Micro Controllers Pin
Nasir131-Aug-09 3:58
Nasir131-Aug-09 3:58 
GeneralRe: Can I write programs in C # to Micro Controllers Pin
Dave Kreskowiak1-Aug-09 5:07
mveDave Kreskowiak1-Aug-09 5:07 
GeneralRe: Can I write programs in C # to Micro Controllers Pin
DaveyM691-Aug-09 7:03
professionalDaveyM691-Aug-09 7:03 
AnswerRe: Can I write programs in C # to Micro Controllers Pin
HimanshuJoshi1-Aug-09 3:54
HimanshuJoshi1-Aug-09 3:54 
GeneralRe: Can I write programs in C # to Micro Controllers Pin
Nasir131-Aug-09 4:34
Nasir131-Aug-09 4:34 
RantRe: Can I write programs in C # to Micro Controllers Pin
Nasir131-Aug-09 4:39
Nasir131-Aug-09 4:39 
GeneralRe: Can I write programs in C # to Micro Controllers Pin
OriginalGriff1-Aug-09 4:58
mveOriginalGriff1-Aug-09 4:58 
AnswerRe: Can I write programs in C # to Micro Controllers [modified] Pin
mustang861-Aug-09 16:32
mustang861-Aug-09 16:32 
Sorry, I'll have to disagree with most of the above. Frown | :(
I will admit that I am fairly new to C# and .NET!
But, I've been doing embedded systems and coding for over 20 years. I still remember using punched cards, paper tape, teletype terminals, etc.


Right now, as far as I know, there isn't C# compiler that will allow someone to do their embedded OS from scratch.

But, C# isn't magic. In fact, *I* would say that it's light years beyond the horrible job that was done with the C++ spec. IMHO, C++, represents just about everything that could be wrong with a language!

BTW: I've done YACC and other custom compilers/assemblers for micros/minis. Remember, back in the old days, that's often how things were done.

As for the "garbage collection" for C++, that's what gets into a gray area for micros. IMHO, there is no such thing as a "standard" C/C++ compiler. Yea, there's the BS standard. So what? It's vague in areas, and unless you do sizeof for everything, your code will break. Even then, compiler support differs.

So, the point is that for C# (or any other language), there's always "wiggle room" when it comes to how a company will do a compiler for an embedded micro. It would not be "unreasonable" if a compiler company added some other requirements or restrictions in the coding due to the C# intended use of garbage collection. For example, a compiler company may require an explicit call to the GC, and/or additional constructor/destructor coding.


Microsoft made Visual Studio C# output platform and processor independent. So, as long as you have enough memory, in theory, you can run your VS programs on any platform. Again, we get into the "embedded vs Windows" world of things. So, not all of the Windows calls makes sense in an embedded app.

IMHO, it will be hard for any language to compare to C for embedded apps. Sorry, IMHO, C makes far more sense in many way verses assembler. Or, IMHO, any other language. For one thing, C can be coded much faster and is far easier to understand. Also, C can be optimized. People suck at optimizing code. Now, it's very rare that a company has the time or desire to spend time on greatly optimizing code. Heck, I'd say that in 99.9999% of the code that is used by people, from the company's point of view, added features were far more important than speed or stability fixes. So, getting code done quickly often takes much higher priority than speed or compactness.


As for .NET in embedded applications, it's being done. I think a few people on here are involved in .NET on embedded systems.
http://www.embedded.com/news/embeddedindustry/197005919?_requestid=208524[^]

http://blogs.msdn.com/mikehall/archive/2007/02/05/net-microframework-and-windows-ce-what-s-the-difference.aspx[^]


As for me, I'll stick to C for my embedded systems, and I'll use C# for my Windows apps. IMHO, those are the best for each application. Smile | :)

modified on Saturday, August 1, 2009 10:47 PM

GeneralRe: Can I write programs in C # to Micro Controllers Pin
OriginalGriff2-Aug-09 0:45
mveOriginalGriff2-Aug-09 0:45 
QuestionCreate DAL/ BLL Pin
Chazzysb1-Aug-09 1:23
Chazzysb1-Aug-09 1:23 
AnswerRe: Create DAL/ BLL Pin
Eddy Vluggen1-Aug-09 7:13
professionalEddy Vluggen1-Aug-09 7:13 
AnswerRe: Create DAL/ BLL Pin
Not Active1-Aug-09 9:15
mentorNot Active1-Aug-09 9:15 
QuestionImplementation help. Cheers Guys!! Pin
PSMITH821-Aug-09 0:25
PSMITH821-Aug-09 0:25 
QuestionError: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information. Pin
Omar Akhtar Sheikh31-Jul-09 23:58
Omar Akhtar Sheikh31-Jul-09 23:58 
AnswerRe: Error: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information. Pin
Moreno Airoldi1-Aug-09 2:00
Moreno Airoldi1-Aug-09 2:00 
Questiondisplay text in textbox Pin
Abdul Rahman Hamidy31-Jul-09 22:26
Abdul Rahman Hamidy31-Jul-09 22:26 
AnswerRe: display text in textbox Pin
OriginalGriff31-Jul-09 22:44
mveOriginalGriff31-Jul-09 22:44 
GeneralRe: display text in textbox Pin
Abdul Rahman Hamidy31-Jul-09 22:53
Abdul Rahman Hamidy31-Jul-09 22:53 
GeneralRe: display text in textbox Pin
AhsanS31-Jul-09 23:05
AhsanS31-Jul-09 23:05 
GeneralRe: display text in textbox Pin
OriginalGriff31-Jul-09 23:21
mveOriginalGriff31-Jul-09 23:21 
GeneralRe: display text in textbox Pin
Abdul Rahman Hamidy1-Aug-09 1:38
Abdul Rahman Hamidy1-Aug-09 1:38 
GeneralRe: display text in textbox Pin
Henry Minute1-Aug-09 2:10
Henry Minute1-Aug-09 2:10 
GeneralRe: display text in textbox Pin
OriginalGriff1-Aug-09 4:47
mveOriginalGriff1-Aug-09 4:47 
GeneralRe: display text in textbox Pin
DaveyM691-Aug-09 9:12
professionalDaveyM691-Aug-09 9:12 
GeneralRe: display text in textbox Pin
OriginalGriff1-Aug-09 22:24
mveOriginalGriff1-Aug-09 22:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.