🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.electronics.design
Article #670

Re: My hat is off to Microchip and their CEO!

#670
From: Spehro Pefhany
Date: Fri, 30 Oct 2009 13:49
64 lines
4010 bytes
On Fri, 30 Oct 2009 10:23:51 +1100, the renowned "David L. Jones"
<altzone@gmail.com> wrote:

>Mark Harriss wrote:
>> DJ Delorie wrote:
>>> "David L. Jones" <altzone@gmail.com> writes:
>>>> http://www.youtube.com/watch?v=3YUvlrVlNao
>>>
>>> Sigh, I've been in that type of meeting before.  Not as Mr Head, of
>>> course.
>>
>>
>> What's the PIC architecture like these days?, I heard it was always
>> pretty messy in terms of memory and a real pain to program in
>> assembly.

There are really several PIC architectures.. the 12-bit instruction,
(PIC16F54, PIC12F509 etc.) the 14-bit instruction (most other PIC16F,
16 bit instructions (PIC18) (PIC17 is a dead end), the PIC24/DSPIC,
and the PIC32. They've also extended the instruction sets in a couple
of families. The 12-bit type is the most limiting, but also the most
parsimonious with resources. Even C can't hide the ugliness there, but
in most cases you won't notice or care because the tasks are
relatively simple. For example, IIRC constant arrays can't exceed a
page in size (256 bytes).  

>Tons better.
>They have the PIC18 series which is more C friendly than the old 16 series, 
>the 16 bit PIC24 series which is quite nice, and the new 32 bit PIC32 series 
>based on a MIPS 4K core. Plus the dsPIC too.
>And why would you want to program in assembler anyway for all but niche 
>areas?

IThe PIC18 is quite pleasant to program in assembler... just use
access ram for everything you can, and you don't have to think much
about banking. About the only thing I miss is an indexed plus offset
addressing mode, and I think they have that in the extended
instruction set mode, but I have not played with that (there are some
trade-offs or it would not have to be another mode). 

As to the C vs. asm question.. well, if you have to have a USB or
Ethernet (or Bluetooth) stack then you're in C territory. For less
than 16 k bytes of program memory, assembler probably deserves a look,
especially if you're not doing C-like things. And it depends on the
skill set and prior experience the programmer has, as well as whether
it's worth wringing out what is usually a << 2:1 improvement in
program memory size and performance. 

>Even the old 16 series is not messy if you use a good C compiler, it takes 
>care of any issues for you.
>
>Dave.

The Hitech C compiler (even the free 'lite' one) works pretty well,
though I've found some irritating bugs. It will even generate useful
code for the 12-bit instruction chips. 


Best regards, 
Spehro Pefhany
-- 
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Technical Details
Message-ID: <ohple5db83orau6jahkm74s1dq9duhv61e@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-in-01.newsfeed.easynews.com!easynews!core-easynews-01!easynews.com!en-nntp-01.dc1.easynews.com.POSTED!not-for-mail
References: <a7nGm.354$hJ2.98@newsfe13.iad> <xny6mt26zu.fsf@delorie.com> <DqqdnStBU4L2h3fXnZ2dnUVZ8g9i4p2d@westnet.com.au> <iupGm.188$v47.81@newsfe23.iad>

Show Full Headers
Complete Article Headers
X-Google-Thread: a5a6238865,3efb481b0f84bbd4
X-Google-Attributes: gida5a6238865,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-in-01.newsfeed.easynews.com!easynews!core-easynews-01!easynews.com!en-nntp-01.dc1.easynews.com.POSTED!not-for-mail
From: Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat>
Newsgroups: sci.electronics.design,aus.electronics
Subject: Re: My hat is off to Microchip and their CEO!
Organization: Rather
Message-ID: <ohple5db83orau6jahkm74s1dq9duhv61e@4ax.com>
References: <a7nGm.354$hJ2.98@newsfe13.iad> <xny6mt26zu.fsf@delorie.com> <DqqdnStBU4L2h3fXnZ2dnUVZ8g9i4p2d@westnet.com.au> <iupGm.188$v47.81@newsfe23.iad>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 64
X-Complaints-To: abuse@easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Fri, 30 Oct 2009 08:49:25 -0500
X-Original-Bytes: 3849