Unit 65: Principles and Applications of

Unit code: T/600/7119 QCF Level 3: BTEC Nationals Credit value: 10 Guided learning hours: 60

Aim and purpose

This unit will develop learners’ understanding of the features and characteristics of microcontrollers and will give them the skills needed to select, implement and test such devices.

Unit introduction

At work and at home we rely on a range of complex electrical and electronic devices and systems to meet our needs. We expect these devices to have numerous features, versatility, reduced costs, increased reliability, energy efficiency and be squeezed into ever-smaller units. This unit will enable learners to understand one of the most versatile building blocks that enable engineers to develop such applications – the . A microcontroller is a ‘computer-on-a-chip’ and contains all the elements of a computer, such as electronic memory, input/output interfaces and control processes. This provides small size, reduced power consumption and the ability to control (after it has been programmed) processes or events. The microcontroller can be used for applications that measure, store, control, calculate or display information. This unit will develop learners’ understanding of microcontrollers and the main features of microcontroller internal architecture. The unit will cover communication and human interface devices, as their purpose is to be able to receive data and then pass back processed information either to other devices or to the human operator for them to act upon. Learners will be introduced to real-time operating systems (RTOS) and control instructions. They will also develop their ability to select, implement and test microcontrollers.

Learning outcomes

On completion of this unit a learner should: 1 Understand the internal architectural features and common characteristics of microcontrollers 2 Understand microcontroller communication interfaces and human interface devices 3 Understand microcontroller hardware control methods 4 Be able to select, implement and test a microcontroller.

Edexcel BTEC Level 3 Nationals specification in Engineering – Issue 1 – February 2010 © Edexcel Limited 2009 1 Unit content

1 Understand the internal architectural features and common characteristics of microcontrollers Microcontroller internal architecture: architectural models eg von Neumann, Harvard; modules (central processor unit (CPU), arithmetic logic unit (ALU), control unit and registers eg stack pointer (SP), program counter (PC), instruction register (IR), accumulator, index, file, status); memory options eg volatile (static, dynamic, static random access memory (SRAM), dynamic random access memory (DRAM), battery back- up SRAM), non-volatile (read only memory (ROM), mask-ROM, electrically erasable programmable read only memory (EEPROM), Flash memory, non-volatile NV-RAM); eg big endian, little endian; interrupt controller, timer/counter, digital input/output (I/O) ports (parallel and number of pins); registers eg data direction register (DDR), port, port input; analogue I/O (analogue/digital converter eg channel, resolution, differential/bipolar conversion); watchdog timer; debugging unit Microcontroller characteristics and features: manufacturers eg Intel, Western Design Center, Motorola, ZiLOG; voltage levels and reasons for such levels; brownout protection; power consumption; power management modes (idle, halt, wakeup); over voltage protection (OVP); charger considerations; low- dropout regulators (LDOs); battery monitoring; power sequencing

2 Understand microcontroller communication interfaces and human interface devices Interfaces: serial; parallel; synchronous; asynchronous; bus; point-to-point; duplex (full, half), master/slave principle; universal asynchronous receiver transmitter (UART); universal synchronous asynchronous receiver transmitter (USART); configurable parameters eg number of data bits, parity bit, stop bit, baud rate; serial peripheral interface (SPI); synchronous serial port (SSP); serial peripheral port (SPP) master/slave to allow communications between controllers; serial communication interface (SCI); I2C bus – IIC (inter-OC bus); analogue-to-digital converters (A/D); digital-to-analogue convertors (D/A); signal standards eg RS –232, 422, 485, 482; Bluetooth; embedded internet and internet protocol suite; universal serial bus (USB) connection; controller area network (CAN) Human interface devices: display method eg light emitting diodes (LED), liquid crystal displays (LCD), plasma, thin-film transistor (TFT), vacuum fluorescent display (VFD); on-screen display (OSD) functions eg that support text and graphics display; input/output devices eg keyboards, keypad, touch screens, printers, electronic readers, wireless, USB

3 Understand microcontroller hardware control methods Real-time operating system (RTOS): event driven; time sharing; kernel (single, multi-stack); implementation (installation procedures, manipulate setting, locks and critical sections, memory management, scheduler); common types eg Palm OS, Windows CE, QNX, RTLinux, LinuxOS, Salvo LE Control instructions: complex instruction set computer (CISC); reduced instruction set computer (RISC); categories eg data movement, data processing, execution, processor control; polling; interrupts eg maskable, non-vectored, vectored, arbitration and priority; interrupts eg interrupt enable (IE), interrupt survive routine (ISR), interrupt flag (IF), interrupt mode; reset eg power-on, brown-out, external, watchdog, internal

Edexcel BTEC Level 3 Nationals specification in Engineering 2 – Issue 1 – February 2010 © Edexcel Limited 2009 4 Be able to select, implement and test a microcontroller Selection and implementation: selection criteria eg based on cost, convenience, availability of development tools, intended use; implementation tools eg assemblers, simulators, resident debuggers, emulators/in- circuit emulators (ICE), Java on Testing techniques: operational considerations eg static, dynamic, interoperability, environmental; software tools eg debuggers, emulators; debugging eg breakpoints, scanpoints, profiles; test equipment and instruments eg oscilloscope, probes, analysers, signal-generating devices; internet searches for common faults and solutions; collection of test data eg data sheets, data management

Edexcel BTEC Level 3 Nationals specification in Engineering – Issue 1 – February 2010 © Edexcel Limited 2009 3 Assessment and grading criteria

In order to pass this unit, the evidence that the learner presents for assessment needs to demonstrate that they can meet all the learning outcomes for the unit. The assessment criteria for a pass grade describe the level of achievement required to pass this unit.

Assessment and grading criteria To achieve a pass grade the To achieve a merit grade the To achieve a distinction grade evidence must show that the evidence must show that, in the evidence must show that, learner is able to: addition to the pass criteria, in addition to the pass and the learner is able to: merit criteria, the learner is able to: P1 explain the internal M1 explain how a D1 evaluate two different architectural structure of a microcontroller chip is techniques used for standard microcontroller connected to a human interfacing a microcontroller interface device to an external system P2 explain the characteristics and M2 compare an RTOS with D2 evaluate a microcontroller features of a manufacturer’s a CISC/RISC instruction application to determine what microcontroller family set with respect to how alternative microcontroller the use of such control chip could be used and the methods might influence benefits that it would provide. microcontroller selection P3 explain the function and M3 use a debugging tool application of three different to correct a fault in a microcontroller interfaces microcontroller application. P4 describe the benefits of one particular type of human interface device for a specific microcontroller application P5 explain the role of a real-time operating system P6 explain the control instructions of a given microcontroller assembly language program P7 select a microcontroller for a given application, stating the selection criteria used, including details of implementation tools available to support the application [IE1] P8 use one software-based and one instrument-based testing technique to determine the performance of a microcontroller in a given application. [IE1, SM3]

Edexcel BTEC Level 3 Nationals specification in Engineering 4 – Issue 1 – February 2010 © Edexcel Limited 2009 PLTS: This summary references where applicable, in the square brackets, the elements of the personal, learning and thinking skills applicable in the pass criteria. It identifies opportunities for learners to demonstrate effective application of the referenced elements of the skills.

Key IE – independent enquirers RL – reflective learners SM – self-managers CT – creative thinkers TW – team workers EP – effective participators

Edexcel BTEC Level 3 Nationals specification in Engineering – Issue 1 – February 2010 © Edexcel Limited 2009 5 Essential guidance for tutors

Delivery

This unit assumes that learners are familiar with the use of software and instruments (eg oscilloscopes, probes, analysers, signal generators) and delivery should focus on their application to microcontrollers. A practical-based approach to delivery will be most effective and tutors should reinforce the more theoretical aspects through hands-on activities. These activities can successfully introduce learners to the use and applications of microcontrollers. Because of the considerable growth in microcontroller technology over recent years, there is a wide variety of microcontrollers of varying complexity available. It is important that learners recognise the limitations of earlier models and understand the potential of newer technologies that can offer longer life cycles and advanced characteristics and features. Learners also need to appreciate that in a manufacturing setting the correct choice of technology is important, especially if it reduces costs. Ideally, centres will have strong links with local employers so that learners can apply their knowledge to real work-based applications of the technology. Alternatively, visits to appropriate exhibits, trade fairs and manufacturers can be used to help put the unit content into context. Educational resources such as films, online tutorials, software development programmes etc are all good learning support aids. Because of the wide range of devices and applications that have microcontrollers embedded within them, it may be useful to make displays indicating the building blocks that make up the products. Examples could be an intruder alarm panel, a mobile phone, a smart display or a range of manufacturers’ microcontroller units. Because of the large amount of information available on the internet about microcontrollers, testing parameters and common faults and solution techniques, tutors may need to provide extra guidance when learners are carrying out research. When delivering the practical aspects of the unit, tutors should ensure learners can recognise older and newer components, circuits, interfaces and complete applications. This will help learners appreciate how the various aspects fit together to produce an efficient, reliable, safe device/application within a range of environments. Appropriate attention must be given to health and safety for the practical work in this unit, particularly when learners are working in an workshop environment. Note that the use of ‘eg’ in the content is to give an indication and illustration of the breadth and depth of the area or topic. As such, not all content that follows an ‘eg’ needs to be taught or assessed.

Edexcel BTEC Level 3 Nationals specification in Engineering 6 – Issue 1 – February 2010 © Edexcel Limited 2009 Outline learning plan

The outline learning plan has been included in this unit as guidance and can be used in conjunction with the programme of suggested assignments. The outline learning plan demonstrates one way in planning the delivery and assessment of this unit.

Topic and suggested assignments/activities and/assessment Whole-class teaching:

● introduction to unit content, scheme of work and methods of assessment

● describe the different microcontroller architectural models

● identify and describe different modules and a range of memory options

● identify and describe interrupt controller, timer/counter, digital input/output (I/O) ports

● explain characteristics of registers, analogue I/O, watchdog timer and debugging unit

● explain the main characteristics and features of a range of microcontrollers. Practical workshop activities:

● learner investigation of a range of microcontrollers to determine features and characteristics. Prepare for and complete Assignment 1: Characteristics and Features of Microcontrollers (P1, P2). Whole-class teaching:

● describe the different microcontroller communication interfaces and configurable parameters

● explain the purpose and use of signal standards

● explain the different display methods and on-screen display functions

● describe human interface input/output devices. Practical workshop activities:

● learner investigation of a range of microcontroller interfaces and the relationship to the devices they operate. Prepare for and complete Assignment 2: Microcontroller Interfaces (P3, P4, M1, D1). Whole-class teaching:

● explain the use and operation of event driven and time sharing RTOS designs and the operation of the kernel

● explain implementation procedures and requirements

● identify and describe a range of the most common types of system

● explain RISC and CISC computer instruction set architecture

● explain the different categories of assembly language

● explain polling loops and use of interrupts. Practical workshop activities:

● learner investigation of RTOS and microcontroller assembly language program. Prepare for and complete Assignment 3: Microcontroller Hardware Control (P5, P6, M2).

Edexcel BTEC Level 3 Nationals specification in Engineering – Issue 1 – February 2010 © Edexcel Limited 2009 7 Topic and suggested assignments/activities and/assessment Whole-class teaching:

● explain the main criteria to consider when selecting microcontrollers for an application

● explain the use of implementation tools

● demonstrate use of software tools, test equipment and instruments

● demonstrate testing techniques to determine performance of microcontrollers in different applications

● explain common faults and solutions

● demonstrate methods of collecting test data. Practical workshop activities:

● learner activities to select, implement and test microcontrollers. Prepare for and complete Assignment 4: Selecting and Testing Microcontrollers (P7, P8, M3, D2). Feedback on assessment and unit evaluation.

Assessment

Assessment of this unit could consist of a mix of written technical reports, presentations to an audience and hands-on practical work. Evidence for any presentations given will need to include a record of tutor observation plus the learner’s notes/slides etc from their preparation and delivery. Annotated photographic evidence could be used to capture any on-site information and support learners’ written work. P1 requires an explanation of the internal architectural structure of a standard microcontroller and could be covered by learners considering either a von Neumann or a Harvard architectural model. Learners need to explain all the aspects ranged in the unit content for the microcontroller selected (eg CPU, ALU, registers, memory etc). To achieve P2, learners must show their understanding of a specific manufacturer’s microcontroller family (eg Intel, Western Design Center, Motorola) by explaining the characteristics and features available as listed in the unit content. For both P1 and P2, evidence could be in the form of a written technical report or presented in some other format, eg a formal presentation to the group or production of an information/sales type leaflet. Learners should be advised to keep all their early research materials in a suitable portfolio as this will provide them with a useful reference tool to work with and build on as they progress through the unit. P3 and P4 are closely related in that there is always a need for an interface between the microcontroller and the device it operates. For P3, learners need to demonstrate that they can differentiate between three different interfaces, their functions and applications. The unit content lists a range of interfaces (eg serial, parallel, synchronous, asynchronous, bus, point-to-point, duplex etc) and although it is expected that a centre will cover all of these during the delivery of the unit only three are required for assessment purposes. The choice of interfaces used could be determined by the tutor, employer or the learner. For P4 learners must consider the physical link between the interface device (P3) and one particular type of input/output device that provides the human interface. It is not essential that the two criteria are linked (although it would be good to know which communication interface is being used) but it would improve the coherence of the assessment activity. Learners need to recognise that there are different types of human interface device but are required to select only one device that is relevant for a specific application for assessment purposes. For example, TFT displays have clear benefits when used with a laptop computer, but would they be appropriate on domestic washing machines?

Edexcel BTEC Level 3 Nationals specification in Engineering 8 – Issue 1 – February 2010 © Edexcel Limited 2009 A link could be established between P4 and M1 and be extended to D1, although it is recommended that pass criteria P5 and P6 are undertaken before allowing learners to fully develop material for this distinction criterion. P5 requires learners to explain the role of a real-time operating system (RTOS). The explanation does not need to be highly complex and learners need only be able to demonstrate an understanding of the basic principles, which could include a couple of the more advanced features of a selected RTOS. To achieve P6, learners need to explain the control instructions of a given microcontroller assembly language program. An effective approach would be to get learners to annotate a real assembly language program with the details of each control instruction. It is not necessary for learners to repeatedly demonstrate the same instruction or annotate the complete program. The program selection should, however, contain all appropriate control instructions to cover the requirements of the unit content. If a single program is not available centres can use two different programs but, beyond this, it is likely that the programs would be too simple and not at the expected level of learning. Having looked at the operating system and explained an assembly language program, learners could compare a RTOS with a CISC/RISC instruction set (M2). It may be helpful to consider the extreme ends of microcontroller applications and what is needed. A sufficient range of unit content would have been considered for the learner to undertake D1 which requires them to consider the type of data to be transferred and what has to be interfaced with it. Therefore, techniques such as USART could be evaluated in light of their use. For P7, learners are required to select a microcontroller for a given application and state the selection criteria used, including details of implementation tools available to support the application. P7 could be effectively linked with P8 which requires learners to use testing techniques to determine the performance of a microcontroller in a given application. The application does not have to be overly complex as it is learners’ understanding of the operational considerations of testing and all that it entails that is important. The assessment also needs to confirm that learners can apply the appropriate software and instrument methods to collect relevant data. There is a possible link from P8 to M3 although M3 does not have to be conducted against the same application. It may be advantageous to do so, however, as it would improve the coherence of the assessment. Note that P8 is looking at performance and M3 is concerned with debugging to correct a fault. Finally, D2 requires learners to consider an application (which may have already been used in completing other grading criteria), suggest an alternative chip and identify the benefits the alternative would achieve. Clearly, as technology advances, older microcontroller devices/applications could be used as the focus of this criterion. For example, learners could consider multimeters and how their features have been enhanced over recent years.

Edexcel BTEC Level 3 Nationals specification in Engineering – Issue 1 – February 2010 © Edexcel Limited 2009 9 Programme of suggested assignments The table below shows a programme of suggested assignments that cover the pass, merit and distinction criteria in the assessment and grading grid. This is for guidance and it is recommended that centres either write their own assignments or adapt any Edexcel assignments to meet local needs and resources.

Criteria covered Assignment title Scenario Assessment method P1, P2 Characteristics A technician needs to A written report or and Features of explain the characteristics presentation. Microcontrollers of microcontrollers to a new apprentice. P3, P4, M1, D1 Microcontroller Interfaces A technician has been A written report. asked to compare and evaluate interfacing techniques for a microcontroller. P5, P6, M2 Microcontroller Hardware A technician has A written report Control been asked to explain supported by an microcontroller hardware annotated assembly control methods to a new language program. member of staff. P7, P8, M3, D2 Selecting and Testing A technician needs to A written report based Microcontrollers select a microcontroller on results of practical for an application in the activities, supported by workplace and use testing tutor observation and/or techniques to determine annotated photos. its performance.

Links to National Occupational Standards, other BTEC units, other BTEC qualifi cations and other relevant units and qualifi cations

This unit forms part of the BTEC Engineering sector suite. This unit has particular links with:

Level 1 Level 2 Level 3 Selecting and Using Programmable Logic Controllers Construction and Application of Digital Systems

Essential resources

Learners will need access to facilities for carrying out practical investigations into working devices/systems containing microcontrollers and appropriate testing. This should include a range of various microcontrollers, communication interfaces and human display devices. Learners will also need access to a range of manuals, reference data and manufacturers’ products/information.

Edexcel BTEC Level 3 Nationals specification in Engineering 10 – Issue 1 – February 2010 © Edexcel Limited 2009 Employer engagement and vocational contexts

Much of the work for this unit can be set in the context of learners’ work placements or be based on case studies of local employers. Further information on employer engagement is available from the organisations listed below:

● Work Experience/Workplace learning frameworks – Centre for Education and Industry (CEI – University of Warwick) – www.warwick.ac.uk/wie/cei/

● Learning and Skills Network – www.vocationallearning.org.uk

● Network for Science, Technology, Engineering and Maths Network Ambassadors Scheme – www.stemnet.org.uk

● National Education and Business Partnership Network – www.nebpn.org

● Local, regional Business links – www.businesslink.gov.uk

● Work-based learning guidance – www.aimhighersw.ac.uk/wbl.htm

Indicative reading for learners

Textbooks Bates M – PIC Microcontrollers (Newnes, 2004) ISBN 0750662670 Ibrahim D – Microcontroller Based Applied Digital Control (John Wiley and Sons, 2006) ISBN 0470863358

Edexcel BTEC Level 3 Nationals specification in Engineering – Issue 1 – February 2010 © Edexcel Limited 2009 11 Delivery of personal, learning and thinking skills

The table below identifies the opportunities for personal, learning and thinking skills (PLTS) that have been included within the pass assessment criteria of this unit.

Skill When learners are … Independent enquirers identifying questions to answer and problems to resolve when selecting and testing microcontrollers

Self-managers organising time and resources and prioritising actions when selecting, implementing and testing microcontrollers

Although PLTS are identified within this unit as an inherent part of the assessment criteria, there are further opportunities to develop a range of PLTS through various approaches to teaching and learning.

Skill When learners are … Independent enquirers researching microcontrollers, analysing and evaluating information

Edexcel BTEC Level 3 Nationals specification in Engineering 12 – Issue 1 – February 2010 © Edexcel Limited 2009 Functional Skills – Level 2

Skill When learners are … ICT – Use ICT systems Select, interact with and use ICT systems using software-based testing techniques independently for a complex task to meet a variety of needs English Speaking and listening – make a range of presenting information to explain characteristics and features of a contributions to discussions and make manufacturer’s microcontroller family effective presentations in a wide range of contexts Reading – compare, select, read and researching information on microcontroller architecture, understand texts and use them to gather functions and applications information, ideas, arguments and opinions Writing – write documents, including preparing technical reports on microcontroller architecture, extended writing pieces, communicating functions and applications. information, ideas and opinions, effectively and persuasively

Edexcel BTEC Level 3 Nationals specification in Engineering – Issue 1 – February 2010 © Edexcel Limited 2009 13