Author Topic: PIC equivalent of the M328P ?  (Read 21094 times)

0 Members and 1 Guest are viewing this topic.

Offline expertmax1Topic starter

  • Contributor
  • Posts: 31
  • Country: ca
PIC equivalent of the M328P ?
« on: June 26, 2013, 12:00:36 am »
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
-> ATMega328P

Thanks (P.S. : NO PIC VS AVR DISCUSSION !!!)
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: PIC equivalent of the M328P ?
« Reply #1 on: June 26, 2013, 12:05:56 am »
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.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline expertmax1Topic starter

  • Contributor
  • Posts: 31
  • Country: ca
Re: PIC equivalent of the M328P ?
« Reply #2 on: June 26, 2013, 03:47:31 am »
Fair enough, is there any USBTinyISP alternative for PIC ?
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: PIC equivalent of the M328P ?
« Reply #3 on: June 26, 2013, 05:35:37 am »
The larger the government, the smaller the citizen.
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: PIC equivalent of the M328P ?
« Reply #4 on: June 26, 2013, 05:37:51 am »


Wicrochip?
The larger the government, the smaller the citizen.
 

Offline JTR

  • Regular Contributor
  • *
  • Posts: 107
  • Country: au
Re: PIC equivalent of the M328P ?
« Reply #5 on: June 26, 2013, 05:48:47 am »
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.
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: PIC equivalent of the M328P ?
« Reply #6 on: June 26, 2013, 07:09:26 am »
 
Quote
choose the 8 bit MCUs
Why 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.
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3221
  • Country: de
Re: PIC equivalent of the M328P ?
« Reply #7 on: June 26, 2013, 06:40:21 pm »

So I'm looking for PIC alternatives for this :

-> ATMega328P


The 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 regards

Andreas
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4067
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: PIC equivalent of the M328P ?
« Reply #8 on: June 28, 2013, 09:13:18 pm »
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.
 

Offline cthree

  • Frequent Contributor
  • **
  • Posts: 258
  • Country: ca
Re: PIC equivalent of the M328P ?
« Reply #9 on: June 28, 2013, 11:36:58 pm »
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.

I'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.
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: PIC equivalent of the M328P ?
« Reply #10 on: June 28, 2013, 11:45:11 pm »
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-bit

Quote from: ARM.COM
Instruction width

It is a common misconception that 8-bit microcontrollers use 8-bit instructions and ARM Cortex-M processor-based microcontrollers use 32-bit instructions. In reality for example, the PIC18 and PIC16 instruction sizes are 16-bit and 14-bit respectively. For the 8051 architecture, although some instructions are 1 byte long, many others are 2 or 3 bytes long. The same also applies to 16-bit architectures, where some instructions can take 6 bytes or more of memory.

The ARM Cortex-M processors utilize the ARM Thumb®-2 technology which provides excellent code density. With Thumb-2 technology, the Cortex-M processors support a fundamental base of 16-bit Thumb instructions, extended to include more powerful 32-bit instructions. In many cases a C compiler will use the 16-bit version of the instruction unless the operation can be carried out more efficiently using a 32-bit version.

Instruction efficiency

This picture is not complete without also considering that ARM Cortex-M processor instructions are more powerful. There are many circumstances where a single Thumb instruction equates to several 8/16-bit microcontroller instructions; this means that Cortex-M devices have smaller code and achieve the same task at lower bus speed.

And 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.
The larger the government, the smaller the citizen.
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13694
  • Country: gb
    • Mike's Electric Stuff
Re: PIC equivalent of the M328P ?
« Reply #11 on: June 28, 2013, 11:51:39 pm »
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.

I'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.
The 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.
 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1626
  • Country: nl
Re: PIC equivalent of the M328P ?
« Reply #12 on: June 29, 2013, 09:25:13 pm »
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.
« Last Edit: June 29, 2013, 09:32:09 pm by hans »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: PIC equivalent of the M328P ?
« Reply #13 on: June 30, 2013, 10:16:37 am »
Quote
choose the 8 bit MCUs
Why 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.
He 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.
 

Offline glatocha

  • Regular Contributor
  • *
  • Posts: 114
Re: PIC equivalent of the M328P ?
« Reply #14 on: July 03, 2013, 01:23:19 pm »
Quote from: ARM.COM
Instruction width

It is a common misconception that 8-bit microcontrollers use 8-bit instructions and ARM Cortex-M processor-based microcontrollers use 32-bit instructions.

Really? is it a COMMON misconception?
Those marketing guys do think we are stupid.
 

Offline glatocha

  • Regular Contributor
  • *
  • Posts: 114
Re: PIC equivalent of the M328P ?
« Reply #15 on: July 03, 2013, 01:29:40 pm »
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
-> ATMega328P


For 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
« Last Edit: July 03, 2013, 01:37:08 pm by glatocha »
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC equivalent of the M328P ?
« Reply #16 on: July 03, 2013, 01:30:30 pm »
Those marketing guys do think we are stupid.
Even hang around on a programming forum?

Offline glatocha

  • Regular Contributor
  • *
  • Posts: 114
Re: PIC equivalent of the M328P ?
« Reply #17 on: July 03, 2013, 01:40:18 pm »
Those marketing guys do think we are stupid.
Even hang around on a programming forum?

Probably yes, but why you asking?
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC equivalent of the M328P ?
« Reply #18 on: July 03, 2013, 06:24:48 pm »
Those marketing guys aren't completely wrong.

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: PIC equivalent of the M328P ?
« Reply #19 on: July 03, 2013, 06:29:29 pm »
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. :P
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4067
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: PIC equivalent of the M328P ?
« Reply #20 on: July 05, 2013, 10:07:24 pm »
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.
 

Offline cthree

  • Frequent Contributor
  • **
  • Posts: 258
  • Country: ca
Re: PIC equivalent of the M328P ?
« Reply #21 on: July 06, 2013, 04:24:42 am »
Claims of the death of 8 bit micro controllers are greatly exaggerated.
 

Offline JTR

  • Regular Contributor
  • *
  • Posts: 107
  • Country: au
Re: PIC equivalent of the M328P ?
« Reply #22 on: July 06, 2013, 07:44:59 am »
Those marketing guys do think we are stupid.
Even hang around on a programming forum?

 :-DD
Funniest 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?  :scared:
« Last Edit: July 06, 2013, 07:49:27 am by JTR »
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Re: PIC equivalent of the M328P ?
« Reply #23 on: July 06, 2013, 10:29:04 am »
Claims of the death of 8 bit micro controllers are greatly exaggerated.
I wouldn't be sure about that. I haven't used one in a design for over 15 years!
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: PIC equivalent of the M328P ?
« Reply #24 on: July 06, 2013, 11:14:17 am »
Claims of the death of 8 bit micro controllers are greatly exaggerated.
I wouldn't be sure about that. I haven't used one in a design for over 15 years!
Depends what sort of designs you're talking about...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf