Migrating from PIC to ARM [SOLVED]

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
What are your experiences while migrating from PIC to ARM?

If you only know the PIC micro is that the only reason you would only use the PIC micro in every project? Or ARM has different advantage as compare to PIC.

How do you choose a PIC or ARM for your project?
 

nsaspook

Joined Aug 27, 2009
13,306
No need to totally migrate from one architectures to the other. Select the best device for the project. At the 32-bit level I've used ARM , MIPS and a few other architecture processors. For most embedded applications the best peripheral and a solid system software development environment are more important than a specific core architecture.

https://www.microchip.com/en-us/pro...sors/32-bit-mcus/pic32-32-bit-mcus/pic32cm-mc
 

Ian0

Joined Aug 7, 2020
9,835
What are your experiences while migrating from PIC to ARM?
Never looked back - I use ARM for everything now (and I still write in assembler).
The most annoying thing about any 8-bit processor (for someone who writes in assembler) was the added complexity of dealing with numbers >255.
With that restriction removed, I've never had any need for C.
If you've ever used the Atmel 8-bit processors (ATTiny and ATMega) then ARM code will look completely familiar.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
Never looked back - I use ARM for everything now (and I still write in assembler).
The most annoying thing about any 8-bit processor (for someone who writes in assembler) was the added complexity of dealing with numbers >255.
With that restriction removed, I've never had any need for C.
If you've ever used the Atmel 8-bit processors (ATTiny and ATMega) then ARM code will look completely familiar.
Agree, Writing assembly code for ARM is a difficult task.

What do you use Cortex, LPC, STM?
 

dl324

Joined Mar 30, 2015
16,935
Can you tell a situation, project in which you have chosen ARM instead of PIC?
These are just tools and the answer isn't one or the other.

Sometimes a lowly 8 bit microcontroller is sufficient; sometimes you need a 32 or 64 bit processor that can multi-task.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
These are just tools and the answer isn't one or the other.
I just asked for clarification because I think there is some reason behind the selection.

Sometimes a lowly 8 bit microcontroller is sufficient; sometimes you need a 32 or 64 bit processor that can multi-task.
I don't think multitasking depends on the size of micro . We can also do multitasking on 8 bit micro
 

nsaspook

Joined Aug 27, 2009
13,306
I just asked for clarification because I think there is some reason behind the selection.


I don't think multitasking depends on the size of micro . We can also do multitasking on 8 bit micro
You can crudely and poorly multitask on a 8-bit micro. The problem with 8-bit micros and multi-tasking is not just memory or raw cpu speed. Very few 8-bit architectures are designed for efficient (of complex process state) context switching beyond simple two priority interrupt routines for I/O or timing. Most 32-bit modern controllers were designed from the start with advanced context switching support that can't be emulated on 8-bit machines designed primarily for a single main task of execution.

https://en.wikipedia.org/wiki/Context_switch
 

trebla

Joined Jun 29, 2019
547
Can you tell a situation, project in which you have chosen ARM instead of PIC? And please explain the reason why you choose ARM instead of PIC?
In case your application needs more computing power you want more powerful MCU. If a 16bit core (MSP430, dsPIC, PIC24) is not enough, you can choose a 32bit core. While you take PIC32 (MIPS) or some ARM (STM32, ATSAM, MSP432, PIC32CZ/CX etc) depends mostly how familiar you are with these devices and development tools, also from price, availability, peripherials etc. I prefer PIC over MSP430 in 16bit domain just because i know PIC MCU/IDE better and in 32bit domain i choose STM32 because i haven't used PIC32 in my projects yet (but i'm sure, some day i will).
 

Ian0

Joined Aug 7, 2020
9,835
what does best mean to you?
Can you tell a situation, project in which you have chosen ARM instead of PIC? And please explain the reason why you choose ARM instead of PIC?
It depends on the PIC, as I changed to ARMs before without ever using any 16 or 32 bit PICs
So, for me, it’s any project which needs numbers greater than 255.
 

Ya’akov

Joined Jan 27, 2019
9,170
You can crudely and poorly multitask on a 8-bit micro. The problem with 8-bit micros and multi-tasking is not just memory or raw cpu speed. Very few 8-bit architectures are designed for efficient (of complex process state) context switching beyond simple two priority interrupt routines for I/O or timing. Most 32-bit modern controllers were designed from the start with advanced context switching support that can't be emulated on 8-bit machines designed primarily for a single main task of execution.

https://en.wikipedia.org/wiki/Context_switch
Z80 rules.
 

nsaspook

Joined Aug 27, 2009
13,306
Z80 rules.
The original Z80 shadow/alternate registers, one byte banking opcodes and interrupt vector addressing improve interrupt efficiency but they don't provide the features needed for efficient context switching of normal (non-interrupt routine dual task) execution path tasks. The original M68000 was much better for context switching but it still lacked important features that was added to the M68010 for virtual machine capability.
https://en.wikipedia.org/wiki/Motorola_68010
https://www.ee.ryerson.ca/~kclowes/628/rymos.pdf
 

Ya’akov

Joined Jan 27, 2019
9,170
The original Z80 shadow/alternate registers, one byte banking opcodes and interrupt vector addressing improve interrupt efficiency but they don't provide the features needed for efficient context switching of normal (non-interrupt routine dual task) execution path tasks. The original M68000 was much better for context switching but it still lacked important features that was added to the M68010 for virtual machine capability.
https://en.wikipedia.org/wiki/Motorola_68010
https://www.ee.ryerson.ca/~kclowes/628/rymos.pdf
Yes, the Z80 was really good for communications hardware, especially async multiport stuff. It was used long after it's general use as a CPU on multiport serial boards because of that context switching foo.
 
Top