Skip to main content Skip to local navigation

Sabbatical Report: Updating Microcontrollers

As part of my sabbatical activities I took on the "Temps Pratiques" microcontroller laboratory sessions for electrical engineering and mechatronics students at INSA Strasbourg.  In pre-sabbatical discussions with faculty and staff at INSA Strasbourg I found out that the students were learning using what I considered to be outdated technologies.  The PIC16F84A microcontroller chip used by INSA is widely considered a classic but was introduced in 1998 and virtually no one in industry would consider it suitable for new designs.

The PIC16F84 is a simple chip by 2019 standards, as its dictionary of instructions is small.  However, its memory model is widely panned as too complex and unlike modern chips, standard programming tools like the red PICkit (pictured below) cannot be used properly to understand its inner workings.

The INSA school instructors were still requiring students to program these chips using custom boards (green, upper left in figure below and yellow, right).  The use of non-commercial boards prevented students from using the boards outside of  lab time.  Furthermore, students were required to use Assembler, an important but complex language that is difficult even for experts to understand, let alone master.  In today's embedded system market (both academic and industrial) most engineers favour using C instead of Assembler as it is more intuitive, more maintainable, and easier in team situations.  Most importantly, unlike the situation in the 1990s when the PIC16 was introduced, today's C compilers and IDEs are free, multi-platform, have powerful debugger subsystems and dynamic code syntax analyzers.  The C compiler tools also generate more efficient Assembler code for the chip than most human engineers can in Assembler.  Analyzing and debugging in Assembler is still important.  Programming in Assembler is not.

PIC16 boards used at INSA Strasbourg

The PIC16 boards used at INSA Strasbourg. Versions 1 and 2 were in use prior to James' sabbatical year. Version 3 was introduced during the sabbatical.

My initial suggestion of updating the PIC16 hardware and course material to newer 32-bit processors like the PIC32 or the ARM Cortex was met with a lot of resistance.  There were two main reasons for this, I believe.  First, the PIC16 material was well known to faculty and worked well.  Second, the PIC16 permits all major introductory microcontroller topics to be covered.  That said, the F84A variant and the boards used by INSA were still worth updating for two other reasons: the F84A doesn't permit breakpoint-based debugging and the boards used in class are cost-prohibitive.  Microchip recently released a newer PIC16 series, the PIC16F1, and application-expandible boards with integrated debuggers that cost less ($20) than just the stand-alone PICKit 3 debugger tools INSA was currently using ($50).

Daring to be different

Sometimes you have to put yourself out there to see what will happen. I wasn't sure how this would turn out. I'm glad I challenged myself to work at INSA!

After I arrived in Strasbourg I was given the green light to adapt the existing material to the commercial off-the-shelf hardware.  The implicit understanding was that if the adaptation wasn't satisfactory we would fall back to the older hardware and methodology. After demonstrating how INSA's older lab material could be made to work in the C programming language on their existing in-house boards, as well as on the contemporary commercial off-the-shelf board the decision was made by INSA faculty to officially update their material and teaching resources for the Fall 2018 semester.

The student versions of the lab activities I created are found here.  While the theory classes that preceded the lab classes were in French, the written lab content was in English.  In-lab discussions were in a mixture of English and French, depending on the desire of individual students.  The decision to produce English documents as opposed to French documents was at the request of the faculty at INSA as they require their students to master foreign languages such as English or German as part of their training.

 

Was the transition a success?  I believe so. The change was overdue and there were no significant disadvantages to doing so. Unlike when I managed to convince the EECE department at Ryerson to update their HC11 microcontrollers to the 9s12 in 2007/8, I heard no significant grumbling at INSA.  In fact, once the INSA faculty realized that I was serious about and capable of helping them with the transition, it seemed like the effort was genuinely welcomed.  They just needed a little external help.

 


James Andrew Smith is an associate professor in Electrical Engineering and Computer Science Department in York University's Lassonde School.  He lived in Strasbourg, France and taught at the INSA Strasbourg and Hochschule Karlsruhe while on sabbatical in 2018-19 with his wife and kids.  This blog post is part of a series discussing the family's sabbatical year, from both personal and professional perspectives.  You can view my Twitter postings from about Strasbourg (INSA) and HsKa (Karlsruhe).