Reply by Chris Hills May 27, 20042004-05-27
In article <20040525184720.24879.00002124@mb-m18.aol.com>, CBarn24050
<cbarn24050@aol.com> writes
>>But going back to the first point.. you cant go wrong with an 8051... >>actually you can. lots. but it is a good place to start which is why >>there are over 50 manufacturers producing 600 different versions that >>will all run the same core binary. > >Just what is this love affair with the 8051 all about? Apart of course your >commercial interest. This processor is 30 years old, it has a primitive >instruction set not suited to running pointer intensive languages like C. It >has an architecture which is just as usuited to C as well. The chips themselves >are not fast, not cheap nor allways available, apart from the basic 40pin >version. I can't think of a single good reason for using them these days, if >you can then maybe you can enlighten me.
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 /\/\/\/\/\ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply by Spehro Pefhany May 27, 20042004-05-27
On Thu, 27 May 2004 15:16:41 +1200, the renowned Jim Granville
<no.spam@designtools.co.nz> wrote:

>Spehro Pefhany wrote: >> On Thu, 27 May 2004 14:42:35 +1200, the renowned Jim Granville >> <no.spam@designtools.co.nz> wrote: >>>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. >> >> 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 > >I have to say, that's impressive. > >So impressive, I'll give it a name : A PicoPIC :) > >Price/delivery anyone ?
They are saying $0.49 (in 'who knows' what quantity), I don't see anything on delivery. http://www.elecdesign.com/Articles/Index.cfm?ArticleID=8009
>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.
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" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Reply by Jim Granville May 27, 20042004-05-27
CBarn24050 wrote:
>>>I guess there must be a requirement for 24bits somewhere I just can't think >>>of 1. >> >>Weighing systems and metering are a couple of large segments. >>Vendors don't make multiple variant families for no customers.... > > how would you use a 24bit dac in a weighing system?
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
Reply by Jim Granville May 27, 20042004-05-27
Spehro Pefhany wrote:
> On Thu, 27 May 2004 14:42:35 +1200, the renowned Jim Granville > <no.spam@designtools.co.nz> wrote: >>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. > > 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
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
Reply by Spehro Pefhany May 26, 20042004-05-26
On Thu, 27 May 2004 14:42:35 +1200, the renowned Jim Granville
<no.spam@designtools.co.nz> wrote:

>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.
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" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Reply by Jim Granville May 26, 20042004-05-26
Dave Hansen wrote:
> On Thu, 27 May 2004 10:05:53 +1200, Jim Granville >>Dave Hansen wrote: >>>On Wed, 26 May 2004 16:49:35 +1200, Jim Granville >>>>I must have missed the release of the 100MHz AVR >>> >>>They're up to 20 now. And they've always been single-cycle machines. >> >> I did see they even briefly 'hit 24MHz' until engineering caught up >>with marketing :). > IIRC, that was when they were first introduced (and before I used > them).
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>
>> 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..... > > > 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.
..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>
> 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?
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>
> > 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.
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
Reply by Dave Hansen May 26, 20042004-05-26
On Thu, 27 May 2004 10:05:53 +1200, Jim Granville
<no.spam@designtools.co.nz> wrote:

>Dave Hansen wrote: > >> On Wed, 26 May 2004 16:49:35 +1200, Jim Granville >> <no.spam@designtools.co.nz> wrote: >> >> [...] >> >>> I must have missed the release of the 100MHz AVR >> >> >> They're up to 20 now. And they've always been single-cycle machines. > > I did see they even briefly 'hit 24MHz' until engineering caught up >with marketing :).
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.
> 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' ? :) >
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. [...]
><snip> >>> Last time I looked at an AVR, the BOOLEAN handling was primitive, and >> >> >> 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). > > 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.....
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.
> If it's in a HLL, who cares - but make sure there is a bigger code >version in the package you've chosen.
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). [...]
>> 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. > >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.
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.
>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.
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.
> > >> 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. > > For that, you can always cover with the multi-sourced devices, like >80C51, or ARMs ... :)
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.
Reply by CBarn24050 May 26, 20042004-05-26
>> I guess there must be a requirement for 24bits somewhere I just can't think >of >> 1. > >Weighing systems and metering are a couple of large segments. >Vendors don't make multiple variant families for no customers.... >
how would you use a 24bit dac in a weighing system?
Reply by Jim Granville May 26, 20042004-05-26
CBarn24050 wrote:

>>Say you want a 24-bit delta-sigma DAC on board.. AFAIK only the 8051 >>core is available in production quantity (at least two suppliers), >>with ARM availability (one supplier) projected to be in 3rd quarter >>2K004. There are other similar examples. >> > > > I guess there must be a requirement for 24bits somewhere I just can't think of > 1.
Weighing systems and metering are a couple of large segments. Vendors don't make multiple variant families for no customers....
> >>More generally, why in the world would you reject a competitively >>priced 8051 from consideration in an application where it would be >>appropriate? For example, the modern Philips 6mm x 6mm P89LPC932FHN. > > > Seems ok, but no ADC, so no good for 50% of projects. PIC16F870 would seem a > better choice.
Small Package+ADC flash is one sector where the 80C51 is a relative new-commer, but Philips now show ~9 members of their LPC9xx family with ADCs.
> > >>Or an inexpensive OTP P87LPC760BDH (USD0.87 ea/reel from Avnet) > > > Biggest problem here is OTP, PIC16F630 seems better.
I like the look of the P89LPC912FDH-S, in a nice TSSOP14 package - FLASH and US0.86/reel (but new). ( I always ran out of pins, when ever I looked at 8 pin uC ! ) -jg
Reply by Guy Macon May 26, 20042004-05-26
Jim Granville <no.spam@designtools.co.nz> says...

>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.
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 have an "impossible" engineering project that only someone like Doc Brown can solve? My resume is at http://www.guymacon.com/