<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
AVR/C for me. I've toyed with the idea of C++ too, because&nbsp;you can setup 'devices'&nbsp;say an LCD screen and&nbsp;have the expandability to&nbsp;have 'n' LCDs, or as much as memory allows.<BR>
&nbsp;<BR>
I did actually convert half my 'library' to C++&nbsp;to see what it was like, and&nbsp;using AVR-GCC&nbsp;it took up an extra 20% say? as opposed to&nbsp;using stuctures. I guess if it used more memory&nbsp;it would run slower (more code to exec) and the actual&nbsp;time saved was not really worth that&nbsp;extra memory.<BR>
&nbsp;<BR>
Cheers,<BR>
&nbsp;<BR>
John&nbsp;<BR><BR><BR>

<HR id=stopSpelling>
<BR>
From: mikael.stewart@gmail.com<BR>To: chchrobotics@lists.linuxnut.co.nz<BR>Date: Wed, 31 Dec 2008 13:35:01 +1300<BR>Subject: Re: [chbot] C vs C++ and embedded<BR><BR>
<STYLE>
</STYLE>
<FONT face=Arial size=2>Until recently I was very much hooked on Atmels AVR series microcontrollers and using WinAVR (Package containing GNU-GCC C compiler, Programmers Notepad IDE and documentation), and also a linux port of GNU-GCC while under UBUNTU/Debian. I</FONT><FONT face=Arial size=2>&nbsp;liked the idea of not having to spend a ridiculous amount of money on hardware programmers or software - I was a student at the time! There is also a strong support base for AVR stuff on the 'net with lots of sample code around and since I'm the type that learns by example and not by long winded literature, this was very important to me.</FONT> <BR>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Just recently I've switched to Microchip dsPIC 30F and 33F range of microcontrollers for my projects. The development tools might cost more but there are some major hardware advantages that suit my applications. I generally use the Microchip C30 C compiler as it is so well optimized but will still use inline assembly for certain things&nbsp;e.g. a bit-banged proprietary 2-wire comms routine&nbsp;because I cringe at the thought of how using C might slow this down!&nbsp;As they say, engineering is an art of compromise...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>For the record, I only ever used assembly language when messing around with the 68hc11 microcontroller some 6-7 years ago. I'm still getting used to the dsPIC architecture but will probably be coding a bit more assembly&nbsp;in the future. Also, I've n</FONT><FONT face=Arial size=2>ever touched C++ for microcontroller programming.. I can think of a few cases where it would be handy, but C structures, unions and bitfields&nbsp;are usually good enough for what I do...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2>Mikael</FONT><FONT face=Arial size=2></DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=chris@trash.co.nz>Chris Hellyar</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=chchrobotics@lists.linuxnut.co.nz>Christchurch Robotics</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, December 31, 2008 11:16 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [chbot] C vs C++ and embedded</DIV>
<DIV><BR></DIV>That makes interesting reading, coming from someone who has avoided OOP programming for ages, and only just got dragged in, kicking and screaming in the last year or so.<BR><BR>I'm a die-hard assembly fan for embedded stuff, which probably makes me a dinosaur.&nbsp; I suspect if it was still a part of my income I'd have switched to C long ago though.&nbsp; I find it's the thrill of the chase with assembly which makes it interesting, but it also means it takes 5x as long to get the same result. :-).<BR><BR>Case in point would be my current modbus project.&nbsp; There are some good open source C code bases for modbus RTU on various platforms, but I'm coding from scratch in assembler for PIC 'cause I can'.&nbsp; 200+ hours of work and it's working well with a bunch of standard test tools, but in C I think it would have been more like 30 hours work.<BR><BR>Which leads me to a straw-poll question...&nbsp; What are people using as their tool set of choice for robots/gadgets?&nbsp; What processor/language?&nbsp; I'm 1 vote for PIC/asm. :-)<BR><BR><BR><BR>Cheers, Me.<BR><BR><BR>On Wed, 2008-12-31 at 09:56 +1300, Richard Jones wrote: 
<BLOCKQUOTE><PRE>After the last meeting Paul was discussing with me the merits of using 'C'
structures and C vs C++. This article might prove interesting to anyone
interested in the tradeoffs between C and C++ for embedded applications
like robotics: <A>http://www.embedded.com/98/9802fe3.htm</A>

Richard


_______________________________________________
Chchrobotics mailing list, web site: <A>http://kiwibots.org</A>
<A>Chchrobotics@lists.linuxnut.co.nz</A>
<A>http://lists.ourshack.com/mailman/listinfo/chchrobotics</A>

</PRE></BLOCKQUOTE>

<HR>

<P><BR>_______________________________________________<BR>Chchrobotics mailing list, web site: http://kiwibots.org<BR>Chchrobotics@lists.linuxnut.co.nz<BR>http://lists.ourshack.com/mailman/listinfo/chchrobotics<BR></BLOCKQUOTE><br /><hr />It’s the same Hotmail®. If by “same” you mean up to 70% faster. <a href='http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad1_122008' target='_new'>Get your account now.</a></body>
</html>