Microcontrollers/Microprocessors in University level

Thread Starter

Zerox257

Joined Jul 28, 2023
4
Dear Seniors,

I hope you will be in good health.I want to get sincere advice regarding the use of microcontrollers in educational institutes.

I am an Engineer at a University in India.We have been using PIC microcontrollers (PIC16 and PIC18) for the Embedded Systems Lab for many years.The labs we cover in the embedded course are interfacing keypads, 7-seg LCDs, CCP (including PWM), ADC, timers, stepper motors,UART and SPI protocols.I am very confused that should we leave PIC microcontrollers and should use advanced microcontrollers such as ESP32 or STM or anyelse for Electrical Engineering 3rd Semester students…? Or these lab modules on PIC microcontrollers are fine to use for students although they are very old.Any suggestions regarding updating my lab modules and microcontrollers will be highly appreciated.
 

Ya’akov

Joined Jan 27, 2019
10,226
Welcome to AAC.

The PIC MCUs certainly represent a portion of the embedded market. What you choose to teach needs to be aligned with the goals of the course, so for some courses, the PICs might be best.

But, while the topics you mentioned are good ones, the current MCU market is greatly expanded beyond the PIC and 7-segment displays, etc. We now have the incredible Arduino boom and the unprecedented success of the Arduino framework. We also have a huge number of sensors and actuators readily avaialble.

The IoT explosion has also made wireless technologies key to product development. Bluetooth, WiFi, Zigbee, Matter, LoRa, and a long list of other flavors offered by companies like Espressif, Nordic, Emit. Murata, and so many others now makes radio data communications very important in the general field of embedded processing.

So, my advice is not to worry first about which MCUs to use, rather consider how you might update the course description in light of Arudino, IoT, ultra-low power, wearables, and things of that sort. What is it you want to teach? The PICs may still have their place, but the world is very different from when that course was developed.
 

BobTPH

Joined Jun 5, 2013
11,463
PICs are fine for what they are teaching. They are not obsolete, they still come out with newer and better ones.

They should also eventually teach things like bluetooth an WIFI connectivity, in which case the ESP32 would be the obvious choice.
 

nsaspook

Joined Aug 27, 2009
16,251
For teaching 8-bit controllers are IMO the best way to teach fundamentals of low level interfacing because they are simple. The 32-bit machines are usually programmed at a much higher level of abstraction. I would try to blend in the advanced concepts after they have a good foundation of low level concepts because at the professional embedded level you need to understand what the scopes and digital logic are showing on the screen at the low level hardware domain.
 

WBahn

Joined Mar 31, 2012
32,703
As @Ya'akov said, the most important thing is that the tools used are an adequate match to the objectives of the course -- and the objectives of the course need to be aligned with the objectives of the degree program overall.

One problem that most programs have today is the extreme breadth and depth of what is out there. We can list all of the things that we would LIKE students to be grounded in when they graduate, but to do them all justice, we would need a ten-year degree program. So we HAVE to limit the coverage by identifying the things that we believe they NEED when they graduate at the end of a four-year program. Things have to give.

Striking that balance is not easy -- and I doubt any program can legitimately claim to have done it perfectly. If, by chance, they have the perfect program today, it will not be perfect five years from now.

Personally, my take on the balance is that the focus needs to be on the fundamentals. Students that leave with deep fundamentals are in a much better position to go out and come up to speed on things that they have never heard of, compared to people that were exposed superficially to a broad range of things, including the very thing that they are expected to do at their first job.

If this one course is going to be their only exposure to MCUs, then I would say that the first part (and possibly the bulk of the course) should focus on very low level stuff and 8-bit PICs are just fine for that. But there is definitely value in having them exposed to what the modern MCU world has to offer. So having a few weeks devoted to MCUs that have all the IoT bells and whistles lets them get an appreciation for what is available and lessens the fear of the unknown surrounding them. This part of the course can be at a pretty superficial level, coming more from the perspective of "go forth and seek your own path". If your program has a tract that has multiple MCU courses, then things can be structured very differently.
 

Thread Starter

Zerox257

Joined Jul 28, 2023
4
Welcome to AAC.

The PIC MCUs certainly represent a portion of the embedded market. What you choose to teach needs to be aligned with the goals of the course, so for some courses, the PICs might be best.

But, while the topics you mentioned are good ones, the current MCU market is greatly expanded beyond the PIC and 7-segment displays, etc. We now have the incredible Arduino boom and the unprecedented success of the Arduino framework. We also have a huge number of sensors and actuators readily avaialble.

The IoT explosion has also made wireless technologies key to product development. Bluetooth, WiFi, Zigbee, Matter, LoRa, and a long list of other flavors offered by companies like Espressif, Nordic, Emit. Murata, and so many others now makes radio data communications very important in the general field of embedded processing.

So, my advice is not to worry first about which MCUs to use, rather consider how you might update the course description in light of Arudino, IoT, ultra-low power, wearables, and things of that sort. What is it you want to teach? The PICs may still have their place, but the world is very different from when that course was developed.
Thank you so much for your reply.We ae using PIC 16F877A and PIC18F452.IS thre any better PIC microcontroller that is modrenize with integrated bluetooth,wifi etc and they have proper software so that students dont hjave to complain of no IDE.
 

Thread Starter

Zerox257

Joined Jul 28, 2023
4
PICs are fine for what they are teaching. They are not obsolete, they still come out with newer and better ones.

They should also eventually teach things like bluetooth an WIFI connectivity, in which case the ESP32 would be the obvious choice.
thanks i will see it and how you rate STM32?
 

MrChips

Joined Oct 2, 2009
34,628
I have taught electronics at the university level for over 45 years, including minicomputer and microcomputer systems design and programming.
The MCUs I have selected for teaching over the years include Motorola MC68HC11, MC9S08, Atmel AVR, TI MSP430.
We taught both ASM and C programming. I would never choose Microchip PIC because of its bizarre architecture.

Today, my choice for an introductory level MCU course would be MSP430.

I use STM32 extensively for my personal and professional work. I would not want to teach or learn ASM coding on any ARM because of the complexity. All my programming on STM32 is done in C.
 

WBahn

Joined Mar 31, 2012
32,703
In addition to exposing students to what higher end MCUs have, there is also value in exposing them to what the low end can do. As an undergrad (1990 time frame) taking EE courses (as a physics major at a school that didn't have an EE major at the time, just and Engineering degree with an EE option), the only MCU course they had used the 68HC11. It was a very good course and I certainly learned a lot, but as that was my only exposure to MCUs, it created a mental picture of what an MCU was and, subconsciously, lead me to believe that all MCUs were going to be roughly comparable. I don't recall if there was any discussion of the breadth of cost/performance options available. There might have been, but if so, it was just a lecture note that quickly went in one ear and out the other.

On graduation day, I was asked by one of my professors if I was interested in designing a product for them based on a sensor they had developed. The next week I accompanied them to a meeting they had with an outfit that they were considering using to make the mechanical parts of the design and we were discussing various things and I happened to mention that I was going to use an HC11 and the guy goes, "What? That's WAY too much horsepower for something like this." I was a bit embarrassed, but took it to heart and I talked to some folks I had come to know and they steered me toward the PIC and I selected the PIC16C62 as the lowest cost device that would likely work (and it did). The fundamentals that the MCU course had instilled were solid enough that I had no problem picking up the PIC and teaching it how to multiply and divide 24-bit fixed-point numbers, for instance.

So how do you convey this breadth of cost/performance to students? Assuming that there isn't the time to have them do meaningful work across the spectrum of options as part of their coursework, and taking for granted that things mentioned in lecture are not going to be retained unless they are tested or otherwise reinforced, one possibility is to build up a display case with working projects using MCUs across the spectrum that are pushing their limits. For each project, have a placard that describes the MCU used, it's features, and its cost. These can be added to and/or replaced over time. Ideally, these should be student projects, but that's not critical. Some of these can then be demo'ed and highlighted on the first day of the MCU course, pointing out where in the spectrum the MCU (MCUs) that the course will be using lie.
 

BobTPH

Joined Jun 5, 2013
11,463
What? That's WAY too much horsepower for something like this.
I also have this attitude, though it is not rational. If the cost and power usage are competitive, I cannot make a case for not using a chip that has higher performance, but it still irks me to use a 32-bit processor where an 8-bit is perfectly adequate.

On the other hand I drive a car with a top speed of 160 MPH. Go figure.
 

nsaspook

Joined Aug 27, 2009
16,251
I also have this attitude, though it is not rational. If the cost and power usage are competitive, I cannot make a case for not using a chip that has higher performance, but it still irks me to use a 32-bit processor where an 8-bit is perfectly adequate.

On the other hand I drive a car with a top speed of 160 MPH. Go figure.
My main reason for using 8-bit controllers in non-controlled environments (heat, cold, static, RFI/EMI, the world at large) is reliability. I know the production process and the legacy processes used for a typical 8-bit controller allow for a much larger abuse factor (overvolt, transients, etc) than 32-bit controllers using modern processes. If you're crunching old school 5vdc 8-bit I/O, with a decent modern 8-bit controller, with vectored interrupts, DMA and advanced comm modules there's no reason to use a 3.3vdc 32-bit controller that might require a more complex PCB, with level converters and extra protection instead of having the choice of using a old school 40 pin DIP package you can plug in a ZIF socket, easily probe, accidentally short pins and abuse during development knowing it will just keep on ticking like an old Timex watch.

https://forum.allaboutcircuits.com/...rge-controller-datalogger.194146/post-1829107
1688007411479.png
Outback Mate network interface RJ45 9N1 serial with 24vdc isolators, CANBUS to another MATE board, MODBUS to the AC line power monitor (EM540), serial TTL to the USB for data logging and SPI to the LCD. Using XC8 C99 as the programming environment.

I don't have a problem designing with 32-bit controllers when the need for processing power, memory are valid requirements.
https://forum.allaboutcircuits.com/...tter-for-this-application.193257/post-1823342
1684814675114.png
I know this is the sort of things students want to start doing right away in a controller class but to understand the design process, from start to finish, from idea to hardware and software to a finished design requires, IMO, learning basic low-level principles of controllers that are so much easier to build a good foundation on at the 8-bit level instead of that 1000+ page 32-bit datasheet designed to meet the requirements of OS level applications.
 
Last edited:

WBahn

Joined Mar 31, 2012
32,703
I also have this attitude, though it is not rational. If the cost and power usage are competitive, I cannot make a case for not using a chip that has higher performance, but it still irks me to use a 32-bit processor where an 8-bit is perfectly adequate.

On the other hand I drive a car with a top speed of 160 MPH. Go figure.
When you are designing a prototype for what is hoped to be a high-volume product with a targeted shelf price (in 1991) of under $20, you don't use any more processing power than is absolutely needed. At the time, the 68HC11 was about 10x the price of the PIC I used.
 

Ya’akov

Joined Jan 27, 2019
10,226
I have taught electronics at the university level for over 45 years, including minicomputer and microcomputer systems design and programming.
The MCUs I have selected for teaching over the years include Motorola MC68HC11, MC9S08, Atmel AVR, TI MSP430.
We taught both ASM and C programming. I would never choose Microchip PIC because of its bizarre architecture.

Today, my choice for an introductory level MCU course would be MSP430.

I use STM32 extensively for my personal and professional work. I would not want to teach or learn ASM coding on any ARM because of the complexity. All my programming on STM32 is done in C.
I hadn't considered the deviant architecture of the PIC range. PICs are clearly widely used, but it's a bit like choosing Java as a a language for introductory programming.

There is no doubt that TI's embedded range is both suitably extensive and very widely used in industry. At the same time the knowledge is more easily transferable. TI has very good prices on eval boards and excellent support for academics.

The "LaunchPad" EVM (Eval Module) is a ~$13.00 board for learning the MSP430 range, and they've got MSP430Ware, which is a complete development suite, and MSP Academy which is an extensive online learning resource including example code for the board.

In addition, TI offers Booster Packs, modules and daughter cards for the eval boards (scroll down on the page). Something like the BOOSTXL-EDUMKII is a great way to have a fully rounded development environment for students, and with a great deal of the curriculum already written for you! As a big bonus, it was designed to work with Energia, which is an open source Wiring-based development environment for the MSP430.

For those unfamiliar, Wiring is the foundation the Arduino framework is based on, which in turn was built on Processing, a project out of MIT's Media Lab¹. Energia is effectively "Arduino for MSP430". While this might not be needed for more technical courses, "MCUs for Poets" might benefit quite a bit—not to mention primary and secondary education possibilities.

While I don't use the MSP430 chips, it almost makes me want to start. Somewhere I've got a couple of eval boards in the form USB dongles I bought from TI several years again when they were selling them for ~$3.00 each, which was an unheard of price for such a thing at the time. I wrote a few small programs for it, but didn't go further.

TI was also the first to offer a platform for watch development (the Cronos) which was extremely cool at the time though unfortunately is no longer made.

I've been thinking about it, and I believe that some well supported LoRa dev board, probably with WiFi, and possibly BLE, would be the other suggestion I would have. This is not a replacement for the MSP430, it's something to do some radio and IoT work with.

LoRa is a great protocol to learn about link budgets, protocols, mesh networks, and other embedded radio topics. The development boards provide an excellent opportunity to cover hardware topics like sensors and actuators, and a good platform for higher level software integration topics like MQTT, and web development for interfaces.

Overall, I do believe that students won't get nothing from a course using PICs, but considering the point made by @MrChips it is probably less helpful than the same material taught on a more normative platform like the MSP430.

While the topics I mention concerning the LoRa dev boards go well beyond programming MCUs, that's really the point. Today, thanks to pervasive network connectivity, an MCU is often part of an entire system that a nascent developer needs to understand to do good work, even if they will be focusing on the hardware aspect of it.

——
1. It's good to remember the debt that Arduino owes to these two pioneering projects. As truly incredible as the effect Arduino, in the form of the hardware and software they produced, has had on the proliferation of the F/OSS hardware world and the accessibility of the previously black art of embedded programming, the foundation that Processing and Wiring provided made it all possible.

I don't know how many remember these two projects, or what it was like at the dawn of the F/OSS embedded era, but things weren't easy and the brilliant insights and hard work of these two projects at the turn of the century (I love to say that) was pivotal.
 

MrChips

Joined Oct 2, 2009
34,628
While I don't use the MSP430 chips, it almost makes me want to start. Somewhere I've got a couple of eval boards in the form USB dongles I bought from TI several years again when they were selling them for ~$3.00 each, which was an unheard of price for such a thing at the time. I wrote a few small programs for it, but didn't go further.
When TI introduced the MSP430 LaunchPad, they were offered at a promotional price of $4.30.
The price today is $9.99 direct from TI.
The price at Digikey is US$11.99 for the MSP-EXP430G2ET.

Single chip MCU in thru-hole DIP packages, examples, current prices at Digikey.com (July 2023)
MSP430G2132IN14 1KB FLASH 14DIP US$2.18
MSP430G2553IN20 16KB FLASH 20DIP US$2.90

In comparison, the lowest priced STM32F0xx and STM32L0xx is:
STM32F030F4P6TR 32BIT 16KB FLASH 20TSSOP US$1.67
STM32L010F4P6 32BIT 16KB FLASH 20TSSOP US$1.73

Average price of a cup of coffee US$2.70
 

sarahMCML

Joined May 11, 2019
695
As it happens, I purchased a Wiring module when they first came out, and it's been sitting in a box, unused, ever since. I've used a number of Arduino Uno's for various experiments in the last couple of years (just yesterday actually, stepper driving). I wonder how compatible the Wiring module would be?
 

Ya’akov

Joined Jan 27, 2019
10,226
As it happens, I purchased a Wiring module when they first came out, and it's been sitting in a box, unused, ever since. I've used a number of Arduino Uno's for various experiments in the last couple of years (just yesterday actually, stepper driving). I wonder how compatible the Wiring module would be?
I don’t think it would be compatible at all, but who knows, maybe there is legacy support. On other hand, if it is unused, hold onto to it as a piece of history. It could be very valuable in the future! That board is probably nearly 15 years old already. you should try to collect the software and documentation to keep with it.

Is this the board?
 

WBahn

Joined Mar 31, 2012
32,703
When TI introduced the MSP430 LaunchPad, they were offered at a promotional price of $4.30.
The price today is $9.99 direct from TI.
The price at Digikey is US$11.99 for the MSP-EXP430G2ET.

Single chip MCU in thru-hole DIP packages, examples, current prices at Digikey.com (July 2023)
MSP430G2132IN14 1KB FLASH 14DIP US$2.18
MSP430G2553IN20 16KB FLASH 20DIP US$2.90

In comparison, the lowest priced STM32F0xx and STM32L0xx is:
STM32F030F4P6TR 32BIT 16KB FLASH 20TSSOP US$1.67
STM32L010F4P6 32BIT 16KB FLASH 20TSSOP US$1.73

Average price of a cup of coffee US$2.70
And for further comparison, the lowest prices, in single quantities from Digikey, for PIC and ATTINY are $0.46 with nearly two hundred options under $1. It looks like the Microchip options dominate the sub-$1 offerings, but there are representatives from a number of families from a number of manufacturers in that club.
 

sarahMCML

Joined May 11, 2019
695
I don’t think it would be compatible at all, but who knows, maybe there is legacy support. On other hand, if it is unused, hold onto to it as a piece of history. It could be very valuable in the future! That board is probably nearly 15 years old already. you should try to collect the software and documentation to keep with it.

Is this the board?
Mine is very similar, but at the far end from the USB port it doesn't have the double row of JTAG header holes, just 4 power and ground pins. Further to their left the ISP header is only dual 3 pins. The board is annotated "A/C-02 0407, near the USB port. It has an ATMEGA128 16AU, with a 16MHz Xtal, and is otherwise identical to the one shown in your article.
I may have the software on my old XP machine.
 

Ian Rogers

Joined Dec 12, 2012
1,136
Thank you so much for your reply.We ae using PIC 16F877A and PIC18F452.IS thre any better PIC microcontroller that is modrenize with integrated bluetooth,wifi etc and they have proper software so that students dont hjave to complain of no IDE.
Going back to the question.. The ESP32 is the go to for wireless.. The Arduino platform is free. I recently installed the Pico W on the Arduino platform. these are from £3.60 each. You can use C++ Python or basic and the software for all three is free.
 
Top