Author Topic: Why do you think this professor went from AVR to PIC in his class?  (Read 25565 times)

0 Members and 1 Guest are viewing this topic.

Offline ez24Topic starter

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
From  2012 until 2014 Professor Bruce Land

https://www.youtube.com/channel/UCgpQgWLXEZWSplxs1eB9Gvw

http://people.ece.cornell.edu/land/courses/ece4760/

used AVR micros, and for 2015 he switched to PIC32

I assume all were in DIP packages to be used in breadboards. 

Any theories why he would switch in an academic environment?  In 2012 he said that students typically blow 40 chips so the DIP is easy to replace.  I think his ATmeg644 (used in 2012) was in 40 pin dip and the ATmega1284 is 40 pins and the PIC32 comes in 28 pins.  I wonder if the reason is it is easier to replace a 28 pin DIP vs a 40 pin DIP?  I also find it interesting to see that a 8 bit is 40 pins and 32 bit is in 28 pins.  I do not know microcontrollers, just that there are two major players in the field: AVR and PIC.

Any other reasons why in an academic environment he would switch from AVR to PIC?  I imagine he would have to learn a lot of new things to make the change so there must be a good reason.  I just cannot think it is cost.




« Last Edit: August 16, 2015, 06:26:15 pm by ez24 »
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #1 on: August 16, 2015, 04:45:54 am »
PIC32 is an "industry standard MIPS" architecture, as well as being 32bits.
A lot of schools seem to teach MIPS in their architecture and/or assembler classes.  It's pretty straightforward and understandable.
(You might think to use ARM, but by the time you're restricted to the "compressed" THUMB instructions (for cortex M), it's no longer nearly as straightforward.)

Quote
there are two major players in the field: AVR and PIC.
That is a VAST over-simplification (starting with: there are three different PIC architectures, and two AVR architectures.  Plus multiple vendors worth of 8051 and ARM that should be considered, at the minimum.)   Atmel and Microchip are just the two vendors who have attracted the most "hobbyist" interest.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #2 on: August 16, 2015, 04:48:33 am »
Yes, my first guess would also be that they are using MIPS elsewhere and wanted to standardize on an architecture. MIPS is really common academically, both of the schools I've been to used it quite extensively.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #3 on: August 16, 2015, 07:18:11 am »
Atmel and Microchip are just the two vendors who have attracted the most "hobbyist" interest.
Not quite true. Renesas is the top manufacturer of MCU's overall, but Microchip is definitely a major player (rated 4th in 2014) and so was Atmel until a few years ago.

OK, so Microchip and Atmel aren't the top 2 sales-wise, but does that mean they aren't "the major players in the field"? Depends what field you are talking about. I bet that far more developers (not just "hobbyists") are using Microchip or Atmel  than Renesas.       

BTW Microchip is the king of 8 bit.   
Microchip Reclaims Top 8-bit Microcontroller Revenue Ranking
Quote
“We are pleased to report that Microchip has regained the #1 position for 8-bit microcontrollers,” said Steve Sanghi, Microchip’s president and CEO. “Four years ago, it took the merger of three Japanese semiconductor giants—NEC, Hitachi and Mitsubishi in the form of Renesas—to knock us off the #1 spot for 8-bit MCUs. We said at the time that we would work relentlessly to gain market share and wrest back the #1 spot. Following their merger in 2010, Renesas’ 8-bit MCU business was 41% larger than ours. In every year since 2010, we closed the gap, and in 2014 we regained our leadership position, finishing 10.5% higher than Renesas.

But 8 bitters are only a small segment of the market, right? Wrong!
Quote
In terms of device shipments, 4/8-bit MCUs overtook 16-bit devices in 2013 to regain their historic position as the largest unit-volume category in the market.  The outlook shows 4/8-bit MCUs remaining the largest unit-volume category in microcontrollers during the next five years
« Last Edit: August 16, 2015, 07:22:31 am by Bruce Abbott »
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #4 on: August 16, 2015, 08:18:38 am »
Atmel and Microchip are just the two vendors who have attracted the most "hobbyist" interest.
Not quite true. Renesas is the top manufacturer of MCU's overall, but Microchip is definitely a major player (rated 4th in 2014) and so was Atmel until a few years ago.
Renesas basically don't exist in hobbyist circles, at least in the west. In Asia, they have eg. their own Arduino clone, but outside of a few half-hearted attempts at cheap starter kits they just don't seem interested to push their products over here.

We can only speculate behind the reason for the switch. The MIPS architecture is used a lot in education, not least due to the almost industry-standard computer architecture textbooks by David Patterson and John Hennessy. It may also be because the school got a good deal on boards and other equipment from Microchip.

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #5 on: August 16, 2015, 08:46:04 am »
Quote
Microchip and Atmel aren't the top 2 sales-wise, but does that mean they aren't "the major players in the field"?
Subtle semantics.  I didn't mean to imply that Atmel and Microchip aren't AMONG the major players in the field, I just object to them being labeled THE major players in the field.

I should have been more careful; I've seen people who seem to believe that Atmel and Microchip service ONLY hobbyists, which is simply not true.
« Last Edit: August 16, 2015, 08:48:46 am by westfw »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #6 on: August 16, 2015, 08:55:18 am »
Academia is a completely different world to industry, reasons for selecting parts are completely different.

My guess is they wanted to move to 32 bit, and PIC32 is the only 32 bit range of any significance available in DIP, which makes breadboarding easy and cheap. It also has a decent on-chip RC osc, so fewer parts needed on a breadboard.

It may also be that Microchip donated parts and devtools.

I doubt architecture had much to do with it (other than being 32 bit).
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7392
  • Country: nl
  • Current job: ATEX product design
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #7 on: August 16, 2015, 09:51:38 am »
Academia is a completely different world to industry, reasons for selecting parts are completely different.

My guess is they wanted to move to 32 bit, and PIC32 is the only 32 bit range of any significance available in DIP, which makes breadboarding easy and cheap. It also has a decent on-chip RC osc, so fewer parts needed on a breadboard.

It may also be that Microchip donated parts and devtools.

I doubt architecture had much to do with it (other than being 32 bit).
I've seen a lab in a university, which was donated entirely by Microchip to the university. Including the computers and the projector, and like 200 development boards. They also made scholarships for the students and conferences for anyone free of charge in the lab. This is a very good reason to teach on their devices. Makes total sense for them, the total cost is marginal, and hundreds of people (big university) every year familiarize themselves with their products. Best ad campaigns.
 

Online gmb42

  • Frequent Contributor
  • **
  • Posts: 294
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #8 on: August 16, 2015, 11:38:33 am »
And selected excerpts from this years McClean Report (http://www.icinsights.com/news/bulletins/Microcontroller-Sales-Regain-Momentum-After-Slump/)

Quote
The new edition of The McClean Report also shows unit shipments of 32-bit microcontrollers surpassing 4 /8-bit MCUs for the first time in 2015 as demand increases for higher levels of precision in embedded-processing for clusters of sensors and systems that know their locations and automatically react to operating environments.

and where do all those MCUs end up (somewhat surprisingly to me at least):

Quote
While smartcards account for about half of all microcontrollers shipped worldwide, this segment represents less than 20% of total MCU revenues due to razor-thin ASPs for smartcard MCUs.
  my add emphasis.

 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #9 on: August 16, 2015, 12:14:16 pm »
Renesas basically don't exist in hobbyist circles, at least in the west. In Asia, they have eg. their own Arduino clone, but outside of a few half-hearted attempts at cheap starter kits they just don't seem interested to push their products over here.

Freescale is another one unknown in the hobbyist market. About 20 years ago I've played with 68HC11 (asm) and 68332 (C) at the university. 68HC11 was THE 8 bit MCU back then.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8277
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #10 on: August 16, 2015, 12:43:03 pm »
I agree with everyone here that academics seem to love MIPS. Personally I don't really get it, sure it's simple but I think it's a bland and boring architecture compared to the rest.

NXP has some ARMs in DIP too (LPC series).
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #11 on: August 16, 2015, 12:46:39 pm »
Don't forget the MSP430, which is also available in DIP, and has cheap as dirt dev boards (plus an Arduino compatible IDE called Energia)! Also, they're 16-bit.


Sent from my Tablet
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #12 on: August 16, 2015, 12:55:41 pm »
Freescale is another one unknown in the hobbyist market. About 20 years ago I've played with 68HC11 (asm) and 68332 (C) at the university. 68HC11 was THE 8 bit MCU back then.
Judging by old issues of Elektor, the HC11 and HC12 were pretty popular back then. Freescale have had a slight resurgence with the Kinetis Freedom boards.

I agree with everyone here that academics seem to love MIPS. Personally I don't really get it, sure it's simple but I think it's a bland and boring architecture compared to the rest.
MIPS came from academia. John Hennessy, now president of Stanford University, headed the research project that begat the MIPS architecture, and was one of the founders of MIPS Computer Systems. It is also a very simple architecture, which makes it useful as a teaching tool.

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8654
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #13 on: August 16, 2015, 01:02:38 pm »
Freescale is another one unknown in the hobbyist market. About 20 years ago I've played with 68HC11 (asm) and 68332 (C) at the university. 68HC11 was THE 8 bit MCU back then.
20 years the biggest volume MCU family from Freescale was the HC05.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #14 on: August 16, 2015, 01:11:08 pm »
My guess is they wanted to move to 32 bit, and PIC32 is the only 32 bit range of any significance available in DIP, which makes breadboarding easy and cheap. It also has a decent on-chip RC osc, so fewer parts needed on a breadboard.

That seems to be the most compelling reason. But abandoning the 8 bit MCU might be a little bit too early. It's also a good starting point for teaching MCUs. Possibly just a prejudice, I'm a little bit afraid that we'll get more bloatware developers.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #15 on: August 16, 2015, 01:23:17 pm »
20 years the biggest volume MCU family from Freescale was the HC05.

Sure, HC05 was commonly used for control boards and such stuff. The HC11 together with the 68HC24 was more interesting.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #16 on: August 16, 2015, 03:24:40 pm »
My guess is they wanted to move to 32 bit, and PIC32 is the only 32 bit range of any significance available in DIP, which makes breadboarding easy and cheap. It also has a decent on-chip RC osc, so fewer parts needed on a breadboard.

That seems to be the most compelling reason. But abandoning the 8 bit MCU might be a little bit too early. It's also a good starting point for teaching MCUs. Possibly just a prejudice, I'm a little bit afraid that we'll get more bloatware developers.
The problem with teaching on small MCUs is you quickly hit limits that need working around. 8 bit C compilers often have various non-standardnesses to work around with limitations.
PIC32 with the Microchip tools isn't really much more complicated to get into, than 8 bit, and very easy to migrate to from 8 bit as many of the peripherals are very similar and the IDE and programmers are the same.
e.g. the linker by default is set to just work if you don't have an explicit linker script , until you start messing with bootloaders you don't even need to know it exists. 
Similarly with a single #include <xc.h>, the compiler automatically pulls in the device-specific includes based on the IDE's part type setting.
This makes the process of getting up & running with a part very quick & easy.
The only fiddly bit comes when you start using peripherals & need to do the pin mapping stuff, but most modern MCUs have that in some form.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26909
  • Country: nl
    • NCT Developments
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #17 on: August 16, 2015, 08:03:36 pm »
Any other reasons why in an academic environment he would switch from AVR to PIC?  I imagine he would have to learn a lot of new things to make the change so there must be a good reason.  I just cannot think it is cost.
Probably because 8 bit is ancient and 32 bit is the future. I assume Microchip has provided the materials for free because there are so many better choices out there with an ARM cpu. Having a DIP package available doesn't seem logical to me because you'll still need decoupling and a good layout for it to work. Putting a microcontroller running at tens of MHz in a breadboard is just asking for problems.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11900
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #18 on: August 16, 2015, 08:31:35 pm »
I agree with everyone here that academics seem to love MIPS. Personally I don't really get it, sure it's simple but I think it's a bland and boring architecture compared to the rest.

Surely this is a strong positive from the point of view of engineering? Sound engineering should emphasize simplicity, not complexity. There's nothing worse than an engineering project where the designers have decided to make it "interesting".
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #19 on: August 16, 2015, 08:57:25 pm »
Any other reasons why in an academic environment he would switch from AVR to PIC?  I imagine he would have to learn a lot of new things to make the change so there must be a good reason.  I just cannot think it is cost.
Probably because 8 bit is ancient and 32 bit is the future. I assume Microchip has provided the materials for free because there are so many better choices out there with an ARM cpu. Having a DIP package available doesn't seem logical to me because you'll still need decoupling and a good layout for it to work. Putting a microcontroller running at tens of MHz in a breadboard is just asking for problems.

That's my bread(board) and butter: pretty much every day I'm breadboarding something new, and as counter intuitive as it may seem, breadboarding 50MHz PIC32 MIPS (fastest you can go in DIP) is simplicity itself as long as you are sensible. That means decoupling caps adjacent to the power pins, on breadboard regulators, short high speed connections, plenty of attention to power decoupling and distribution, etc. Even the crystal oscillator and full speed USB work fine when breadboarded.

Remember that the maximum speed outside of the chip is rather less than 50MHz, all the high speed stuff is on the die, but I've also had no problem breadboarding 140MHz clocked PIC24s and dsPIC33s too. Running 20MHz SPI breadboarded on a PIC32 MIPS isn't a problem for example.

I do agree though that unless reasonable care is taken, you are indeed asking for trouble, but it's not at all hard once a few key considerations have been addressed.
« Last Edit: August 16, 2015, 10:40:33 pm by Howardlong »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #20 on: August 16, 2015, 10:28:30 pm »
I lash up sketchy breadboards  all the time with DIP PIC32's at 48MHz (The on-chip PLL runs at 96MHz) , throwing out SPI data at 24MHz and lots of IO toggling, never had an issue. The only thing that upsets it is forgetting the Vcore decoupling cap, and if that's missing it won't even program, so fairly obvious.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #21 on: August 16, 2015, 10:32:08 pm »
- freebies.
Microchip is very good for academia with handing out free stuff.

- MIPS architecture, which is one of the big standards ( together with ARM ) as opposed to closed vendor architectures like PIC and AVR
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #22 on: August 16, 2015, 10:58:03 pm »
- freebies.
Microchip is very good for academia with handing out free stuff.

- MIPS architecture, which is one of the big standards ( together with ARM ) as opposed to closed vendor architectures like PIC and AVR
Though as with industry, for practical work in education the core architecture doesn't really matter. Having something that's affordable (free is good), readily available, easy to get started with (both SW and HW) and has plenty of resources, examples etc.  is more important.

If anything it would be better to each theory on one (or ideally more than one) architecture and practicals on another to add some variety.

Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline ez24Topic starter

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #23 on: August 16, 2015, 11:50:22 pm »
OP response:

Quote
PIC32 is an "industry standard MIPS" architecture, as well as being 32bits.
I do not know what MIPS is so I need to read up on it.  Maybe 32 looks better than 8 on a course description so the school may have put pressure on him to change.
Quote
It may also be because the school got a good deal on boards and other equipment from Microchip.
The prof said that Atmel donated stuff so I assumed Microchip did also.  Unless Microchip donated other equipment like scopes - I think this is a draw.
Quote
My guess is they wanted to move to 32 bit, and PIC32 is the only 32 bit range of any significance available in DIP, which makes breadboarding easy and cheap. It also has a decent on-chip RC osc, so fewer parts needed on a breadboard.
I think these are the answers.  In his AVR class he talks about the crystal and students can change it and remove it, so he warns students to check it before each lab.  I assume the PIC32 does not use a crystal.
Quote
I've seen a lab in a university, which was donated entirely by Microchip to the university.
I am impressed.
Quote
Having a DIP package available doesn't seem logical to me because you'll still need decoupling and a good layout for it to work. Putting a microcontroller running at tens of MHz in a breadboard is just asking for problems.

He uses this

http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=DM330013-2

I assume the Microstick II takes care of the decoupling problems ?
Quote
breadboarding 50MHz PIC32 MIPS (fastest you can go in DIP)

another good reason
Quote
Vcore decoupling cap

Is this on the Microstick II  ? or would I have to add one on the breadboard?

Thanks for all the good answers.
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: aq
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #24 on: August 17, 2015, 12:31:40 am »
Noone remebers the Z80, once akademias lover boy and  the most sold 8bitter in the world!
Anyho, i would be  interessted to know what the professor will chose 10years time, about 2025!
2025 sound so futuristic!:)
« Last Edit: August 17, 2015, 12:38:15 am by MT »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #25 on: August 17, 2015, 01:24:26 am »
a lucky day was the day I got my "Atlas board" from ebay. It's a professional evaluation board for MIPS32R2, also equipped with a pretty FPGA and EJTAG. I was lucky and I got one for 250 USD. I was a student, and I had 2 examinations about architectures plus4 laboratories. We had to study how the pipeline works in details. What I think? This is part of the success of MIPS in academy, for the theory, while Microchip has thought about the practice: cheaper boards, 1:10 of what I payed, smaller and more confortable.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #26 on: August 17, 2015, 01:27:50 am »
i would be  interessted to know what the professor will chose 10years time, about 2025!
2025 sound so futuristic!:)

umm a GameBoy from '90, with this cartridge   :D
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #27 on: August 17, 2015, 01:28:44 am »
I agree with everyone here that academics seem to love MIPS. Personally I don't really get it, sure it's simple but I think it's a bland and boring architecture compared to the rest.

I think that if you're teaching architecture, bland and boring makes a lot of sense. Add complications later, but make sure that the students understand the basics first.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #28 on: August 17, 2015, 01:30:20 am »
Freescale is another one unknown in the hobbyist market.

They're not interested in small companies, either. "How many thousands are you buying a month?" is the first question they ask when engaging a potential customer.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #29 on: August 17, 2015, 02:41:56 am »
Quote
Noone remebers the Z80, once akademias lover boy
Was it?   I went to school back in the z80 heyday (77-81), and while the "lab computers" were all  Z80 CP/M machines, the "Assembly language" class taught IBM360 and PDP11, the "Microprocessor" class taught 6800, and the senior EE class used Intel X86 development boards (too bad that hardly any of the EEs had learned to program, beyond their first year Fortran and Numerical Methods classes.)

Zilog still exists.  And some of those "not popular for hobbyists" Renesas chips are essentially Z80s with bells, whistles, and kludges attached...
 

Offline Tainer

  • Contributor
  • Posts: 37
  • Country: 00
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #30 on: August 17, 2015, 04:54:09 am »
Any theories why he would switch in an academic environment?

He already answered this question on HaD.
https://hackaday.io/project/762-teaching-microcontroller-design
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #31 on: August 17, 2015, 05:23:46 am »
Quote
breadboarding 50MHz PIC32 MIPS (fastest you can go in DIP)

another good reason
Quote
Vcore decoupling cap

Is this on the Microstick II  ? or would I have to add one on the breadboard?

Thanks for all the good answers.

Everything you need to get started is on the board including a debugger similar in features to the PICKit 3.

The only thing lacking are physical peripherals like LEDs, buttons, pots etc. which are meant to be on your breadboard.

Here's an asteroids game I did on a Microstick http://youtu.be/BXOHyjeLAXM but note that the PIC32 doesn't have DACs, this was done with a PIC24. You'd have to use a couple of PWM outputs with RC LPFs to do this on a PIC32.
 

Offline ez24Topic starter

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #32 on: August 17, 2015, 06:05:33 am »
Quote
He already answered this question on HaD.
https://hackaday.io/project/762-teaching-microcontroller-design


His answers:

- Easier to teach.  (I didn't see this one coming)

- PIC32 is a 32-bit M4K MIPS core with good peripherials. It is simple enough to be programmed 'bare metal', but gives a factor of 10 performance increase over AVR.

Thanks Tainer

I hate to ask this (because it will show how stupid I am but..)  what does he mean by "good peripherals" ?   What does "bare metal" mean?

thanks for educating a 68 yo with many dead brain cells.  :-DD   My goal in life is to finish Lab 1  :clap:
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #33 on: August 17, 2015, 06:09:43 am »
"Bare metal" means poking the hardware registers directly, without an operating system or other driver or abstraction layer in between.

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #34 on: August 17, 2015, 06:27:27 am »
"Bare metal" means poking the hardware registers directly, without an operating system or other driver or abstraction layer in between.

I guess he's avoiding the dreaded Harmony framework then!

(Harmony is Microchip's "holistic, aggregate approach to creating firmware solutions for embedded systems using Microchip PIC32 microcontrollers", there, now you know. It was first released nearly two years ago and is a framework for abstracting the hardware from the app code. Unfortunately it is often derided as being excessive in its utopian goals, leading to bloated code, using much machine written write-only code, and being a couple of abstractions too far for low end 32 bit microcontroller applications. It's also hellish difficult to pick up.)
 

Offline ez24Topic starter

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #35 on: August 17, 2015, 06:40:00 am »
Quote
I guess he's avoiding the dreaded Harmony framework then!

I saw "Harmony" before but was really afraid to ask any questions about it -  I thought it had something to do with music but I was guessing I was wrong.  :-*
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline Tainer

  • Contributor
  • Posts: 37
  • Country: 00
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #36 on: August 17, 2015, 07:17:50 am »
His answers:

- Easier to teach.  (I didn't see this one coming)
Easier to tech in comparison to ARM Cortex architectures (which is absolutely true).

Nevertheless, why don't you ask Bruce Land himself? I'm pretty sure he will give a better answer than any of us regarding his decision  :)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9954
  • Country: nz
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #37 on: August 17, 2015, 07:23:20 am »
Yep, moving from AVR(mega/tiny) to a PIC(PIC32) can't be interpreted as a fanboy "PIC WINs" argument.
Since a 32bit PIC is obviously better than a 8bit AVR.

Now, had he moved from a ATMega328 to a PIC10 you could slap him about the head and say "WTF".   :-DD
« Last Edit: August 17, 2015, 07:28:22 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #38 on: August 17, 2015, 07:55:59 am »
OP response:
I think these are the answers.  In his AVR class he talks about the crystal and students can change it and remove it, so he warns students to check it before each lab.  I assume the PIC32 does not use a crystal.
Most MCUs can be run without a crystal, using an internal oscillator, the difference is that on more modern ones like PIC32, the internal oscillator is accurate enough for many applications (around 1% from memory), whereas the AVRs have historically had pretty ropey ones (looked at newer AVRs, this may have improved)
Quote
He uses this
http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=DM330013-2

I assume the Microstick II takes care of the decoupling problems ?
Quote
Vcore decoupling cap

Is this on the Microstick II  ? or would I have to add one on the breadboard?


Yes - any devboard will include the essential parts for basic operation
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8277
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #39 on: August 17, 2015, 01:17:34 pm »
I agree with everyone here that academics seem to love MIPS. Personally I don't really get it, sure it's simple but I think it's a bland and boring architecture compared to the rest.

Surely this is a strong positive from the point of view of engineering? Sound engineering should emphasize simplicity, not complexity. There's nothing worse than an engineering project where the designers have decided to make it "interesting".
I think it's too simple of an architecture, so the complexity just ends up in the software instead. What ends up being a single instruction on other architectures (e.g. "bcf PORTB, 1") turns into several on MIPS. They even had to add extra registers for clearing, setting, and inverting bits to compensate. ::)
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #40 on: August 17, 2015, 01:36:25 pm »
well, from the point of view of the assembly-programming, the architecture with the best productivity/complexity, when you do assembly by your own hands instead of C compiling something, is Motorola 68000

Unfortunately from the point of view of ISA ... it makes you to cry a lot if you want to create a 68000-softcore in VHDL (too bloated and complex, 2000 orders more complex than R2K)

A computer science course is a trade off of different things, so we had M68K in our assembly laboratory, and MIPS R2K (with/without the pipeline) in our laboratory of architectures  (FPGA programming, digital design).

That is good for the theory, for the practice, embedded C programming, real world interfacing and controlling, e.g. PID, motor speed, SERVO, greenhouse … whatever, then PIC32 is the best choice.
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: aq
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #41 on: August 17, 2015, 03:49:23 pm »
Quote
Noone remebers the Z80, once akademias lover boy
Was it?   I went to school back in the z80 heyday (77-81), and while the "lab computers" were all  Z80 CP/M machines, the "Assembly language" class taught IBM360 and PDP11, the "Microprocessor" class taught 6800, and the senior EE class used Intel X86 development boards (too bad that hardly any of the EEs had learned to program, beyond their first year Fortran and Numerical Methods classes.)

Zilog still exists.  And some of those "not popular for hobbyists" Renesas chips are essentially Z80s with bells, whistles, and kludges attached...

In the US yes but here no, i think it depends on regions and countries and even from skool to skool, 1980-1984 it was all Z80 for us and few
8031 and 6800.  Our lab and devboard computers was all Z80, Sinclair Spectrums was very popular as home computers as well as 6502.

Yes its amazing Zilog is still around who could have tought that!
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #42 on: August 17, 2015, 04:18:12 pm »
what does he mean by "good peripherals" ?
That's all the hardware modules to the outside the chip has, like integrated serial port (UART), SPI, I2C, ADC, DAC etc.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #43 on: August 17, 2015, 04:44:34 pm »
what does he mean by "good peripherals" ?
That's all the hardware modules to the outside the chip has, like integrated serial port (UART), SPI, I2C, ADC, DAC [/b]etc.

No DACs on any PIC32s I'm afraid, but yes, in general they are pretty choc full of peripherals, for such a low pin count 32 bit device in DIP. Whether you'd want to attempt to directly bare metal program things like the USB peripheral yourself is another matter though.
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #44 on: August 17, 2015, 05:17:49 pm »
Yes its amazing Zilog is still around who could have tought that!
Sorta, kinda. They've gone bankrupt, and been bought and sold several times. I wonder how much of the "old" Zilog still remains within the company.

Offline ez24Topic starter

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #45 on: August 17, 2015, 06:43:05 pm »
what does he mean by "good peripherals" ?
That's all the hardware modules to the outside the chip has, like integrated serial port (UART), SPI, I2C, ADC, DAC etc.

Thanks
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline JoeO

  • Frequent Contributor
  • **
  • Posts: 527
  • Country: us
  • I admit to being deplorable
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #46 on: August 17, 2015, 08:32:38 pm »
$
The day Al Gore was born there were 7,000 polar bears on Earth.
Today, only 26,000 remain.
 

Offline Quarlo Klobrigney

  • Frequent Contributor
  • **
  • Posts: 967
  • Country: pt
  • This Space For Rent
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #47 on: August 20, 2015, 10:55:07 pm »
In my day the 90S1200 was good enuf and we liked it like that. Who needs a stack. I don't need no newfangled extra bits. 8 was and still is good enuf.

And by the way the last post is correct, for the $$$$
Atmel has 32 bit stuff in TQFP that could be mounted on a Chinese adaptor or ordered that way.

Voltage does not flow, nor does voltage go.
 

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #48 on: August 24, 2015, 05:49:49 am »
> used AVR micros, and for 2015 he switched to PIC32
> I assume all were in DIP packages to be used in breadboards.
> Any theories why he would switch in an academic environment?


My guess:

1) The PIC32 is half the price of the Atmel chip.
2) Cut on students 'recycling' labs code from previous years.

Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #49 on: August 24, 2015, 08:44:47 am »
PIC32 programming and debugging can be made with PICKit2 so (for example under Eclipse) you get essentially all the toolchain for free, no code size limits etc. PICKit2 is one of the cheapest dev tools on the market (that is PIC18F2550 + 4 bjts + crystal) and can not only program and debug PIC8 but also ISP program AVR8 chips. Although not explicitly stated - supplying a school laboratory with PICKit2 + a bunch of PIC8 and PIC32 would cost a fraction of comparable functionality AVR8 set.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #50 on: August 24, 2015, 01:08:18 pm »
PIC32 programming and debugging can be made with PICKit2 so (for example under Eclipse) you get essentially all the toolchain for free, no code size limits etc. PICKit2 is one of the cheapest dev tools on the market (that is PIC18F2550 + 4 bjts + crystal) and can not only program and debug PIC8 but also ISP program AVR8 chips. Although not explicitly stated - supplying a school laboratory with PICKit2 + a bunch of PIC8 and PIC32 would cost a fraction of comparable functionality AVR8 set.

Just to be clear.  The PICkit 2 can only program a small number of PIC32 microcontrollers.  The PIC32MX250F128B is NOT one of them.  See the PICkit 2 device list.  You would be better off with the PICkit 3 for programming the newer microcontrollers.
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2221
  • Country: 00
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #51 on: August 24, 2015, 01:17:09 pm »
You would be better off with the PICkit 3 for programming the newer microcontrollers.

But the PICkit 3 is slooooow when programming pic32's. For real/professional work you have to use the ICD3 which is much faster but also much more expensive.
No problem for companies but could be a problem for students.

 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #52 on: August 24, 2015, 01:28:18 pm »
Just to be clear.  The PICkit 2 can only program a small number of PIC32 microcontrollers.  The PIC32MX250F128B is NOT one of them.  See the PICkit 2 device list.  You would be better off with the PICkit 3 for programming the newer microcontrollers.
This is only true if you use the MPLAB X IDE. With pic32prog you can flash devices with a PICkit 2 which you can't with MPLAB X, so it is not a hardware limitation, but they crippled their software intentionally to sell their PICkit 3.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #53 on: August 24, 2015, 01:45:42 pm »
they crippled their software intentionally to sell their PICkit 3.
Stopping adding new part support is not the same as "crippling".

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #54 on: August 24, 2015, 03:13:56 pm »
Just to be clear.  The PICkit 2 can only program a small number of PIC32 microcontrollers.  The PIC32MX250F128B is NOT one of them.  See the PICkit 2 device list.
That is inconceivable! Also AVRs weren't mentioned on their list   :palm:

Now, being serious, here is a recent ejtagproxy Readme.

Quote
Stopping adding new part support is not the same as "crippling".
+1. Although it would be nice of them if they provided some API for adding new devices to their programming GUI.. Consider Microchip "no" policy when buying their tools.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12865
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #55 on: August 24, 2015, 03:42:20 pm »
Microchip's final official release of the device file (1.62.14) for the PICkit 2 standalone application supported 17 PIC32MX devices,  but PICkit 2 support for the same devices under MPLAB was never added although at the time they were already supported with a PICkit 3 or an ICD2 or 3.   Similarly, MPLAB X beta supported the ICD 2, but that was totally dropped from the final release.

Its one thing to freeze support for legacy hardware tools, but quite another to actively remove support for them.   If you have all the software components available to support a part but choose not to, the difference between 'stopping adding new part support' and 'crippling' is so fine that to most of us its imperceptible.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #56 on: August 24, 2015, 04:01:02 pm »
I am talking about the Standalone PICkit 2 GUI (PICkit2V2.exe) provided by Microchip.  Not MPLAB X IDE. 
It uses a binary device file to control the programming. 
New devices have been added by users using the PK2Device Editor written by dougy83@gmail.com  The latest user device file I have is version 1.63.148 with a minor change found in a forum that I added.

As stated, the MPLAB X IDE uses a different mechanism for the PICkit 2 and newer devices can't be added.

I was unaware of the pic32prog program.


Here's the list of supported PIC32s:
    PIC32MX320F032H
    PIC32MX320F064H
    PIC32MX320F128H    PIC32MX320F128L
    PIC32MX340F128H    PIC32MX340F128L
    PIC32MX340F256H
    PIC32MX340F512H
    PIC32MX360F256L
    PIC32MX360F512L
    PIC32MX420F032H
    PIC32MX440F128H    PIC32MX440F128L
    PIC32MX440F256H
    PIC32MX440F512H
    PIC32MX460F256L
    PIC32MX460F512L
« Last Edit: August 24, 2015, 04:14:04 pm by MarkF »
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: aq
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #57 on: August 24, 2015, 04:54:02 pm »
MCHP could go the ST Discovery/Nucleo route and start doing loads of cheap Microsticks all then way instead of this Pickit 2/3 nonsense if they wanted to! :rant:
« Last Edit: August 24, 2015, 04:57:57 pm by MT »
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #58 on: August 24, 2015, 05:08:52 pm »
If you have all the software components available to support a part but choose not to, the difference between 'stopping adding new part support' and 'crippling' is so fine that to most of us its imperceptible.
The easiest way for the vendor to validate the "no" policy is to (Atmel's version)
"Because of hardware limitations of this tool ... 200$ upgraded new version, thank you"
.
Or alternative Microchip version (paraphrasing MarkF):
Quote
MPLAB X IDE uses a different mechanism for the PICKit3 and newer devices can't be added. Fear not, PICKit4 only $55.99 today!
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #59 on: August 24, 2015, 05:26:06 pm »
With pic32prog you can flash devices with a PICkit 2
A great little program, simple to use and it 'just works'. A few days ago I got my first PIC32 chip (an MX150F128B). With pic32prog I had it running on a breadboard in under 10 minutes (hardest part was the wiring!). To save typing I added the line "pic32prog ${ImagePath}" to end of build in the project properties in MPLABX - now I have '1-Click' compile and program in 15 seconds.   

Quote
they crippled their software intentionally to sell their PICkit 3.
Not so much 'crippled' as just dropped support. Microchip supplies full source code for the PICkit2, so it can be updated forever if anybody can be bothered. That has been done for the PIC32MX250F128B.
 
 

Offline ez24Topic starter

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #60 on: August 24, 2015, 06:00:32 pm »
Quote
I am talking about the Standalone PICkit 2 GUI (PICkit2V2.exe) provided by Microchip.  Not MPLAB X IDE. 

The class uses a Microstick II with the DIP chip.   I do not know the difference between it and the PICkit.  I think I will make a list of all the "kits" and software Microchip sells and ask someone to explain it all.

I bought a Microstick II because I thought the course was going to be posted on YT (now I am sure it will not be).  Since I know NOTHING about this, I hope to get a LED to flash in a year.

Before I even take it out of the box, I have run into problems and will post a new topic on it.
The Microstick II uses MPLAB C IDE  see this info sheet

http://ww1.microchip.com/downloads/en/DeviceDoc/51951B.pdf
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 482
  • Country: us
    • Kråketær
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #61 on: August 24, 2015, 07:53:07 pm »
the microstick ii has programmer built in. I think all pins exposed to headers except the oscillator and maybe the power pins. (been a while since I poked the microstick ii, its a nice simple little dev board for the pic32)
-- Aussie living in the USA --
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #62 on: August 24, 2015, 08:24:19 pm »
Yes its amazing Zilog is still around who could have tought that!

They are not attractive enough to get acquired :)
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #63 on: August 24, 2015, 08:35:27 pm »
Quote
I am talking about the Standalone PICkit 2 GUI (PICkit2V2.exe) provided by Microchip.  Not MPLAB X IDE. 

The class uses a Microstick II with the DIP chip.   I do not know the difference between it and the PICkit.  I think I will make a list of all the "kits" and software Microchip sells and ask someone to explain it all.

I bought a Microstick II because I thought the course was going to be posted on YT (now I am sure it will not be).  Since I know NOTHING about this, I hope to get a LED to flash in a year.

Before I even take it out of the box, I have run into problems and will post a new topic on it.
The Microstick II uses MPLAB C IDE  see this info sheet

http://ww1.microchip.com/downloads/en/DeviceDoc/51951B.pdf

The PICkit 2 and 3 are just debuggers, the Microstick II (and all Microsticks) include a debugger on board together with the target device which is socketed.

Let us know the problems you're having, we might be able to help. I'm not affiliated to Microchip in any way, but I do use their products pretty extensively.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #64 on: August 26, 2015, 07:39:54 am »
Quote
[Zilog is]not attractive enough to get acquired
I mentioned that the Z80 architecture also lives on in some of the Renesas chips (probably via NEC who used to be a Z80 second source.)
I haven't actually used one of these, but I read through enough of the documentation to have a distinctively bad feeling about how desirable it might be to extend a fundamentally 8-bit architecture to 32bit ALUs with large amounts of memory, code space.  Renesas is perhaps the most successful company to try this, although you can see plenty of this in other 8bit architectures that have been stretched beyond the point where someone should have stopped.  PIC (8bit), MSP430, and AVR all start to get pretty annoying when you start looking at the "extended memory" models.   You can attach a bank-switching scheme to just about anything, but that doesn't mean you shouldn't start looking at true 32bit cpus instead...
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #65 on: August 26, 2015, 07:55:04 am »
Quote
[Zilog is]not attractive enough to get acquired
I mentioned that the Z80 architecture also lives on in some of the Renesas chips (probably via NEC who used to be a Z80 second source.)
I haven't actually used one of these, but I read through enough of the documentation to have a distinctively bad feeling about how desirable it might be to extend a fundamentally 8-bit architecture to 32bit ALUs with large amounts of memory, code space.  Renesas is perhaps the most successful company to try this, although you can see plenty of this in other 8bit architectures that have been stretched beyond the point where someone should have stopped.  PIC (8bit), MSP430, and AVR all start to get pretty annoying when you start looking at the "extended memory" models.   You can attach a bank-switching scheme to just about anything, but that doesn't mean you shouldn't start looking at true 32bit cpus instead...

While that's true, when programming C on the PIC16 using XC8, the bank switching is hidden from the programmer. That's good and bad, good that the programmer doesn't usually have to worry about it, but bad in that the programmer is pulled away from the implementation details and cares less and less about performance. We've seen that on desktop and server software over the past couple of decades as distributed non-deterministic systems have become the norm, relying on stochastic performance measurement after the event, not at the point of design and implementation, because to model it is simply too complex or the individual unit performance metrics simply don't exist. Embedded systems very often can't work that way, guaranteed performance usually isn't an optional feature.

One reason why the PIC16 is still hugely popular include the vast and continually expanding range of peripherals often taking work away from the core, and thus reducing power consumption. In some implementations, the core can sleep while the peripherals take care of the work (SMPS for example), only to wake for initialisation and mode changes or exception handling.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #66 on: August 26, 2015, 08:54:32 am »
Quote
when programming C on the PIC16 using XC8, the bank switching is hidden from the programmer.
Really?  What's the maximum size of an array or other contiguous RAM data structure?  Doesn't the presence of SFRs in each data bank really mess that up? (One of the things that was greatly improved in PIC18, IIRC?)  (Although, I'm talking more about the issues that happen when systems break a 64k limit, rather than the relatively minor issues associated with the PIC's 2k code pages.  IIRC, PICs don't go there, and have some pretty strong limits on total RAM size as well.  (Yea for Microchip having a better grasp of the limits of their architecture than some other vendors!)
And in any case, it places an extra burden on the compiler (the real reason for RISC: "let's make things easier for compiler writers!"), so avr-gcc and msp-gcc both get relatively obnoxious trying to deal with "extended memory" versions of their respective chips, and have other restrictions (or "bugs.")
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #67 on: August 26, 2015, 11:37:12 am »
I think our sentiments are in general agreement. XC8 for example deals with large data structures using the FSR(s) rather than bank switching, so an additional level of complexity is introduced by the compiler to hide the mess underneath. And yes, I agree, sometimes the compiler refuses to generate code. I would say though that if you are using large data structures other than simple arrays on PIC16 it's probably not the right device for you anyway, as you say the RAM on PIC16s is pretty small in general. Apart from specifically generating a case to force this on PIC16, I can't remember recently encountering this as a problem in a real project.

I remember dealing with some of the early PIC16 and PIC18 compilers 10 or 12 years ago where you had to deal with the bank switching and memory allocation completely manually yourself, which was pretty time consuming, and as your project grew you found yourself having to juggle data structures around several times to make objects fit into the various RAM banks, it wasn't pretty.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12865
Re: Why do you think this professor went from AVR to PIC in his class?
« Reply #68 on: August 26, 2015, 01:38:56 pm »
XC8's effective array/object size limit on the 'classic' midrange (PIC16Fxx/xxx) core is the lesser of available RAM in one bank or 80 bytes, as more than that cant be fitted in one bank without stomping on the 16 byte shared (unbanked) area. The enhanced midrange (PIC16F1xxx) core also maps all its banked RAM contiguously higher up the memory map so this restriction is removed
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf