<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; CHARSET=UTF-8">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff><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> 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>
<DIV><FONT face=Arial size=2></FONT> </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 e.g. a
bit-banged proprietary 2-wire comms routine because I cringe at the thought
of how using C might slow this down! As they say, engineering is an art of
compromise...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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 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 are
usually good enough for what I do...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV></FONT> </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 href="mailto:chris@trash.co.nz">Chris Hellyar</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=chchrobotics@lists.linuxnut.co.nz
href="mailto: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. I suspect if it was
still a part of my income I'd have switched to C long ago though. 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. 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'. 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... What are people using as their tool set of choice for
robots/gadgets? What processor/language? 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 TYPE="CITE"><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 href="http://www.embedded.com/98/9802fe3.htm">http://www.embedded.com/98/9802fe3.htm</A>
Richard
_______________________________________________
Chchrobotics mailing list, web site: <A href="http://kiwibots.org">http://kiwibots.org</A>
<A href="mailto:Chchrobotics@lists.linuxnut.co.nz">Chchrobotics@lists.linuxnut.co.nz</A>
<A href="http://lists.ourshack.com/mailman/listinfo/chchrobotics">http://lists.ourshack.com/mailman/listinfo/chchrobotics</A>
</PRE></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<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></BODY></HTML>