Atmega or PIC

Feb 26, 2009 20 Replies

Hi



I'm looking for a micro costing about $1-2 1000up pricing. At least 13 I/O, of which 2 must be PWM capable, and it'd be nice to have I2C on a pair too. External interrupt on one input and operate from 3-5V. Flash based (guess about 2k), EEPROM, and with some form of ISP. Dev tools only need assembler support. Speed not really an issue, 1 mips is fine.



So, use an Atmel ATMEGA8 or one of the PICs (but which one)? What's the best choice from Microchip comparable with the ATMEGA?



Ta.


Try the Microchip parametric search:

formatting link
Should get plenty of matches.

Dave.

formatting link

I got 12 matches for your criteria in the 16F series. The 16F677 is the cheapst at $0.99 volume pricing. (2K Flash, 256byts EEPROM, 18 I/O, I2C, and PWM. The 16F689 doubles the Flash to 4K for $1.13

Dave.

"Mr.G" schreef in bericht news: snipped-for-privacy@mid.individual.net...

The PIC16F631/677/685/587/689/690 come to my mind. They have SPI, PWM and I2C. There may be others as well. Have a look at the Microchip site and its selection tool.

petrus bitbyter

Thanks (and thanks David too). That gives me an idea of what is comparable to the Atmel part. Although, from my quick read of the 16F690 datasheet, there is only one PWM output; did I miss something. The full-bridge mode looks useful for another app though.

If you intend to write in Assembler ATMEGA instruction set is richer and easier (32-register bank, pointers to RAM and FLASH and much more)

Is there such of a thing as a PIC WITHOUT bank switching? Bank switching is pure distilled evil, you know.

Thanks, Rich

Ever looked at the MSP430 series from TI?

Failure does not prove something is impossible, failure simply indicates you are not using the right tools... "If it doesn\'t fit, use a bigger hammer!" --------------------------------------------------------------

PIC24, dsPIC, PIC32.

So you keep saying, but it's really not as significant as you suggest. If you're used to high-level languages and a flat address space, I'm sure it's a nightmare, but some of us grew up viewing such byzantine architectures as normal. Those (then-)rare beasts without such quirks were viewed much as I imagine a modern car would be viewed by someone used to vehicles with manual timing (advance/retard lever), a starter handle, no synchromesh, etc.

It's not as if you're going to be writing an office application suite on the PIC.

If you're used to writing sizable programs for bank-switched architectures (e.g. any of the 8-bit micros with more than 48K of RAM, or 8086 PCs with EMS; just the 8086's segmentation is bad enough), then bank switching is a significant nuisance as it seriously interferes with modularity.

If you're programming microcontrollers with a few KiB of code and between a few dozen and a few hundred bytes of RAM, it really isn't that much of a problem to mentally model the entire program.

Let's face it, you aren't going to have any significant degree of modularity when you don't have a data stack so all "variables" are global.

Thanks. Yes, I've used the F149 a few years back (customer's decision), and considered it here (we have several left over). But it's too expensive for the final production, and I don't think it has EEPROM.

I recon I'll try the Atmel series. It's within budget, has all of the features, and it's something else for me to learn.

have

tools

and

its

Indeed. Hieronymus Bosch's triptych, "Garden of Earthly Delights", portrays the AVR/PIC paradigm with remarkable foresight.

Not a problem for us sensible people who program in C where it's all taken care of for you.

Dave.

Yeah, Byzantine - I had FOR-Train (a student version of FORTRAN) in high school (ca. 1966); we'd key in our programs on a card stack (downstairs, in the secretary training classroom, whatever that was called in those days) and drive down to Control Data itself to run our programs on, IIRC, a 3200 or so.

The school itself had a Control Data G-15:

formatting link
and they let me peruse the tech. manual:
formatting link
That rotating drum memory was way cool!

We programmed it right on the spot in the "computer room", using INTERCOM

500, an interpreter that was very much like "modern" assembly languages:
formatting link

The machine language was fascinating.

formatting link

Then, my first mini was a PDP-11 - very nice instruction set, and my first "micro" was a NEC IMP-16, really a board-level bitslice. The PDP used 4X

74181, and the IMP-16 used 4X, I think, AM2901. (or was it the other way around?)

My first personal computer was the Scelbi 8H, which used an 8008. Wow! a whole 16 KB of memory address space!

formatting link

Actually, its language was almost a microprogam - the op code went right to the CPU, and the src and dest fields of the instruction went right to the data selectors that picked the data source/destination. Ah, those were the days!

Of course, knowing all those machine architectures made leaning C a snap!

Cheers! Rich

I suppose you also have one of those cars that drives for you? ;-)

No, Thanks!

Cheers! Rich

No bank switching in the 18F series or the dsPIC series!

Regards, Stephen D. Barnes

Have you checked Cypress PSoCs ? Not AVR or PIC, but I've gotten suitable devices for under a buck in 200pcs quantities (cy8c24223 iirc).

Took some effort to get them going, but if you need more PWMs or some analog functions they're ok. EEPROM is emulated in FLASH, but Cypress offers a ready SW module.

-- Mikko

Mega8 is obnsolete & expensive - Mega88 is much better value.

Except it still eats code space and cycles - AVR is a much better C target as the instruciton set was specifically designed for good HLL support

The F149 is top of the line, but there are smaller and cheaper devices as well. Might be worth a look especially since there is little learning involved.

I'd invest my time in learning ARM based microcontrollers. Thats where the road is heading.

Failure does not prove something is impossible, failure simply indicates you are not using the right tools... "If it doesn\'t fit, use a bigger hammer!" --------------------------------------------------------------

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required