PIC equivalent of the M328P ? - Page 1
Forum section: electronics / general

author: expertmax1
author_rank: Contributor
timestamp: June 26, 2013, 12:00:36 am
content: Hey fellow members!I'm currently working 40 hours a day on some AVR stuff and I like the structure, the simplicity of it all. Buuuut, I would like to learn about PIC. I might buy a PIC programmer and a PIC micro but I have no idea which one to get. I'm not used to the PIC nomenclature.So I'm looking for PIC alternatives for this :-> USBTinyISP-> ATMega328PThanks (P.S. :NO PIC VS AVR DISCUSSION!!!)

author: Skimask
author_rank: Super Contributor
timestamp: June 26, 2013, 12:05:56 am
content: Just go to the microchip website, choose the 8 bit MCUs, use the parametric search for similar features for similar MCU's.Off the top of my head, 16F88, 18f1320, 12F1840, and a whole load of others in that range.

author: expertmax1
author_rank: Contributor
timestamp: June 26, 2013, 03:47:31 am
content: Fair enough, is there any USBTinyISP alternative for PIC ?

author: Stonent
author_rank: Super Contributor
timestamp: June 26, 2013, 05:35:37 am
content: http://www.aliexpress.com/wholesale?SearchText=pic%2Bprogrammer&CatId=0&initiative_id=SB_20130625213111&SortType=price_asc&filterCat=4099%2C400103%2C717&groupsort=1&page=3Well there sure are a lot of "PICKit 2"s for sale that are in bright red cases...I'm sure that's fully legit!

author: Stonent
author_rank: Super Contributor
timestamp: June 26, 2013, 05:37:51 am
content: Wicrochip?

author: JTR
author_rank: Regular Contributor
timestamp: June 26, 2013, 05:48:47 am
content: For a low cost entry into the pic world you can always buy a dev board that contains a preprogrammed PIC with a bootloader and save on the cost of a separate programmer. There are plenty of these around.

author: westfw
author_rank: Super Contributor
timestamp: June 26, 2013, 07:09:26 am
content: QuoteWhy limit yourself? Microchip has PIC24 (16bit) and PIC32 (32bit) Pics in DIP28 as well, that are apparently rather more pleasant to program than the 8bit PICs.

author: Andreas
author_rank: Super Contributor
timestamp: June 26, 2013, 06:40:21 pm
content: Quote from: expertmax1 on June 26, 2013, 12:00:36 amThe nearest replacement for the ATMega328P in a 28pin case is the PIC18F2520 in my opinion.A alternative would be the 24FV32KA302 which has a 12 bit ADC and internal 16 Bit structure.With best regardsAndreas

author: Jeroen3
author_rank: Super Contributor
timestamp: June 28, 2013, 09:13:18 pm
content: With PIC 8 bits your not taking a step forward, just sideways.Go ahead and explore the ARM Cortex-M0.If you need DIP, you'll be having a hard time, but there are a few.

author: cthree
author_rank: Frequent Contributor
timestamp: June 28, 2013, 11:36:58 pm
content: Quote from: Jeroen3 on June 28, 2013, 09:13:18 pmI'd agree. If you know the AVR platform then learning PIC is redundant, they are just two sides of the same coin. If you want to expand your horizons I agree that ARM is your logical next step.

author: Stonent
author_rank: Super Contributor
timestamp: June 28, 2013, 11:45:11 pm
content: I hadn't put a whole lot of thought into it but this looks pretty interesting:http://www.arm.com/products/processors/cortex-m/cortex-m0.php?tab=Moving+from+8/16-bitQuote from: ARM.COMAnd they follow with what appears to be a worst case scenario example where 31 8 bit assembly instructions are replaced by a single ARM instruction.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 28, 2013, 11:51:39 pm
content: Quote from: cthree on June 28, 2013, 11:36:58 pmThe PIC32 range is pretty comparable to many low to mid-end ARMs, and have some DIP and low-density SMD options. You can use the same programmer/debug tools throughout the range from 8 to 32 bit. Many of the peripherals are also very similar.In practice the differences between peripherals are far greater than between core architectures. Going from, say PIC32 to ARM isn't much different than from, say NXP ARM to Atmel ARM.

author: hans
author_rank: Super Contributor
timestamp: June 29, 2013, 09:25:13 pm
content: If you really must get use an 8-bit PIC, and must find a functional equilevant of the 328P, then find a PIC18 with:- 2kB RAM- 16k or 32k FLASH words- 12/16MIPS (although, if this is really critical, go for an another architecture instead)- Works at 5V too..If I do a quick search, you probably end up with a PIC18F26K22/K80.From my experience, AVR and PIC are basically the same. I don't mind PIC's, but in general I find AVR's easier to pick up and play with.PIC's sometimes have a scratch-your-head-for-some-time-why-this-doesn't-work problem, although that could also be experience with the devices..However, the principles of both chips are the same. They have a CPU that runs instructions (although architectures differ), with peripherals that have a couple of registers that need to be set correctly. Both provide documentation on how to do that, and that's about it.Moving to a PIC24/dsPIC33/PIC32 is not much different.. the CPU's run faster, more memory, the devices typically get bigger (because they tend to be used for bigger applications), and contain more peripherals/features. There are (plenty) of devices still available in DIP though.ARM is a bit different, with a different architecture, more advanced and has it's advantages and disadvantages. If you really want to learn something different, pickup an ARM toolchain & devboard.

author: amyk
author_rank: Super Contributor
timestamp: June 30, 2013, 10:16:37 am
content: Quote from: westfw on June 26, 2013, 07:09:26 amHe asked for an equivalent to an 8-bit, so that's what he got...PIC32 is actually MIPS which is another (rather smaller) competitor to ARM, and in the same league.

author: glatocha
author_rank: Regular Contributor
timestamp: July 03, 2013, 01:23:19 pm
content: Quote from: ARM.COMReally? is it a COMMON misconception?Those marketing guys do think we are stupid.

author: glatocha
author_rank: Regular Contributor
timestamp: July 03, 2013, 01:29:40 pm
content: Quote from: expertmax1 on June 26, 2013, 12:00:36 amFor smallest PIC with USB there is 14pin 16F1454. If you don't mind 20 pin there is really cool LowPinCount USB Dev Board (used to be possible to buy with PicKit3 - don't know if still).I like this board as there is a lot of space for own soldering and for each pin you can solder triple headers.Also USB framework from Microchip is in my opinion quite friendly. For simple COM port simulation on PC side.Good Luck

author: andersm
author_rank: Super Contributor
timestamp: July 03, 2013, 01:30:30 pm
content: Quote from: glatocha on July 03, 2013, 01:23:19 pmEven hang around on a programming forum?

author: glatocha
author_rank: Regular Contributor
timestamp: July 03, 2013, 01:40:18 pm
content: Quote from: andersm on July 03, 2013, 01:30:30 pmProbably yes, but why you asking?

author: andersm
author_rank: Super Contributor
timestamp: July 03, 2013, 06:24:48 pm
content: Those marketing guys aren't completely wrong.

author: c4757p
author_rank: Super Contributor
timestamp: July 03, 2013, 06:29:29 pm
content: There are two classes of programmers: Ones who care how the computer actually works, and ones who don't give a rat's ass. Both groups manage to be successful in slightly different fields. I would fully expect the latter group to hold this misconception; if any in the former group do, they need to be beaten with their keyboards.To judge which group a programmer is in, offer him a cup of "java". If he cringes violently, he's in the former group.

author: Jeroen3
author_rank: Super Contributor
timestamp: July 05, 2013, 10:07:24 pm
content: Or ask him about See Sharp.(C#, Microsoft's version of Java)But I think you can expand category one to those that use C the same as on computers, with floats and printf's on an arduino atmega.If you ask any chip manufacturer what they have to offer instead of an Atmega328p, most of them will point to their 32 Bit, low pin count packages, eg lqp48 with a cortex m0.8-Bit is getting out of fashion. But be aware, 32 Bit will have its day in 2038.But reading all of above makes me think he just switched from lane instead of car and now uses PIC.Rather identical, but not getting you anywhere faster.I'm not going to to light the pic-avr flame.

author: cthree
author_rank: Frequent Contributor
timestamp: July 06, 2013, 04:24:42 am
content: Claims of the death of 8 bit micro controllers are greatly exaggerated.

author: JTR
author_rank: Regular Contributor
timestamp: July 06, 2013, 07:44:59 am
content: Quote from: andersm on July 03, 2013, 01:30:30 pmFunniest thing I have read on the web for the last month.Edit: Actually... Has it been in month since I read the C Vs ASM thread?

author: nctnico
author_rank: Super Contributor
timestamp: July 06, 2013, 10:29:04 am
content: Quote from: cthree on July 06, 2013, 04:24:42 amI wouldn't be sure about that. I haven't used one in a design for over 15 years!

author: amyk
author_rank: Super Contributor
timestamp: July 06, 2013, 11:14:17 am
content: Quote from: nctnico on July 06, 2013, 10:29:04 amDepends what sort of designs you're talking about...

author: glatocha
author_rank: Regular Contributor
timestamp: July 06, 2013, 11:19:47 am
content: from:http://www.eetimes.com/document.asp?doc_id=1280803Still there is a lot of space for 8bit. Maybe as "intelligent" peripherals for 32bit, but will see.

author: madires
author_rank: Super Contributor
timestamp: July 06, 2013, 11:51:52 am
content: Quote from: c4757p on July 03, 2013, 06:29:29 pmGood code needs strong coffee

author: madires
author_rank: Super Contributor
timestamp: July 06, 2013, 12:03:49 pm
content: Quote from: glatocha on July 06, 2013, 11:19:47 amI think it's more about selecting the right MCU to solve a problem than throwing the latest and greatest at the problem. Or would you use a big fat IGBT to switch a 20mA LED?

author: glatocha
author_rank: Regular Contributor
timestamp: July 06, 2013, 12:15:50 pm
content: Exactly.On the other hand. If you look at AVR, PIC16/18, MSP430. I think somehow they were always in the same basket. Even if MSP is 16bitSo I guess for most app, those ALU size is not so important.

author: westfw
author_rank: Super Contributor
timestamp: July 09, 2013, 07:52:44 am
content: QuoteI don't think I trust a "survey" that lumps together 4-bit and 8-bit microcontrollers, to have said anything meaningful about 8bit micros.

author: nctnico
author_rank: Super Contributor
timestamp: July 09, 2013, 11:00:56 am
content: Quote from: madires on July 06, 2013, 12:03:49 pmIts more efficient to specialise on one MCU range from one supplier than to use several different MCUs and know little about each of them. If you choose ARM then you can choose from 8 pin DIP devices to 200+ pin BGA devices without needing different tools, programmers or different libraries. The only exception is low power which is where MSP430 comes in.

author: madires
author_rank: Super Contributor
timestamp: July 09, 2013, 01:36:34 pm
content: Quote from: nctnico on July 09, 2013, 11:00:56 amOf course everyone has his favourite, well known and convenient MCU. But based on project constraints we have to choose another MCU sometimes. And I bet, you had another favourite before working with ARM :-)

author: nctnico
author_rank: Super Contributor
timestamp: July 09, 2013, 05:39:49 pm
content: Except for low power I'd like to hear constraints which rule out ARM... Thats the whole beauty of today's world. You don't need to make do with crappy & slow architectures which are just in the way of getting work done. I have build projects around Z80 processors, 8051, Hitachi H8/300(0), 68HC11 and probably some others I have forgotten. Nowadays I can do 95% of the projects with ARM based controllers and if I need low power then I use an MSP430. Maybe some projects are so simple I could get away with PIC, AVR, Attiny but those don't give any financial advantage. In most cases using an ARM has other benefits like fast PWM which make life much easier and strongly reduce external component count. For one of my customers I have developed a keypad with touch sensors. Because I can sample and process at relatively high speed there are only a few capacitors on the board. All the signal processing (anti-aliasing filtering) is done inside an ARM controller. I started the design with an I2C adc and analog comparators but the ARM controller is cheaper than the I2C ADC alone and the software people have less work if the ARM controller can deliver the data in a form which is directly useable. Last but not least the ARM controller is perfectly happy with 1.8V.

author: amyk
author_rank: Super Contributor
timestamp: July 09, 2013, 09:19:36 pm
content: Quote from: nctnico on July 09, 2013, 05:39:49 pm...and cost.

author: westfw
author_rank: Super Contributor
timestamp: July 09, 2013, 10:44:29 pm
content: QuoteYes. Personally, I really like learning about different MCUs, but I'm finding it very frustrating how "scatter brained" that leaves me.Quote

author: nctnico
author_rank: Super Contributor
timestamp: July 09, 2013, 11:14:04 pm
content: Quote from: amyk on July 09, 2013, 09:19:36 pmARM controllers can beat or match the prices of most 8 bit controllers. But be sure to look at the entire cost of the design and not just the part itself! NXP has announced the new LPC800 device (already sampling) will start at 39 cents.@westfw: you have to stick with the same supplier ofcourse. Unfortunately every supplier uses their own peripherals. I have been using ARM7TDMI devices from NXP for many years and when the new Cortex Mx devices from NXP came I could use 99% of my existing code. IOW: the peripherals are mostly the same which NXP did on purpose. But then again, the peripherals from NXP already where superb. I once made a project with an STR700 (also ARM7TDMI) from ST and the peripherals in that microcontroller are a complete joke.

author: jebcom
author_rank: Regular Contributor
timestamp: July 10, 2013, 02:36:19 am
content: QuoteThis is very interesting:I wonder how many PIC part numbers each LPC800 can replace.

author: westfw
author_rank: Super Contributor
timestamp: July 10, 2013, 05:36:39 am
content: I do have a bit of an aversion to 28pin microcontrollers that end up spending 7+ pins on power, 3 pins on dedicated functions (OSC, RST), and 4+ pins for JTAG ("You can turn off JTAG, but you might not ever be able to program the chip again.") (The particular chip I'm talking about here is the LM3S102; one of the very first CM3 aimed at "microcontroller applications." Manufacturers have gotten better since then; the latest NXP8xx series chips look quite reasonable.)

author: madires
author_rank: Super Contributor
timestamp: July 10, 2013, 11:36:40 am
content: Quote from: nctnico on July 09, 2013, 05:39:49 pmHere we go:- We got a million of MCU X in the warehouse.- We got a strategic partnership/alliance with MCU vendor X.- The boss' new sportscar was paid by MCU vendor X.- The boss' wife says that MCU X got a cute logo.

author: Rufus
author_rank: Super Contributor
timestamp: July 10, 2013, 12:13:11 pm
content: Quote from: jebcom on July 10, 2013, 02:36:19 amIf you are talking about the switch matrix many Microchip parts have had peripheral pin select for ages.If you are talking about the tool I just find it depressing that anyone thought it was worth spending time developing or making a video bragging about it. The generated code is gibberish.

author: JTR
author_rank: Regular Contributor
timestamp: July 10, 2013, 01:56:03 pm
content: Quote from: westfw on July 10, 2013, 05:36:39 amWhatever you do then, don't try to use the 28-pin PIC32MX in USB OTG configuration.

author: nctnico
author_rank: Super Contributor
timestamp: July 10, 2013, 03:28:12 pm
content: Quote from: madires on July 10, 2013, 11:36:40 am- Scrap 'm. Its cheaper anyway.- A good reason for vendor Y to get you a better deal- Vendor Y can provide a big boat AND a sportscar AND a boob job for the boss' mistress- How about the boss' mistress?

author: fcb
author_rank: Super Contributor
timestamp: July 10, 2013, 03:40:24 pm
content: Reminds me of a tale an FAE told me many years back, it went (allegedly) something like this:***** introduces new PIC killer micro (**?), and gives £10K to anyone that designs it into a volume product - to help get existing products changed over from a PIC (16C54?) ***** deliberatly designed the ** micro to have the same pin-out but spun through 180. The theory is you chuck out the PIC and put in the ** the other way round.All good, until ***** couldn't deliver on a new BIG contract for a household white goods manufacturer due to some process issue or other. Along rides Microchip, suggests turning their part through 180 and saved the day...

author: jebcom
author_rank: Regular Contributor
timestamp: July 10, 2013, 05:48:03 pm
content: QuoteWith the PIC parts that I've used, each pin has certain functions that you can select. I don't see it as a matrix. I thought it was interesting in that I might be able to avoid some of the pin function conflicts that I've run into with PICs. I can't always get the combination of peripheral functions that I need. Maybe the NXP stuff is just marketing hype and it's no more flexible than PICs; I don't know.The tool reminds me of the configuration tools that came out in the early days of PowerPC. If you didn't want to make project out of just getting the thing configured, you could buy a tool to make it quicker. But you need to trust the tool and its comments; if you want to make a change, go back to the tool. You can ignore the gibberish and understand the comments, but that's a personal preference. But of course if somebody changes the random-looking hex value without updating comments, you're hosed.

author: nctnico
author_rank: Super Contributor
timestamp: July 10, 2013, 05:52:39 pm
content: Quote from: fcb on July 10, 2013, 03:40:24 pmPutting paperware or devices still in their sampling state in a design is never a good idea. Better wait until companies like Farnell, Digikey, etc have the parts in stock c.q. for sale. A good electronics designers knows that (or will learn the hard way).

author: Rufus
author_rank: Super Contributor
timestamp: July 10, 2013, 06:15:47 pm
content: Quote from: jebcom on July 10, 2013, 05:48:03 pmA tedious and 4 year old presentation on PPS from MicrochipThe first parts had it in 2007.

author: nctnico
author_rank: Super Contributor
timestamp: July 10, 2013, 08:55:11 pm
content: Thats pretty late. The H8/300 and H8/3000 series from Hitachi already had multifunction pins and I used those in 1997.