Beginner Q: Starting out in embedded systems dev - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: Beginner Q: Starting out in embedded systems dev
Quoted text here. Click to load it

how would you use a 24bit dac in a weighing system?

Re: Beginner Q: Starting out in embedded systems dev
Quoted text here. Click to load it

  Normally you would not need 24b, assuming one existed in a uC.

  I'll admit I took 'DAC' to be a typo, as the earlier thread
mentioned 24 bit ADCs, and I know of no 80C51's with 24 bit DACs.

  16 bit DACs in uC, yes, but 24 bit DACs are the realm of hi-end
audio pathways.

-jg


Re: Beginner Q: Starting out in embedded systems dev
Quoted text here. Click to load it

  more suitable than what ?
Since the 80C51 is proven, widely available, multi-sourced, low cost, I
tend to work from the angle that if a controller can do something the
80C51 cannot, then it might get a look in.
  [It will help a lot if the alternatve it is multi-sourced]

  It may not even be the core that dictates, but a peripheral :
eg if you want 24 bit ADCs in a uC, your choice is [guess what core :)]
or if you want Ethernet+Flash that might point to the eZ80.... etc

  Thus, I can forsee using an ARM variant, when the maths loading
dictates, but otherwise change just for the sake of it has low appeal.

-jg


Re: Beginner Q: Starting out in embedded systems dev
On Wed, 26 May 2004 16:49:35 +1200, Jim Granville

[...]
Quoted text here. Click to load it

They're up to 20 now.  And they've always been single-cycle machines.
With an "8051," you're never sure if it's 1, 3, 4, 6, or 12 (Yes, I
see the SiLabs C8051F120 is ostensibly a single-cycle machine).

Quoted text here. Click to load it

Forgive me if I'm skeptical about a microcontroller's ability to
distinguish 300 nanovolts (or 180 with a 3 volt reference).  If I
needed that kind of accuracy, I'd want the ADC a little further away
from the CPU clock...

Quoted text here. Click to load it

I can understand that.  They're pretty new.  Check the Microchip web
site.  The PIC16C745 and 765 support USB 1.1, and the PIC18F2455,
2550, 4455 and 4550 support USB 2.0 (Full Speed, not Hi-Speed).  All
these chips were released in the last two months.

Not that I much like PICs...

Quoted text here. Click to load it

AVR has a Load/Store architecture -- most operations take place on
data in the registers.  Setting or clearing a bit in a register is one
single-cycle instruction (SBR, CBR).  The compilers I use reserve up
to 13 general-purpose registers (104 bits) for boolean storage.
Assigning the value of one boolean to another requires 2 single-cycle
instructions (BST/BLD).

Quoted text here. Click to load it

Register bank switching can save some time if you have a lot of
interrupts occurring that need to be serviced fast.  With the AVR, you
need to save whatever registers you're going to use yourself.  There's
a 4-cycle penalty per register (two to save, two to restore).  

PICs are horrid when it comes to interrupts -- there is only one, and
you have to perform an amazing dance to save state, then you have to
find out who generated the interrupt (generally by polling device
status registers).

The 8051 only lets you access 128 bytes of RAM without going through
the DPTR, and at least 8 of those are reserved for registers (and 8
more for each additional register bank).  But the AVR can load a value
from any location in RAM in 2 cycles, and has 3 16-bit indirect
address registers.  Dual DPTR is only available in extended 8051
cores.  Implementing the functionality of something like memcpy on a
single-DPTR core is... painful.

Quoted text here. Click to load it

The one primary and overarching advantage of the 8051 is the fact you
can buy it from multiple sources.  This provide competition and a
multitude of options.  Finding a plug-in replacement for a particular
chip, however, can be... difficult.

And every time I've tried to get an 8051 into a design, the budgetary
10k pricing has been way out-of-line.  Cygnal (SiLabs) in particular.
Budgetary pricing >3x the next highest competitor lost the battle
before it started.

If the AVR were multiply-sourced, we'd see them at 100 MHz and in the
automotive temperature grades (though perhaps not in the same
device...).

Quoted text here. Click to load it

ARMs are overkill for most applications I've worked on the last 4
years.  The AVR does a really nice job at a low cost, and is
relatively C-friendly.  The avr-gcc compiler is very good.

From a software standpoint, the AVR is my first choice for an 8-bit
microcontroller (If you haven't guessed that by now  ;-).  From a
hardware standpoint, the only real problem I've had is temperature
grades.

Regards,

                               -=Dave
--
Change is inevitable, progress is not.

Re: Beginner Q: Starting out in embedded systems dev

Quoted text here. Click to load it

  I did see they even briefly 'hit 24MHz' until engineering caught up
with marketing :).
  I still have a 1996 AVR data book that claims they would
all be 24MHz on release... Oh well, maybe 2005 will see it hit the
'marketing target' ? :)

  I've seen an instance where a single sourced uC was 'new versioned' by
the vendor, and the user saw a noticable ADC degrade from the 2002
model, to the 2004 model. Last I heard, they were looking to use
a small cygnal device, as ADC co-processor, as a short term fix.

<snip>
Quoted text here. Click to load it

  I would be too. A key point is these devices are really uC assited
ADCs, NOT uC with a bolt-on ADC. They also come from the Analog Expert
companies, like Analog Device, Burr Brown, Cygnal....

<snip>
Quoted text here. Click to load it

  But you have to trade off register resource for boolean, and once you
go outside the register space, the lack of direct opcodes in AVR means
real pointer thrashing.....
  If it's in a HLL, who cares - but make sure there is a bigger code
version in the package you've chosen.

<snip>
Quoted text here. Click to load it

Agreed.


ARM maybe a technical overkill, but when they come sub $5, you need to
think what you can do for that $5, and care less about waste-head-room.
In recent 80C51 designs I've done, quite a lot of the resource
is unused - is that a problem ? - not if it essentially comes for free.


Quoted text here. Click to load it

  For that, you can always cover with the multi-sourced devices, like
80C51, or ARMs ... :)

-jg




Re: Beginner Q: Starting out in embedded systems dev


Quoted text here. Click to load it

You and your $5 supercomputers... Why not just design in a Cray? <grin>

I pay less than a dime for the processors I use.


--
Guy Macon, Electronics Engineer & Project Manager for hire.
Remember Doc Brown from the _Back to the Future_ movies? Do you
We've slightly trimmed the long signature. Click to see the full one.
Re: Beginner Q: Starting out in embedded systems dev
On Thu, 27 May 2004 10:05:53 +1200, Jim Granville

Quoted text here. Click to load it

IIRC, that was when they were first introduced (and before I used
them).  The earliest databook I have is 1999.  The highest speed it
promises for any AVR is 12 MHz, and that only for the AT90S1200.  

Quoted text here. Click to load it
Most of the chips I use (ATmega16, ATmega32, ATmega8535) go up to 16
MHz.  20 MHz is available only on the newest parts (ATmega48/88/168),
but progress is being made.

[...]
Quoted text here. Click to load it

Remember the AVR has almost as much register space as the 8051 has
data space.  OK, I'm exaggerating, but just a little.  The smallest
AVRs have no RAM other than the registers.  

I could reserve 24 registers for boolean variables (192 bits) and
still have as many general-purpose registers left as does the 8051.  I
wouldn't do that (well, never say never...), but I could.

If you do want to use RAM for boolean variables, remember that AVR
don' need no stinkin' DPTR.  To set bit 3 in variable (call it
"mask"), use

   lds   r3, mask
   sbr   r3, 08h
   sts   mask, r3

No pointer thrashing involved.  The worst that can be said is that it
is no longer atomic -- beware ISRs.  To set bit 1 of "mask" to the
value of bit 5 in "status,"

   lds   r3, status
   bst   r3, 5
   lds   r3, mask
   bld   r3, 1
   sts   mask, r3

But if "mask" and "status" are r4 and r5 respectively,

   bst   r5, 5
   bld   r4, 1

Still not atomic...  Dusting off my rusty 8051, that would be
(assuming "status" is at 0x20 and mask is at 0x21)

   jnb   5, clrbit
   setb  9
   jmp   done
clrbit:
   clr   9     ; why isn't it clrb?
done:
  

I forgot to mention the SBRC and SBRS instructions to test if a bit is
set or clear and branch (well, skip anyways) appropriately.

Quoted text here. Click to load it

Atmel has been really good about that.  The AT90S8535, ATmega16,
ATmega32, and ATmega8535 (in the order in which I've used them) have
identical pinouts, with 8, 16, 32, and 8k flash, respectively.  There
may be others that will fit in the footprint, but I haven't looked
into it yet.  Haven't needed to.

And the AVR is quite C-friendly.  As I said before, avr-gcc works very
well (and in some cases generates better code than another commercial
compiler I use).

[...]
Quoted text here. Click to load it

Digikey's price for the industrial-temperature ATmega32 is sub $5 for
100.  I get them quite a bit less than that.  The only application I
have that feels pinched in a mega32 is I/O locked -- I'm using about
70% of the flash and 50% of the RAM.  Nothing else requires more than
14k of flash.

Most of my applications don't need a lot of fancy processor power.
They need I/O.

Quoted text here. Click to load it

Oh, you paid for it.  ;-)  You're just not using it.  It's only a
problem if you are making large volumes, and a $0.10 cheaper micro
would swamp the NRE you would invest to get it to fit.

Quoted text here. Click to load it

We tend to go with PICs and Motorola (Freescale?) HC908 parts.
Because we have used them before, and we have the tools.  Also,
Microchip is almost prescient about what kind of micro we require --
they almost always have a micro with exactly the I/O we need in the
smallest possible package.  They came up just short with the 12F675 --
We needed one more I/O pin.  That project is going to an HC908QY4.
Which at 16 pins is quite a bit more than required, but comes in a
TSSOP package that is actually smaller than the PIC's 8-pin SOIC.

There's a real resistance here (from upper managament) to try a
different micro architecture unless we have a "motivated" vendor or
our customer has a list of "approved" micros that doesn't include the
ones we use.  Certainly not the most senseless edict to come down from
on high...

Regards,

                               -=Dave
--
Change is inevitable, progress is not.

Re: Beginner Q: Starting out in embedded systems dev
Quoted text here. Click to load it

  Not quite: besides the 1996 Marketing MHz, the newest shrink
devices in 2004 were briefly spec'd at 24MHz, then revised
to 20MHz. ( eg ATtiny13 Data Sheet: 2535D Page 163 )
  Seems a classic case of Marketing vs engineering :)

<snip>
Quoted text here. Click to load it

..but remember, some AVR opcodes only work on half the registers...
(You have just turned your AVR into an 8048, not an 8051.)
Besides register opcodes, the 80C51 has many direct-memory opcodes.

<snip>
Quoted text here. Click to load it

  clrb?, yes, good question - ask intel ?

In HLL Code of :  Mask := Status; would produce this code :
      MOV   C,Status
      MOV   Mask,C    
Smaller, clearer code, and no registers consumed.
Also works on 128 SFR Bits, including port pins.


<snip>
Quoted text here. Click to load it

IIRC Microchip have some 14/16 pin models comming ?.
Seems to be a growth area, as vendors realise the size is
similar/smaller than SO8, and you avoid being pin-bound.

-jg



Re: Beginner Q: Starting out in embedded systems dev
On Thu, 27 May 2004 14:42:35 +1200, the renowned Jim Granville

Quoted text here. Click to load it

Yes, available now, and quite competitively priced- just a bit more
than the 8-pin parts. But to hedge their bets they also are dangling a
"future product" 6-pin series available in SOT-23-6

http://ww1.microchip.com/downloads/en/DeviceDoc/41210B.pdf  


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Beginner Q: Starting out in embedded systems dev
Quoted text here. Click to load it

I have to say, that's impressive.

So impressive, I'll give it a name : A PicoPIC :)

Price/delivery anyone ?

Their next logical product would be a SerialEE / PicoPIC combo :
looks like serial EE with HW SPI.i2c interface, but has a PicoPIC
on some dual-port basis.

-jg


Re: Beginner Q: Starting out in embedded systems dev
On Thu, 27 May 2004 15:16:41 +1200, the renowned Jim Granville

Quoted text here. Click to load it

They are saying $0.49 (in 'who knows' what quantity), I don't see
anything on delivery.

http://www.elecdesign.com/Articles/Index.cfm?ArticleID80%09

Quoted text here. Click to load it

I'd like to see one with 10 bit (minimum) ADC and 10 bit PWM- which
could be used as kind of an analog in/analog-out building block.

Programming spec:
http://ww1.microchip.com/downloads/en/DeviceDoc/41228B.pdf


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Beginner Q: Starting out in embedded systems dev
Quoted text here. Click to load it


The 8051 has over 600 variants ALL of which use the same core (as far as
the programmer is concerned) They are als0 used in mobile phone sims
(and sim's in general) as well as smart cards.

They come from over 40 manufacturers plus a whole host of IP cores. All
these vendors + all the tool vendors turn out a vast amount of support
for these parts.  As to many third parties.

The dev kits are cheap and plentiful.

The tools range from free (and often good quality) through to compilers
and ICE that are suitable for use on medical, aerospace etc   These are
tools that are fully supported across the industry. The same can not be
said of the PIC.

The OP said he wanted to learn embedded for a popular part that would
get him employment. More people use 8051 that AVR or PIC. That is not
supposition I have seen various set so figures on this unfortunately
they are all confidential or I would love to show them here.

The 8051 does work well with C and 90% of the 8051 users use C.



/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: Beginner Q: Starting out in embedded systems dev

Quoted text here. Click to load it

You might try www.hotjobs.com and search for various embedded
processors.  Of the few processors I tried, '8051' was mentioned most in
the listings.

Kelly

Site Timeline