Cornell PIC32 lectures  2015  and  2016 - Page 1
Forum section: electronics / general

author: ez24
author_rank: Super Contributor
timestamp: January 01, 2017, 07:06:51 am
content: 20152016

author: diyaudio
author_rank: Frequent Contributor
timestamp: January 01, 2017, 09:13:26 am
content: Quote from: ez24 on January 01, 2017, 07:06:51 am20:14 For those disputing the ARM VS PIC32.Great Guy, really like listening to he's lectures.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: January 01, 2017, 02:25:31 pm
content: "ARM bare-metal is really complicated " WTF ?Even in assembler, ARM is pretty easy - I did a lot many years ago.I don't know enough about MIPs to compare.

author: hans
author_rank: Super Contributor
timestamp: January 01, 2017, 06:13:10 pm
content: I find MIPS assembly harder to read and understand at first glance than ARM.Both PIC32 and ARM require read-modify-write for I/O register access.But that is just routine. I think what Bruce means is that ARM chips like STM32 require so many registers to setup before anything basic runs like a UART:- Set up PLL registers- Wait for PLL lock- Set up FLASH wait time- Set up system clock dividers- Enable GPIO clocks- Set up basic GPIO peripheral registers for UART I/O- Enable UART peripheral clocks- Set up basic UART peripheral registers- Enable IRQ of UART peripheral- Setup IRQ vector in NVIC with proper priority- Enable IRQ vector in NVIC for UART- Enable UART peripheralNevertheless PIC32 isn't that far off neither. It's just missing some of the peripheral clock stuff. Once you're familiar with the chip it's not a big deal. Just more work and stuff to forget potentially.However this doesn't even include DMA, which seems to be his most favourite peripheral of the PIC32, as it is admittedly simple yet powerful. Much simpler to setup than for instance STM32s one (which is not nearly as flexible).MIPS and (SP)ARC are very popular in universities because they have got more educational materials and simulators available. Also I don't think most universities fancy working on (open source) tools that can be heavily used by the commercial industry, and sometimes seem to consciously make different choices than the industry.But in the end: MIPS, ARM, PIC, AVR, MSP430.. none of them are alien once you learned the basics. Just whatever fits your project or comfort zone.In other news, after watching some segments of the course I do like how it is setup. Embedded = efficient, lean yet robust programs, as they are often single-purpose minimalistic devices. I get the feeling he tries to get that point across quite well, as he invites or more or less requires students to use every single peripheral inside the chip together.

author: eugenenine
author_rank: Frequent Contributor
timestamp: January 01, 2017, 06:46:43 pm
content: Are they written somewhere for those of us that have kids and therefore can't hear a video?

author: andersm
author_rank: Super Contributor
timestamp: January 01, 2017, 06:48:54 pm
content: Quote from: hans on January 01, 2017, 06:13:10 pmThere's no meaningful difference.QuoteThen on the other hand you have eg. the LPC17xx series which have scatter/gather support. Generalizing anything about "ARM" peripherals is pointless, since there's such a variety of devices.QuoteSPARCis not related toARC. Their popularity in academia is easy to explain by looking at their history.

author: Howardlong
author_rank: Super Contributor
timestamp: January 01, 2017, 06:56:56 pm
content: The way I read it was he was comparing PIC32 to ARM Cortex-A application processors rather than Cortex-M which are the direct competitors in this market, but I may have misinterpreted it.The difficulty of getting started on bare metal, say to do a blinky, is probably more dependent on the vendor specific implementation of the IP and their peripherals than it is to do with the core itself.Having said that, when I started on ARM I found the the whole ecosystem to be highly confusing to a newcomer, not helped by marketing rebranding wank around the core naming which has lacked consistency over the years.What I would say is that you can get a blinky going on bare metal on a PIC32 with default fuses (except disabling the watchdog) and the shipped minimal startup code, with default clocks being alread setup. Being available in DIP I personally find the icing on the cake but on its own is not a show stopper.Irrespective, spending anything more than a few seconds discussing it in a course is unnecessary: arguing the pros and cons of one archtecture over another isn't going to make an LED flash. The fundamental concepts are the same after all. I can see some students complaining that "the majority of industry is ARM these days" which may be true, but each ARM and MIPS vendor does their own implementation in terms of peripherals and tool chains. Switching between TI and NXP ARM Cortex-M isn't much different in terms of learning curve to switching between Cortex-M and PIC32 MIPS.

author: ez24
author_rank: Super Contributor
timestamp: January 01, 2017, 07:28:20 pm
content: Quote from: mikeselectricstuff on January 01, 2017, 02:25:31 pmI think he means in a learning environment.

author: cv007
author_rank: Frequent Contributor
timestamp: January 01, 2017, 10:22:09 pm
content: PIC32 is a good choice primarily because it is available in a DIP package. Nothing like being able to slap a chip on a breadboard... and another... and another- each idea just breadboard it with another pic32 (and in this case, if they damage the pic on the Microstick2, just replace it). The added bonus is you have one place to download datasheets, ide, compiler, library (with no registration required, and Linux/Mac/Windows is supported).

author: ez24
author_rank: Super Contributor
timestamp: January 01, 2017, 10:30:55 pm
content: Quote from: cv007 on January 01, 2017, 10:22:09 pmYES - Now I remember he said this (I think in the 2012 series videos - AVRs) and quoted the number of blown chips in a previous semester. I do not remember the number but it was high considering it was a university course. The TAs replaced them.

author: Howardlong
author_rank: Super Contributor
timestamp: January 01, 2017, 11:33:03 pm
content: Actually I hadn't considered the replaceability aspect of the DIP package, that would certainly be an excellent practical reason on its own to select the part. Like it or not, you're much more likely to break parts if you're less experienced.There are a couple of NXP ARM Cortex M0 devices in DIP, one's an 8 pinner (LPC810) and the other's a 28 pin wide DIP, LPC1114. While I've had both of them working on a breadboard, that's as far as I ever went with those particular devices, I bought them in case I had a need in the future. Microchip has a significantly wider selection in DIP, although the DIP variant of the PIC32 is only available in 28 pin skinny DIP.

author: eugenenine
author_rank: Frequent Contributor
timestamp: January 02, 2017, 12:36:53 am
content: Also breadboardability which works well in a school environment. That guy on youyube isn't the first person so sneak a PIC into a complex breadboarded project for school.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: January 02, 2017, 02:35:28 pm
content: I think I've seen all lecture videos but the last ones (excluding the project videos). I scanned the first episode but it seemed more of the same - so I didn't bother.Quote from: mikeselectricstuff on January 01, 2017, 02:25:31 pmWell, these are starting students from what I can see. You, Mike, have gathered an enormous amount of experience and knowledge over the years, and things that are self-evident to you, are magical to a student.I think Bruce is awesome. I wish I had a teacher like that when I was in school.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: January 02, 2017, 03:08:17 pm
content: Quote from: obiwanjacobi on January 02, 2017, 02:35:28 pmI'm just questioning his assertion that ARM is any more difficult to use without an OS. For similar range parts ( e.g. Cortex) I don't think there's a significant difference.However what I think he meant was that PIC32 is easier than the sort of ARMs typically used to run Linux, which is certainly true.He just fails to make the disticntion ( or is unfamiliar with the Cortex parts).I'd expect someone in charge ot teaching people to be a bit more precise.