Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

A Student Constructed Microprocessor Development Board for Teaching

Microcontrollers
Paul E Morton
Electrical and Computer Engineering Department
University of Texas at San Antonio
paul.morton@utsa.edu

Abstract
Students benefit from the hands on use of hardware in a microprocessor course to learn
embedded design principles and to improve their understanding of microprocessors.[1,2,3] Many
options exist for instructors to choose from for hardware to use in an associated laboratory.
However, a purchased development board has the potential to remove the student one more layer
of abstraction from the learning process because of complexity and lack of familiarity with the
hardware. It appears that students studying microprocessors in a first course may see them as
mystical devices, but that having built a lab board from scratch will partially de-mystify the
microprocessor and make learning how to use it easier. Presented is the design of a student
constructed development board, developed at the University of Texas at San Antonio (UTSA)
and used for two semesters for introductory courses in microcomputers for Electrical and
Computer Engineering students. Through-hole construction allows for novice soldering
technique to produce a robust board. Presented are the board schematics, board layout design,
and construction tutorial used in the course. Student feedback in the form of student satisfaction
surveys and comments indicate students strongly felt constructing their board was a good
learning experience and helped boost their confidence in learning how to program the
microprocessor. Example laboratories and lessons learned are discussed. Included are parts
lists and costs while construction tutorial, laboratories and slides are available on line.

Introduction
Teaching microcomputer courses to electrical engineers encompasses a number of inherent
challenges. In the authors view, the biggest of these challenges is that todays students have, by
their use of many high level computing devices, become indifferent to the many layers of
abstraction required for a microprocessor to function and are removed from understanding the
important fundamental knowledge at the actual machine level. Despite having had various
prerequisites that typically include at least an introductory course in programming as well as a
course in logic design, there is still an intellectual void that is manifested by a lack of curiosity
about the deeper layers of abstraction. It is for this reason that it takes a quantum jump in
understanding for most students to realize that actual simple logic gates operating on ones and
zeros can produce the magic like results at the higher levels of abstraction. In an attempt to
bridge this gap the microprocessor course at UTSA has had students assemble their own
microprocessor board from components by hand.

Proceedings of the 2015 ASEE Gulf-Southwest Annual Conference


Organized by The University of Texas at San Antonio
Copyright 2015, American Society for Engineering Education
This was first started in the fall of 2012 using a naked square of perforated board and gluing on a
dip socket, light emitting diode (LED), voltage regulator, filtering capacitors, a 6 pin header for
programming and a current limiting resistor for the LED. The circuit was then wired up with
point to point wire soldered in place. Unfortunately after 3 semesters of trying, most boards so
produced were only minimally usable, due to difficulty with reliably soldering the board (Fig. 1).
Over the past summer, with the help of a talented student, a printed circuit board was developed
and produced in a quantity of 200 boards (Fig. 2). This paper describes the results from student
surveys concerning the use of the microcontroller board, as well as to describe the board and the
laboratories that we have used it with.

Fig. 1 Previous Perf Board Project Fig. 2 Bare Printed Circuit Board

Fig. 3 Schematic of PIC Board

Proceedings of the 2015 ASEE Gulf-Southwest Annual Conference


Organized by The University of Texas at San Antonio
Copyright 2015, American Society for Engineering Education
Microcontroller Circuit Board
The circuit is based on the PIC16F1829 mid-level microcontroller from Microchip. This chip is
an 18Pin DIP package and is able to supply its own internal clock and can operate over a wide
range of supply voltage, 1.8-5.5 Volts, and has a good number of built in peripheral functions
that can be used for labs in the course. The programming is done by using a 6 pin header
connected to a PIKKit3 programmer / debugger for in circuit serial programming (ICSP) and
with the same header, one wire debugging features are available in the free MPLABX integrated
development environment (IDE). The schematic (Fig. 3) shows how simple the supporting
circuit is and the addition of several headers makes hook ups in lab easy with DuPont wires. The
board also includes an onboard LED connected via a current limiting resistor to pin 2 (port RA5)
and a touch pad that can be used for capacitive touch sensing located under the logo and

Fig. 4 Touch Pad Detail Figure 5 Completed Board

connected to pin 3 (port RA4) (Fig. 4). The board can be assembled in about 1 hour of soldering
and there is a tutorial on the web that students can use to help make sure all components are
placed correctly. Included on the board are headers connected to the best pin choices for a
number of different interface options including: Universal Asynchronous Receive Transmit
(UART), Inter-Integrated Circuit serial interface (I2C), Serial Peripheral Interface (SPI), a header
for 3 channels of Pulse Wave Modulation (PWM), and a header for 2 channels of analog-to-
digital (A2D) conversion. All of these peripheral modules can be used at the same time without
interference. The only exception is the PWM channel 1, which is shared by the receive (RX)
input of the UART. Since all the components are mounted in a through hole manner, the
soldering is easy for beginners. The best part is that the finished board rarely has problems and
is very durable and robust so that it can be used successfully for a long time. For the few
assembly mistakes, these are easy to debug and fix in lab (Fig. 5). The previous point to point
boards were riddled with problems and the wires were susceptible to shorting out or breaking
with use (Fig. 6).

Proceedings of the 2015 ASEE Gulf-Southwest Annual Conference


Organized by The University of Texas at San Antonio
Copyright 2015, American Society for Engineering Education
This severely restricted the value of the old boards as teaching tools in lab, but this has not been
a problem with the new boards.

Figure 6 Poor Result with Student Point to Point Soldering

Labs
Seven labs were conducted using the PIC student boards. The first lab involved just learning
how to write a simple assembly language program and how to use the IDE to load the code on
the chip and how to look at registers in the programmers model to see how instructions change
stored values. The lab also involved hooking up the PICKit3 programmer / debugger and setting
up a general purpose port to blink the LED. Learning objectives for this lab included: 1.
Learning how an instruction works by changing registers in the programmers model and values
in memory. 2. How to create an assembly program in the IDE that configures a pin to drive the
LED on and off. 3. Understanding the need for a delay function. For this lab the delay was
implemented by a counting loop in software. The second lab also used assembly language and
modified the first lab by using a built in timer module for the delay function. This involved
configuring the timer and waiting on the timer flag for the delay interval. The learning
objectives for this lab are: 1. For students to understand how timer modules can be used for
timing events. 2. How to configure the module to give an adequate delay for the blink program
to work. The third lab uses the C++ computer language to program the microprocessor. The
goal was to redo the first lab using a higher level language. The learning objectives for this lab
are: 1. Understand that a higher level language can be used to make programming
microprocessors easier. 2. Understand how C++ can be used in the same IDE as assembly
language. 3. Understand that the higher level C++ code is compiled into assembly language that
is then assembled into machine language and loaded onto the chip. Table 1 lists the details and
learning objectives for all seven of the PIC labs used in the course.

Proceedings of the 2015 ASEE Gulf-Southwest Annual Conference


Organized by The University of Texas at San Antonio
Copyright 2015, American Society for Engineering Education
Table 1 Lab Descriptions

Lab Circuit Learning Objectives Language


#
1 Blink LED 1. Instructions changing Programmers Model Assembly
Delay: Software registers
Loop 2. How to create Assembly Program in the IDE
3. Need for delay function
2 Blink LED 1. How to configure Timer Module Assembly
Delay Timer 2. How Timer Module is used in a program
Module
3 Blink LED in 1. How to use C++ with the IDE C++
C++ 2. How C++ code is turned into Assembly code
and then into machine code and loaded
4 Fade LED with 1. Principles of PWM Assembly
PWM 2. How to configure PWM Module
5 Fade LED with 1. How to configure PWM in C++ C++
PWM in C++ 2. Advantages of C++ verses Assembly
Language
6 Touch Sensing 1. How Capacitive Touch Sensing Works C++
2. How to use Break-point debug features
3. How to configure Touch Module and set a
Touch Threshold
7 UART to Desk 1. How to configure and use the UART C++
Top Computer 2. How the RS232 serial protocol works

Results
A survey was administered to students at the end of course to assess features of the course as
well as the students view of the PIC boards. Fifty nine boards were completed out of 60 with
one student who did not build his board. Three boards required corrections after construction
involving cold solder joints and one plated through hole problem. There were 4 boards where
the LED was put in backwards. Thirty two students completed the survey anonymously about
the PIC board. There were ten questions with a response scale 5 to 1 corresponding to:
5=strongly agree, 4=agree, 3=no opinion, 2=disagree, and 1=strongly disagree. The questions
are listed in Table 2 in order with the average score for each.

Proceedings of the 2015 ASEE Gulf-Southwest Annual Conference


Organized by The University of Texas at San Antonio
Copyright 2015, American Society for Engineering Education
Table 2 Student Survey Questions

Question
Question Statement Score
#
1 Building the PIC Development Board was a valuable learning experience 4.7
2 I am more confident learning to program the PIC Board because I built it 3.6
3 I felt I could have used the time for more important things 2.4
4 I would be more confident using a commercially built board 2.7
5 I was experienced at soldering before I built the PIC Development board 2.3
6 I would recommend that next semesters class also have to build the board 4.1
7 I felt the cost was reasonable for the boar 4.4
8 I feel building the board increased my understanding of microprocessors 4.0
9 I think the board was about the right level of complexity 3.8
10 I was able to successfully complete my board in reasonable time 3.8

The score on question 1, Building the PIC Development Board was a valuable learning
experience, was extremely high. All students either agreed or strongly agreed with only one
student having no opinion and no dissenters on the value of the learning experience. The score
on the effect of programming confidence (question 2) was 3.6/5. This may have been tempered
by the fact that most students in general feel programming is the hardest part of learning
microprocessors. The questions 3 through 5 were asked in the negative and did show low scores.
The course did include a commercial board for the last 2 labs so students could make a
comparison between both options. The commercial board used was a Freescale Freedom Board
with a KL25Z chip. Most students felt that the board project should be continued next semester
(question 6) and that the $7 cost (question 7) was reasonable. Questions 8 and 9 suggest that the
PIC board increased understanding and was about the right level of complexity. Likewise,
question 10 indicates that the students felt that the time used to build the board was reasonable
also scoring 3.8, the same as the complexity question suggesting agreement about both time and
complexity. Overall the student response was very positive on using the student constructed PIC
board.

Discussion
The very high score on constructing the PIC board as a valuable learning experience is notable.
The fairly strong agreement on questions 2 and 8 in Table 1 I am more confident learning to
program the PIC Board because I built it ; and I feel building the board increased my
understanding of microprocessors , does lend support to the authors hypothesis. The
disagreement on question 4, I would be more confident using a commercially built board , also
supports the hypothesis that the hands-on experience of building the board helps remove some of
the mystique and gives the student more confidence in working with the board. This may be
because this familiarity with the hardware partly helps them connect with lower levels of

Proceedings of the 2015 ASEE Gulf-Southwest Annual Conference


Organized by The University of Texas at San Antonio
Copyright 2015, American Society for Engineering Education
abstraction and gives more confidence in programming the board. The survey does not really
explain why students felt this way, but universally students enjoy hands-on experiences and
building something on their own [1]. The survey also shows that many had minimal or no
soldering experience before the board project. They also recommended it for next semester and
thought that the cost and time required were reasonable.

Conclusions
Many students stated how much they enjoyed constructing the board and how it did give them a
sense of ownership and connectedness to the microprocessor and to more confidence using the
board in labs. The survey gives strong support to the thesis that building the board, makes
students more comfortable with microprocessors. It does not prove this thesis, because this was
not a random, blinded and controlled trial. Because of difficulties in doing a real level I trial in a
class setting (unfairness of different experiences, blinding problems, free choice and grades), this
is still a useful data point supporting the benefit of a hands on project. The project will be
continued next semester and an additional survey will be done to see if the students continue to
feel the same. The realization that programming is still one of the biggest challenges to the
students requires additional attention. One consistent suggestion from students in written
comments was, to spend more in class time going over the details of each program assignment
line by line. This will be implemented next semester.

Acknowledgement
Special thanks to my student Noland Mantuefel who laid out the board, wrote the list of
materials and made numerous suggestions for improvements.

References
1. Medaris, K Study: Hands-on projects may be best way to teach engineering and technology concepts,
International Journal of Engineering Education, Jan, 2009.

2. Bonwell, C. and Eison, J. (1991) Active Learning: Creating Excitement in the Classroom. Washington, D.C.:
Jossey-Bass.

3. Haury, David L., and Peter Rillero. "Perspectives on Hands-on Science Teaching." Pathways to School
Improvement. The ERIC Clearinghous e for Science, Mathematics, and Environmental Education, 1994. Web. 24
Jan 2012. <http://www.ncrel.org/sdrs/areas/issues/content/cntareas/science/eric/eric-toc.htm>.

Proceedings of the 2015 ASEE Gulf-Southwest Annual Conference


Organized by The University of Texas at San Antonio
Copyright 2015, American Society for Engineering Education

You might also like