Embedded C Programming Using FRDM to Enhance Engineering Students’ Learning Skill

Embedded C Programming Using FRDM to Enhance Engineering Students’ Learning Skill

Volume 2, Issue 3, Page No 1461-1466, 2017

Author’s Name: Zulzilawati Jusoh1, a), Mohamad Taib Miskon1, Hasnorhafiza Husni1, Nur Hafizah Rabi’ah Husin2

View Affiliations

1Electrical Engineering Faculty, Universiti Teknologi MARA, 23000, Dungun, Terengganu, Malaysia

2Academy of Language Studies, Universiti Teknologi MARA, 23000, Dungun, Terengganu, Malaysia

a)Author to whom correspondence should be addressed. E-mail: zulzilawati@tganu.uitm.edu.my

Adv. Sci. Technol. Eng. Syst. J. 2(3), 1461-1466 (2017); a  DOI: 10.25046/aj0203182

Keywords: C programming, Training of microcontroller, FRDM, MBED compiler, Mass storage device, Flash programming interface

Share

384 Downloads

Export Citations

Computer programming course that utilizes languages such as C/C++ is always packed with dreary syntax details that consume most of the students’ learning time to obtain ‘grammatically’ correct source code. Consequently, it is difficult for most of the students to apply the theory they have learned in a real life context. Thus, this project proposed a hardware based learning approach for C programming curriculum and reports the effectiveness of using microcontroller board named FRDM-KL05Z to assist teaching and learning activities. The USB-powered microcontroller board is very easy to use and is programmable using C programming language. Students will have the opportunity to learn selection statement with real sensors, touse repetition statement to blink LEDs and utilizing function as well as structure to control actual input and output peripherals. In general we evaluated the students’ response in five criteria namely the students attributes, lecturer’s profile, implementation, facilities and students’ understanding. From the survey, the results in exit survey are higher compared to entrance survey for all criteria. This shows that the students are satisfied with the implementation of the module which has increased their understanding in learning C Programming.

Received: 21 May 2017, Accepted: 23 July 2017, Published Online: 10 August 2017

1. Introduction

Many educators realize the urgency of education reform to respond to the current needs and future trends of the society. The urge of re-engineering the curriculum is needed for new approaches in designing the curriculum and active learning methods for encouraging students to be more creative. Responding to these calls for education reform, this study was conducted as an extension of work originally presented in IEEE 8th International Conference on Engineering Education (ICEED2016) [1]. Project-based learning (PBL) and “learning by doing”approach have been recognized as one of the effective means for students to obtain the problem-solving capability [2-3].

Another method in learning approach for engineering students is embedded system education. Teaching embedded system design is a challenging undertaking because a teacher cannot assume that all students enrolled in a class have solid prerequisite knowledge across all these areas. To speed up the learning process and motivate students to learn actively, the project-based learning approach [4-7] is applied in this embedded system design laboratory.

Introduction to the C programming is one of the basic elements in Electrical engineering course. The subject currently is offered in semester 2 [8], and it contains 7 chapters. Each chapter introduces the student with basic command of C programming to execute specific task such as compiling, linking, control flow statement, function and array [9]. The students will be evaluated based on the laboratory task which is only a computer-based laboratory, test that covers theoretical part of the syllabus and mini project. The main objective of the mini project is to gauge the understanding of students in the overall C programming course.

Various methods in teaching and learning programming courses have been reported. As an example, several researchers have come with game-based digital learning for teaching C programming course [11-12]. Other method includes active learning by students, which may include in-class activities like peer learning, games and mnemonics [13-14]. A more advance approach as discussed in [15] described how LEGO Mindstorms robot was used as hands-on educational technology in teaching introductory programming courses. This proves that C programming is a complex subject and it requires creative way of delivering it to students.C programming is one of the most important subjects in Electrical Engineering course. However, the process of teaching and learning a programming subject is not an easy task as stated by many studies [10]. Students were reportedly having problem in grasping this subject due to the complex nature of this subject. The development of a program involves similar step like any problem-solving task. The processes include definition of the problem, planning of the solution, coding the program, testing the program and documenting the program. Thus, the ability to execute the whole flow of the process is very critical for a student in mastering the subject well.

More recently, Conceive – Design – Implement – Operate (CDIO) initiative are gaining significant popularity among educators around the world [16]. Authors in [17-20] reformed their teaching approach in delivering C/C++ curriculum based on CDIO approach.CDIO concept emphasis on the knowledge development by integrating engineering skills such as team cooperation, problem solving, communication andknowledge-application ability of students in real-life context. Results indicated that such initiative can effectively improve the students’ ability to comprehend basic knowledge in programming and their applicationin engineering system analysis.

Throughout this course, the main drawback that has been observed by the lecturer is that students having difficulty to implement the theoretical part of the subject into practical. This may be caused by lack of experimental design task exposure. Majority of the students do not have the skill to expand their learning of C programming after finishing this course. This situation can be seen in their final year project course (FYP) where most of the students will use microcontroller in their project and majority of them do not have the ability to apply the C programming knowledge to program the microcontroller to execute the desired task. Therefore, a module has been proposed to help the lecturer to resolve this situation. The module will be included in the students’ learning process throughout the semester and it does not change the main objective of the syllabus. This module will only be used as a tool to help the student to gain more knowledge and skill in C programming language.

In fact, the microcontrollers are commonly utilized in numerous industrial applications such as remote control devices, office machines, electrical gadgets, automobiles, motor control systems, robots and other industrial fields. For that reason, it is taught as an applied course at universities, especially in the departments such as engineering of electrical and electronics engineering. Freescale has designed the FRDM-KL05Z in collaboration with MBED for prototyping all sorts of devices, especially those requiring the size and price point offered by Cortex-M0+. It is packaged as a development board with connectors to break out to strip board and breadboard, and includes a built-in USB FLASH programmer.

The aim of this study is to measure the effectiveness of the proposed module which is C programming based on embedded system approach, and the students’ perception of this course is also evaluated so that there will be more effective changes that can be made to this course to enhance the student’s ability in the real application after their graduate.

2.       Methodology

In order to enhance the students’ understanding and interest in Introduction to C Programming (ECE126) subject, a one-day training module was conducted to expose them with the implementation of C-programming as shown in Figure 1.0. During the training, participants were given a set of training materials listed in Table 1.0 so as to boost students’ engagement throughout the session, harness their interest and motivate them to use the knowledge learnt in ECE126 curriculum in real-life context. A laptop was used to write a program code in C language. Next, the code was transferred to FRDM board and after that user will run the program from the board. The execution of the code was monitored using a smart phone application in real time via a Bluetooth connection.

Figure 1:  Examples of a real-life implementation of C-programming

Table I. List of training materials

Figure 2 depicts the overall programming process carried out during the training session. Participants were taught to write a program code using a web-based MBED compiler. The software can be used to write and edit a program code using high-level languages such as C and C++. Next, a linking process was carried out in which the written code was linked to FRDM-KL05Z controller board or any hardware platform supported by the compiler. After that, the code was compiled and a binary machine code was generated should there be no syntax error. Next, the compiled code was transferred to the board via mass storage device (MSD) flash programming interface. Subsequently, a communication link between the FRDM board and a smart phone was established via HC05 Bluetooth module so that students can observe their program simply through their own smart phones.

This approach is slightly different from the current practice where students were normally taught to create a console application that produced an executable file, which can only be used within the Windows environment [21].

Figure 2: The programming process

2.1 FRDM KL05Z controller board

The FRDM-KL05Z microcontroller board depicted in Figure 3 was used in this project. It is one of the ARM Mbed supported platform based on 32-bit ARM Cortex-M processor [21]. It is a powerful tool to build an embedded system from prototyping stage to mass production. One can also write their own software on top of the board’s operating system, Mbed OS, which offers an easy way of hardware control, interaction and integration with other tools. It offers convenient on-board sensors such as a touch sensor, an accelerometer and a Red-Yellow-Green (RGB) Light Emitting Diode (LED) that allow new users to practice and test their code without any need of additional hardware interface.

Figure 3: The FRDM-KL05Z development board [22]

2.2 Training Modules

There were seven topics related to ECE126 subject that have been covered during the training session. They include selection statement, repetition, functions, arrays, pointer and structure. These topics were delivered in seven different modules utilizing the on-board peripherals such as the LED, accelerometer and touch sensor. The modules used during the training were listed in Table II.

Table II. Training modules

In the first module, the participants were taught to observe the execution of their program via smartphones using a Bluetooth serial application known as “BT Term” developed by Futaba Inc. A printf() statement was used to output a “hello world!” sentence via the Bluetooth application as depicted in Figure 4.

Figure 4: Output from the BT Term application

          Besides, the second, third and fourth module manipulate the behavior of the on-board RGB LED using several sets of program codes. Students were taught to apply their knowledge on the selection statement to decide on the activation of the LED. Other than that, repetition statements such as while, do-while and for were also employed to create replications of the LED action. Participants were also assigned to blink the LED, in which they need to determine the suitable increment, decrement or assignment operators. Besides, they also learnt how to use break and continue statement to stop the repetition or to skip some iteration within the loop structure. In addition, functions were also been used in module 4 so that the participants can create several set of LED actions according to their preferences. Figure 5 illustrates the use of function to activate the red LED upon receiving value from the user. The program indicates that if a user specifies an input value is equal to 1, the red LED will be activated while red LED will be deactivated if other input value is given. The response of the LED is shown in Figure 6.

Figure 5: A function to control the red LED

Figure 6: LED OFF (left) and LED ON (right)

Besides, one of the most important topic in C programming such as arrays were also been given much attention during the training session. It has always been useful to store information about certain things under a single variable name. For example, in module 5, students were taught to use such concept to store measured data obtained from the accelerometer sensor every one second into an array variable. Next, they can manipulate the content of each array to do additional action such as activating the LED if certain condition is met. This allows students to think, try and explore more about the concept as well as drawing connections between what have been taught and real-world contexts.

Meanwhile, module 6 focuses on the workings of pointer variable, how to use them as well as the common mistakes faced by a programmer when dealing with it. In this exercise, pointer was used to access a memory location that contains user information. Participants were required to create a login interface that prompt user to input their login ID and password. The program will evaluate the input entered via the serial Bluetooth application before triggering the green LED if correct input is given and red LED if otherwise.

The final module attempted to enlighten the participants about the basic concept of structure in C programming language and how it can be used to hold several information within the same category that share common attributes. Figure 7 demonstrates the use of structure concept to control the brightness of the LED. A structure with a tag named LED was declared in this context and three members named “bright”, “medium”, and “dim” were defined. The member attributes can be accessed by using “.” operator such as “RED.bright” which will provide the variable “LAMP” with 1.0 value.

Figure 7: Brightness control using structure

In order to evaluate the approach’s acceptability and its effect on learning C programming within the training period, a statistical studies were carried before and after the training program. The results of the survey will be discussed in the following section.

3.       Results

Figure 8 shows the bar graph descriptions for Criteria 1 to measure the students attribute towards C Programming subject. As shown in the figure, the mean scores for all questions in exit survey are higher compared to the entrance survey. The students responded that they have better programming skills and sufficient knowledge and understanding in C Programming after the module was implemented.

From the survey, we also measured lecturer’s ability in teaching the subject from the students’ point of view and the statistic is depicted as in Figure 9 below. The mean scores in exit survey are higher than the entrance survey. Majority of the mean scores for all questions in this criteria are higher than 4.00. This indicates that the students felt that the lecturer is capable of teaching this subject.

Figure 8: Criteria 1 Students Attributes

Figure 9: Criteria 2 Lecturer’s Profile

We also evaluated the effectiveness on how the lecturer implemented the module as shown in Figure 10 below. The mean scores for all questions are higher in exit survey than entrance survey, which are above 4.00. This shows that the students are satisfied with the implementation of the module.

Other than that, the students gave positive response towards the facilities provided during the module session. Figure 11 below shows the statistic of the criteria. The mean scores for equipment space (mean = 4.13) and functionality (mean = 4.10) are higher in the exit survey compared to entrance survey.

Figure 10: Criteria 3 Implementation

Figure 11: Criteria 4 Facilities

The survey also tested the students understanding of the module as can be seen in Figure 12 below. From the figure, mostly students gave positive response that the module enhances their understanding of C Programming.

Figure 12: Criteria 5 Students’ Understanding

This research study was further extended to evaluate the students’ response reflecting the module execution and implementation. Figure 13 to 16 below depict the students’ responses regarding the overall module assessment.

Figure 13 shows the bar graph for Criteria Motivation and Students’ interest toward the C Programming. The highest score from this criterion was ‘Agree’ for all three questions and this shows that they are motivated and interested in learning C Programming.

Figure 13: Criteria Motivation and interest

Figure 14 describes the difficulty of the course from the students response.  Majority of the students found that the course was quite challenging which they were struggling to understand and complete the task given.

Figure 14: Criteria Difficulties

Figure 15 displays the third criterion which measured the Expectancy for Success among the students. The results shows positive feedback from the students which they believe this course will improve their academic performance.

Figure 16 depicts the students response on the implementation of the course. They found that this course was enjoyable and they highly recommend that the course should be more fun and interesting which interactive games can be integrated and real life application can be interfaced.

Figure 15: Criteria Expectancy for success

Figure 16: Criteria Deliveries

4.       Conclusions

This paper reports the effectiveness of the implementation of the C Programming module. In general we evaluated the students’ response in five criteria namely the students attributes, lecturer’s profile, implementation, facilities and students’ understanding. From the survey, the results in exit survey are higher compared to entrance survey for all criteria. This shows that the students are satisfied with the implementation of the module, which has increased their understanding in learning C Programming.

Acknowledgment

This work is financially supported by Institute of Research Management & Innovation, UniversitiTeknologi MARA Grant Scheme Academic & Research Assimilation (600-IRMI/DANA 5/3/ARAS (0124/2016)) and (600-RMI/DANA 5/3/ARAS (52/2015)).

  1. Miskon, Mohamad Taib, et al. “Embedded C programming using FRDM hands-on learning system design education.” Engineering Education (ICEED), 2016 IEEE 8th International Conference on. IEEE, 2016.
  2. Bell, Stephanie. “Project-based learning for the 21st century: Skills for the future.” The Clearing House 83.2 (2010): 39-43.
  3. Conole, Gráinne. Designing for learning in an open world. Vol. 4. Springer Science & Business Media, 2012.
  4. Ajao, Lukman Adewale, et al. “Learning of Embedded System Design, Simulation and Implementation: A Technical Approach.” American Journal of Embedded Systems and Applications 3.3 (2016): 35-42.
  5. Chu, Edward T-H., and Chi-Wei Fang. “CALEE: A computer-assisted learning system for embedded OS laboratory exercises.” Computers & Education 84 (2015): 36-48.
  6. Rao, PVV Rama, G. Durga Prasad, and N. Venkata Ramana. “Project Based Learning Method using Simulation Tools and Hardware Exposure.” Journal of Engineering Education Transformations (2016).
  7. Malinowski, Aleksander, and Hao Yu. “Comparison of embedded system design for industrial applications.” IEEE Transactions on Industrial Informatics 7.2 (2011): 244-254.
  8. Study Plan, Faculty of Electrical Engineering.
  9. “Introduction to C programming (ECE126)”, 2013, Fakulti Kejuruteraan Elektrik course information.
  10. Kelleher C, Pausch R. Lowering the barriers to programming: A taxonomy of programming environments and languages for novice programmers. ACM Computing Surveys (CSUR). 2005 Jun 1;37(2):83-137.
  11. Chen, Woei-Kae, and Yu Chin Cheng. “Teaching object-oriented programming laboratory with computer game programming.” IEEE Transactions on Education 50.3 (2007): 197-203..
  12. Leutenegger, Scott, and Jeffrey Edgington. “A games first approach to teaching introductory programming.” ACM SIGCSE Bulletin 39.1 (2007): 115-118.
  13. Enzai, Nur Idawati Md, et al. “Harnessing creativity in teaching and learning introductory programming.” Research and Development (SCOReD), 2011 IEEE Student Conference on. IEEE, 2011.
  14. Poindexter, Sandra. “Assessing active alternatives for teaching programming.” Journal of Information Technology Education 2 (2003): 257-265.
  15. Williams, Andrew B. “The qualitative impact of using LEGO MINDSTORMS robots to teach computer engineering.” IEEE Transactions on Education 46.1 (2003): 206.
  16. Jianzhong, Zha. “On CDIO model under learning by doing strategy.” Research in Higher Education of Engineering 3 (2008): 1-6.
  17. Wang, Jianmin, and Shuling Di School. “The C/C++ Integrative Teaching Based on CDIO Education Model.” IERI Procedia 2 (2012): 299-302.
  18. Huang, Xiaodong, Qin Wang, and Lishang Zhu. “The Research on Curriculum Group of Computer Programming Based on CDIO.” DEStech Transactions on Computer Science and Engineering icte (2016).
  19. CAO, Yingying, Licai ZHU, and Chang’an CAI. “Design and Implement of Cases Used in Programming Courses Based on CDIO.” Computer 6 (2011): 016.
  20. Jusoh, Z et al. “Hands-on and Training on Embedded System.” 2015 IEEE 7th International Conference on Engineering Education (ICEED) 2015: 151–154.
  21. “Introduction to C programming (ECE126)”, 2013, Fakulti Kejuruteraan Elektrik, Laboratory Manual.
  22. https://developer.mbed.org/platforms/frdm-kl05z/

Citations by Dimensions

Citations by PlumX

Google Scholar

Scopus