The Cyber-Spy.Com Usenet Archive Feeds Directly From The Open And Publicly Available Newsgroup Sci.Electronics.Design
This Group And Thousands Of Others Are Available On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic, Opinions Or Content Posted To This Or Any Other Newsgroup. This Web Archive Of The Newsgroup And Posts Are For Informational Purposes Only.
Message-ID: <3DA09F45.B17E0262@webaccess.net>
From: Chuck Simmons
Organization: You jest.
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.33 i586)
X-Accept-Language: en
Newsgroups: sci.electronics.design
Subject: Re: Basic Stamp vs Pic processors
References: <3da01fbb$0$1293$cc9e4d1f@news.dial.pipex.com>
Date: Sun, 06 Oct 2002 20:38:55 GMT
NNTP-Posting-Host: 63.186.32.134
NNTP-Posting-Date: Sun, 06 Oct 2002 13:38:55 PDT
Rich Webb wrote:
>
> On Sun, 6 Oct 2002 12:34:19 +0100, "Gary" wrote:
>
> >Jim
> > I will do a bit of flag waving for the PIC. They are easy to use the
> >assembly language is not that difficult to learn. There are only 33
> >instructions to remember. There are compilers for C to PIC if you have
> >experience in that language as well. I personally find it a good idea to
> >flowchart the program first before writing any assembly language code.
> >Remember a challenge can be rewarding in it's own right.
>
> Yes, but... There's only ONE general purpose register, so you end up
> shuffling everything through the W reg. Then there are the pages of data
> memory, which are different from the banks of program memory (or was
> that backwards?) so you have to remember to stroke the bank select bits
> if you're doing anything but the most trivial program.
>
> PICs are ubiquitous but I've found that the AVR family from Atmel (the
> ATtiny, AT90, and ATmega chips) have an equivalent range of features and
> memory but are MUCH nicer on the assembly programmer. 32 general purpose
> registers and 16-bit linear address spaces (program and data, that
> Harvard thing). Also, its instruction cycle is one-for-one with the
> clock, so the instruction cycle time of a 1 MHz AVR is the same as a 4
> MHz PIC.
It's better to be a bit more accurate about AVR and how fast it executes
instructions. It is true that the entire arithmetic set is 1 clock
cycle, the branching instructions are 1, 2 or 3 depending on AVR model
and whether the branch is taken. Taking or returning from an interrupt
is 4 clocks. Most data memory reference instructions are 2 cycles.
Fetching a byte constant from program memory takes 3 clocks.
I find that most of my AVR software runs at about 1.5 clocks per opcode.
This comes about because I have to use memory a lot to retain global
context in a multiple interrupt environment. Typical applications should
averge between 1.1 and 1.6 cycles per opcode. This is actually quite
good considering the modest clock frequencies specified.
Chuck
--
... The times have been,
That, when the brains were out,
the man would die. ... Macbeth
Chuck Simmons chrlsim@webaccess.net
Go Back To The Cyber-Spy.Com Usenet Web Archive Index Of The sci.electronics.design Newsgroup
|