Microcontroller Two Day Beginners Workshop Instructors - PowerPoint PPT Presentation

Loading...

PPT – Microcontroller Two Day Beginners Workshop Instructors PowerPoint presentation | free to download - id: 69fac3-NTFjN



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Microcontroller Two Day Beginners Workshop Instructors

Description:

Microcontroller Two Day Beginners Workshop Instructors Craig Kief Deputy Director, COSMIAC craig.kief_at_cosmiac.org Karl Henry Instructor, JF Drake State – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Date added: 6 November 2019
Slides: 119
Provided by: kief
Learn more at: http://www.cosmiac.org
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Microcontroller Two Day Beginners Workshop Instructors


1
Microcontroller Two Day Beginners
Workshop Instructors
Craig Kief Deputy Director, COSMIAC craig.kief_at_cos
miac.org Karl Henry Instructor, JF Drake
State Karl.Henry_at_DrakeState.edu Nasser
Alaraje Associate Professor, MTU alaraje_at_mtu.edu

Brian Zufelt Faculty, UNM brian.zufelt_at_cosmiac.org
Bassam Matar Instructor, Chandler-Gilbert
b.matar_at_cgcmail.maricopa.edu
1
2
Introductions
  • Who are you?
  • Where are you from?
  • Any Microcontroller or Microprocessor experience?
  • Any C experience?
  • What do you want to learn from this?

3
Syllabus
Day 1 - 830 am Introduction / Survey - 915
am What is a Microcontroller - 945
am Compiler and C as Tools - 1015 am Break -
1030 am Lab 1 Load Software - 1100 am Lab 2
White Light - 1200 pm Lunch - 100 pm C
Syntax, Compilers, Basic C Statements,
Preprocessor - 200 pm Lab 3 Blinking Light
and Preprocessor - 300 pm Lab 4 LED and
Counter
4
Syllabus
Day 2 - 830 am Recap of Day 1 - 900
am Functions and Libraries - 1000 am Lab 5
Interrupts - 1100 am Lab 6 UART - 1200
pm Lunch - 100 pm Lab 7 Accelerometers -
200 pm Lab 8 Temp Sensor - 300 pm Lab 9
OLED / Final Project - 345 pm Microcontroller
peripherals - 400 pm Support System (Software
Wiki, etc.) - 430 pm Implementation /
Adaption Plan / Issues at schools - 500
pm Conclusions / Feedback / Survey
5
Why we are here
  • The average instructor when they are told they
    should be updating their microcontroller lab by a
    department chair

6
Method Immersive hands-on design for every
student
Students learn more, faster, and better with
unrestricted access to design tools
overall learning improves when applied design
skills taught early overall performance
improves when design skills used frequently and
they like it
results published in 2008 and 2009 ASEE
proceedings
I never teach my pupils I only attempt to
provide the conditions in which they can learn.
Albert Einstein
7
Microcontroller across the Curriculum
  • Computer Architecture
  • Embedded Processors
  • System on a Chip
  • Digital Logic
  • Dedicated Controllers
  • Application Specific Circuit Testing
  • Controls
  • Motor Control
  • Sensor Interface
  • Robotics
  • DSP
  • Dedicated MAC

8
Please interrupt and ask questions
9
What is a Microprocessor
  • A microprocessor incorporates the functions of a
    computer's central processing unit (CPU) on a
    single integrated circuit (IC). It is a
    multipurpose, programmable device that accepts
    digital data as input, processes it according to
    instructions stored in its memory, and provides
    results as output.
  • It is an example of sequential digital logic, as
    it has internal memory.
  • Microprocessors operate on numbers and symbols
    represented in the binary numeral system.
  • The advent of low-cost computers on integrated
    circuits has transformed modern society.

10
What is a Microcontroller
  • A microcontroller (sometimes abbreviated µC, uC
    or MCU) is a small computer on a single
    integrated circuit containing a processor core,
    memory, and programmable input/output
    peripherals. Microcontrollers are designed for
    embedded applications, in contrast to the
    microprocessors used in personal computers or
    other general purpose applications.
  • Microcontrollers are used in automatically
    controlled products and devices, such as
    automobile engine control systems, implantable
    medical devices, remote controls, office
    machines, appliances, power tools, toys and other
    embedded systems.
  • By reducing the size and cost compared to a
    design that uses a separate microprocessor,
    memory, and input/output devices,
    microcontrollers make it economical to digitally
    control even more devices and processes.
  • Mixed signal microcontrollers are common,
    integrating analog components needed to control
    non-digital electronic systems.

11
What is C and Assembly
  • All computers process information in the form of
    bits. However writing code in 1s and 0s can be
    a impossible task for complex systems. For this
    reason higher level programing languages such as
    C and Assembly were created.
  • Assembly is a language that is closely tied to a
    given architectures instruction set. An
    instruction set is the commands a given processor
    is able to execute as a single instruction. For
    example, bit shifts , memory jump, basic math
    operations.
  • C is a widely used programming language that
    rises above a specific instruction set. This
    allows C to be more readable and portable to
    multiple devices, while still remaining close
    enough to the hardware language that minimal
    performance sacrifices are made. For these
    reasons C has become the language of choice for
    many embedded system designers.
  • As you move to higher languages (C, Java, C,
    and objective C, Visual Basic) the language is
    easier to read, however performance is
    sacrificed.

12
Top Languages
  • According to IEEE July, 2014

13
The Compiling Process
  • A compiler is a computer program (or set of
    programs) that transforms source code written in
    a programming language (the source language) into
    another computer language (the target language,
    often having a binary form known as object code).
    The most common reason for wanting to transform
    source code is to create an executable program.
  • The name "compiler" is primarily used for
    programs that translate source code from a
    high-level programming language to a lower level
    language (e.g., assembly language or machine
    code).
  • For this course, we will use the Texas
    Instruments Code Composer Compiler.

14
Stellaris vs. Tiva
  • What is the difference?
  • Please see this document that lists the
    equivalent part numbers in the two families. The
    parts are the same and you can directly replace
    the Tiva part number in a design with the
    equivalent LM4F part number.  For software
    porting, please see this document. Both the
    launchpad and the EK-LM4F232 will continue to be
    supported, and there is a new version of the
    Launchpad with a Tiva part and additional
    functionality.  Please let me know if you have
    additional questions.
  • Part number doc http//www.ti.com/lit/ml/spmt284/
    spmt284.pdf
  • Tiva LaunchPad vs Stellaris LaunchPad

15
Stellaris vs. Tiva
16
What projects are Microcontrollers good for?
  • The Tiva TM4C (formerly Stellaris LM4F) series of
    ARM Cortex-M4 microcontrollers provides top
    performance and advanced integration. The product
    family is positioned for cost-conscious
    applications requiring significant control
    processing and connectivity capabilities such as
  • Connectivity
  • Sensor aggregation
  • Security and access control
  • Home and building automation
  • Industrial automation
  • Human machine interface
  • Lighting control
  • Energy
  • Data acquisition
  • System management
  • For applications requiring extreme conservation
    of power, the TM4C1233H6PM microcontroller
  • features a battery-backed Hibernation module to
    efficiently power down the TM4C1233H6PM to a
  • low-power state during extended periods of
    inactivity. A Hibernation module positions the
  • TM4C1233H6PM microcontroller perfectly for
    battery applications.

17
Why this tool
Eclipse (Design Environment) Free Code
Composer (not free but open with IDE) ADT
(Android Development Tool) Java PIC
(gcc) AVR (gcc)
In computer programming, Eclipse is a
multi-language software development environment
comprising a base workspace and an extensible
plug-in system for customizing the environment.
It is written mostly in Java. It can be used to
develop applications in Java and, by means of
various plug-ins, other programming languages
including Ada, C, C, COBOL, Fortran, Haskell,
JavaScript, Perl, PHP, Python, Scala, Scheme, and
Erlang.
18
Pinouts for Projects
TM4C1232H6PM
Tiva Chip
19
Section Objectives
  • At the end of this section you will be able to
  • Understand the high-level architecture of ARM
    processor
  • Understand the CPU, Digital, Analog and
    Programmable Routing / Interconnect Systems

20
Why we went the way we did
TI Tiva LaunchPad
Digilent Orbit Board Mounted on Tiva LaunchPad
  • ARM is the way of the future. Wanted a way to
    teach intro microcontrollers but also a path way
    ahead to life long learning
  • Wanted to have hardware that instructors could
    inexpensively obtain for a long period of time
  • Wanted to utilize Digilent reliability
  • Wanted a free high quality design environment
  • Wanted to utilize simple enough C code that
    instructors could immediately begin simple
    projects

21
Tiva LaunchPad
  • The Tiva Launchpad is an evaluation platform
    provided by Texas Instruments. It provides an
    excellent platform for exploring all the options
    the Tiva family of microcontrollers provide. Some
    features include
  • In-circuit-debugger
  • I/O headers
  • USB connection
  • RGB LED
  • USB to Serial converter
  • Pushbuttons

22
Whats a kibibyte?
23
System Overview
Courtesy of Real-Time OS for ARM Cortex-M by
Valvano
24
Digilent Orbit Board
  • The Orbit board contains many features to help
    students grasp the concepts presented
  • OLED display
  • Expandable PMOD connectors
  • Potentiometer
  • Switches
  • Push Buttons
  • LEDs
  • I2C headers
  • There are definitely other alternatives

25
CPU Subsystem
Texas Instrument's Stellaris family of
microcontrollers provide designers a
high-performance ARM Cortex-M-based
architecture with a broad set of integration
capabilities and a strong ecosystem of software
and development tools. Targeting performance and
flexibility, the Stellaris architecture offers a
80 MHz Cortex-M with FPU, a variety of integrated
memories and multiple programmable GPIO. Offering
quicker time-to-market and cost savings, the
Stellaris family of microcontrollers is the
leading choice in high-performance 32-bit
applications.
Full datasheet at http//cosmiac.org/Community_Po
rtal_Micro.html
26
What and Why ARM?
  • The ARM architecture describes a family of
    RISC-based computer processors designed and
    licensed by British company ARM Holdings. It was
    first developed in the 1980s by Acorn Computers
    Ltd to power their desktop machines and
    subsequently spun off as a separate company, now
    ARM Holdings.
  • Globally as of 2013 it is the most widely used
    32-bit instruction set architecture in terms of
    quantity produced. According to ARM Holdings, in
    2010 alone, producers of chips based on ARM
    architectures reported shipments of 6.1 billion
    ARM-based processors, representing 95 of
    smartphones, 35 of digital televisions and
    set-top boxes, and 10 of mobile computers.
  • As an IP core business, Advanced RISC Machine
    (ARM) Holdings itself does not manufacture its
    own electronic chips, but licenses its designs to
    other semiconductor manufacturers.

27
Why are they important
  • Virtually every appliance, smart phone,
    automobile, well, you name it, has one in it.
  • Having a technician, technologist or engineer
    that doesnt at least have a working knowledge of
    them is doing them an injustice.

28
How are Microcontroller projects Designed?
  • For our workshop, we will use three packages
  • Code Composer Studio
  • TivaWare Firmware Development Package
  • LM Flash Programmer Utility
  • ATE Workshop Lab
  • The overall design language is C code!

29
I wish to help all of you to begin teaching
Microcontrollers
30
Three Elements of Focus
  • Hardware Includes the architecture of the
    microcontroller / microprocessor used, and if
    there is and operating system installed.
  • SDK Includes all software used for development
    IDE, Debuggers ,etc..
  • Programming Language Includes all programming
    languages used to develop your project. We will
    use C.

31
ARCHITECTURE OVERVIEW
  • ARM Processor

32
ARM Cortex M4F
  • The next series of slides will drill down into
    the specifics and capabilities

33
ARM Cortex M4F
  • The Cortex-M4F processor is built on a
    high-performance processor core, with a 3-stage
    pipeline Harvard architecture, making it ideal
    for demanding embedded applications.
  • Four Parts that will be discussed
  • ARM
  • System Peripherals
  • Serial Peripherals
  • Analog Peripherals

34
ARM Cortex M4F
  • F means the processor has a Floating Point Unit
    (FPA)

35
ARM Cortex M4F Processor Core
  • 32-bit ARM Cortex-M4F architecture optimized for
    small-footprint embedded applications
  • 80-MHz operation
  • Outstanding processing performance combined with
    fast interrupt handling
  • ARM core in a compact memory size usually
    associated with 8- and 16-bit devices, typically
    in the range of a few kilobytes of memory for
    microcontroller-class applications
  • IEEE754-compliant single-precision Floating-Point
    Unit (FPU)
  • 16-bit SIMD vector processing unit
  • Fast code execution permits slower processor
    clock or increases sleep mode time
  • Harvard architecture characterized by separate
    buses for instruction and data

36
ARM Cortex M4F FPU and Peripherals
  • Floating-Point Unit (FPU) - The FPU fully
    supports single-precision add, subtract,
    multiply, divide, multiply and accumulate, and
    square root operations. It also provides
    conversions between fixed-point and
    floating-point data formats, and floating-point
    constant instructions.
  • The TM4C1233H6PM microcontroller is integrated
    with the following set of on-chip memory and
    features 32 KB single-cycle SRAM, 256 KB
    single-cycle Flash memory and 2KB EEPROM

37
Memory Mapped I/O
Memory Mapped I/O is a method of assigning a
memory address to all the peripherals attached to
the processor. This allows the processor to
access peripherals in the same way it accesses
memory. This method reduces development time, and
code space.
38
Serial
39
Serial - Overview
  • The TM4C123GH6PM controller supports both
    asynchronous and synchronous serial
    communications with
  • USB 2.0 Device
  • Eight UARTs with IrDA, 9-bit and ISO 7816 support
    (one UART with modem flow control)
  • Six I2C modules with four transmission speeds
    including high-speed mode
  • CAN 2.0 A/B controller
  • Four Synchronous Serial Interface modules (SSI)

40
Serial - USB
  • Universal Serial Bus (USB) is a serial bus
    standard designed to allow peripherals to be
    connected and disconnected using a standardized
    interface without rebooting the system.
  • USB was designed to standardize the connection of
    computer peripherals (including keyboards,
    pointing devices, digital cameras, printers,
    portable media players, disk drives and network
    adapters) to personal computers, both to
    communicate and to supply electric power.
  • It has become commonplace on other devices, such
    as smartphones, PDAs and video game consoles. USB
    has effectively replaced a variety of earlier
    interfaces, such as serial and parallel ports, as
    well as separate power chargers for portable
    devices.

41
Serial - UART
  • A Universal Asynchronous Receiver/Transmitter
    (UART) is an integrated circuit used for RS-232C
    serial communications, containing a transmitter
    (parallel-to-serial converter) and a receiver
    (serial-to-parallel converter), each clocked
    separately.
  • The TM4C123GH6PM microcontroller includes eight
    fully programmable 16C550-type UARTs. Although
    the functionality is similar to a 16C550 UART,
    this UART design is not register compatible. The
    UART can generate individually masked interrupts
    from the Rx, Tx, modem flow control, and error
    conditions. The module generates a single
    combined interrupt when any of the interrupts are
    asserted and are unmasked.

42
SERIAL I2C
  • The Inter-Integrated Circuit (I2C) bus provides
    bi-directional data transfer through a two-wire
    design (a serial data line SDA and a serial clock
    line SCL). The I2C bus interfaces to external I2C
    devices such as serial memory (RAMs and ROMs),
    networking devices, LCDs, tone generators, and so
    on.
  • The I2C bus may also be used for system testing
    and diagnostic purposes in product development
    and manufacture.
  • Each device on the I2C bus can be designated as
    either a master or a slave. I2C module supports
    both sending and receiving data as either a
    master or a slave and can operate simultaneously
    as both a master and a slave. Both the I2C master
    and slave can generate interrupts.
  • The TM4C123GH6PM microcontroller includes six I2C
    modules.

43
Serial - CAN
  • Controller Area Network (CAN) is a multicast
    shared serial-bus standard for connecting
    electronic control units (ECUs). CAN was
    specifically designed to be robust in
    electromagnetically noisy environments and can
    utilize a differential balanced line like RS-485
    or twisted-pair wire. Originally created for
    automotive purposes, it is now used in many
    embedded control applications (for example,
    industrial or medical). Bit rates up to 1 Mbps
    are possible at network lengths below 40 meters.
    Decreased bit rates allow longer network
    distances (for example, 125 Kbps at 500m)
  • CAN bus is a vehicle bus standard designed to
    allow microcontrollers and devices to communicate
    with each other within a vehicle without a host
    computer.
  • CAN bus is a message-based protocol, designed
    specifically for automotive applications but now
    also used in other areas such as aerospace,
    industrial automation and medical equipment.

44
SERIAL SSI
  • Synchronous Serial Interface (SSI) is a four-wire
    bi-directional communications interface that
    converts data between parallel and serial. The
    SSI module performs serial-to-parallel conversion
    on data received from a peripheral device, and
    parallel-to-serial conversion on data transmitted
    to a peripheral device. The SSI module can be
    configured as either a master or slave device. As
    a slave device, the SSI module can also be
    configured to disable its output, which allows a
    master device to be coupled with multiple slave
    devices. The TX and RX paths are buffered with
    separate internal FIFOs.
  • The SSI module also includes a programmable bit
    rate clock divider and prescaler to generate the
    output serial clock derived from the SSI module's
    input clock. Bit rates are generated based on the
    input clock and the maximum bit rate is
    determined by the connected peripheral.
  • The TM4C123GH6PM microcontroller includes four
    SSI modules

45
ANALOG
46
Analog - Overview
  • The TM4C123GH6PM microcontroller provides analog
    functions integrated into the device, including
  • Two 12-bit Analog-to-Digital Converters (ADC)
    with 12 analog input channels and a sample rate
    of one million samples/second
  • Two analog comparators
  • 16 digital comparators
  • On-chip voltage regulator

47
Analog - ADC
  • An analog-to-digital converter (ADC) is a
    peripheral that converts a continuous analog
    voltage to a discrete digital number. The
    Stellaris ADC module features 12-bit conversion
    resolution and supports 12 input channels plus an
    internal temperature sensor. Each ADC module has
    a digital comparator function that allows the
    conversion value to be diverted to a comparison
    unit that provides eight digital comparators.
  • The TM4C123GH6PMmicrocontroller provides two ADC
    modules.

48
ANALOG ANALOG COMPARATOR
  • An analog comparator is a peripheral that
    compares two analog voltages and provides a
    logical output that signals the comparison
    result. The TM4C123GH6PM microcontroller provides
    two independent integrated analog comparators
    that can be configured to drive an output or
    generate an interrupt or ADC event.
  • The TM4C123GH6PM microcontroller provides two
    independent integrated analog comparators.

49
Development tools
  • ARM Processor

50
IDE is A TOOL
  • Code Composer Studio is more than a compiler. CCS
    contains many tools
  • Debugger
  • Editor
  • Disassembler
  • GUI
  • Simulator
  • Drivers / Libraries
  • Examples
  • Optimization Published 1988
    Published 2012

51
Syllabus
Day 1 - 830 am Introduction / Survey - 915
am What is a Microcontroller - 945
am Compiler and C as Tools - 1015 am Break -
1030 am Lab 1 Load Software - 1100 am Lab 2
White Light - 1200 pm Lunch - 100 pm C
Syntax, Compilers, Basic C Statements,
Preprocessor - 200 pm Lab 3 Blinking Light
and Preprocessor - 300 pm Lab 4 LED and
Counter
52
Start the Learning
The key from this workshop is to learn what you
need to know to successfully teach with
Microcontrollers
53
Lab 1 Overview
  • Provides you with an introduction to the design
    tools
  • Steps you through the design tool installation
    process
  • Loading and licensing the software

54
Lab 2 Overview
  • Turn on a light
  • Still only using the Tiva LaunchPad
  • Change the color

55
Syllabus
Day 1 - 830 am Introduction / Survey - 915
am What is a Microcontroller - 945
am Compiler and C as Tools - 1015 am Break -
1030 am Lab 1 Load Software - 1100 am Lab 2
White Light - 1200 pm Lunch - 100 pm C
Syntax, Compilers, Basic C Statements,
Preprocessor - 200 pm Lab 3 Blinking Light
and Preprocessor - 300 pm Lab 4 LED and
Counter
56
Lunch
  • Talking ATE
  • Proposals are due in October, 2014

57
Advanced Technological Education (ATE)
Synopsis of Program With an emphasis on two-year
colleges, the Advanced Technological Education
(ATE) program focuses on the education of
technicians for the high-technology fields that
drive our nation's economy. The program involves
partnerships between academic institutions and
employers to promote improvement in the education
of science and engineering technicians at the
undergraduate and secondary school levels. The
ATE program supports curriculum development
professional development of college faculty and
secondary school teachers career pathways to
two-year colleges from secondary schools and from
two-year colleges to four-year institutions and
other activities. Another goal is articulation
between two-year and four-year programs for K-12
prospective teachers that focus on technological
education. The program also invites proposals
focusing on research to advance the knowledge
base related to technician education.
58
ATE Video
What is ATE? Video
59
Advanced Technological Education (ATE)
Cognizant Program Officer(s) Please note that
the following information is current at the time
of publishing. See program website for any
updates to the points of contact.
V. Celeste  Carter vccarter_at_nsf.gov 703-292-4651   
David  B. Campbell dcampbel_at_nsf.gov (703) 292-5093  885 S  
David  R. Brown drbrown_at_nsf.gov (703) 292-8831  835 N  
Connie  K. Della-Piana cdellapi_at_nsf.gov (703) 292-5309  835 N  
R. Corby  Hovis chovis_at_nsf.gov (703) 292-4625  835 N  
60
Advanced Technological Education (ATE)
Synopsis of Program With an emphasis on two-year
colleges, the Advanced Technological Education
(ATE) program focuses on the education of
technicians for the high-technology fields that
drive our nation's economy. The program involves
partnerships between academic institutions and
industry to promote improvement in the education
of science and engineering technicians at the
undergraduate and secondary school levels. The
ATE program supports curriculum development
professional development of college faculty and
secondary school teachers career pathways to
two-year colleges from secondary schools and from
two-year colleges to four-year institutions and
other activities. Another goal is articulation
between two-year and four-year programs for K-12
prospective STEM teachers that focus on
technological education. The program invites
research proposals that advance the knowledge
base related to technician education.
61
Anticipated number, size, and duration of new
awards
  • Anticipated number, size, and duration of new
    awards
  • ATE Projects approximately 20-35 new awards,
    ranging from 25,000 to 300,000 per year and
    having a duration of up to three years, except
    for ATE-Coordination Network projects, which may
    be up to 200,000 per year for four years.
  • ATE small grants for institutions new to the ATE
    program approximately 12-20 awards for up to
    200,000 (each) typically spread over three
    years. It is expected that the budget request
    will match the scope of the project.
  • New national center proposals will be considered
    only if a compelling case that there is a
    national need for a center in the particular
    technology and that the proposed center does not
    duplicate in any substantial way an existing
    national center or nationally-coordinated
    activities in the same technology (see text above
    under national centers). National centers funding
    will be 4 million spread over five years, with
    the possibility of a competitive grant renewal
    for 4 million over an additional five years.
  • Regional Centers of Excellence up to 2 new
    awards for up to 3 million (each) spread over
    four years, with the possibility of a competitive
    grant renewal, normally at a lower level of
    annual funding, for an additional three years.
  • Support Centers up to 2 new awards for up to
    1.6 million (each) spread over four years with
    the possibility of a competitive grant renewal.
  • Planning Grants for Centers up to 2 new awards
    for up to 70,000 (each) to develop
    well-formulated plans for future national and/or
    regional centers (see Section V.A "Proposal
    Preparation" for additional information).
  • Targeted Research on Technician Education up to
    5 new awards, ranging from 150,000 total for up
    to 2 years to 800,000 total for up to 3 years.

62
Other Stuff
Proposals due 9 October External Evaluator 2
year important We consult Paperwork takes
forever Serve as proposal evaluator Letters of
support
63
Publications
Legend 1Really Important 2Important 3Cool
to Know
64
1 SW-TM4C-DRL-UG-2.1.0.12573.pdf
  • This document describes the most common
    peripherals available on the chip. The library
    functions that are included with TivaWare to run
    the peripherals are also included.
  • 700 pages on ever peripheral including CAN, AES,
    LCD, DES, UART, .

65
1 SW-TM4C-EXAMPLES-UG-2.1.0.12573
  • The document provides example code and
    descriptions for basic peripheral use and
    applications. Goes along with the project code
    included in your installation.

66
1 SW-TM4C-RLN-2.1.0.12573
  • Release notes are good to check for
    troubleshooting and debug purposes. Sometimes
    the function calls will be modified between
    releases and this is a great place to begin to
    look for problem/solutions
  • Note it is not required to use the latest
    release of TivaWare for every application use
    what works

67
2 SW-TM4C-BOOTLDR-UG-2.1.0.12573
  • This document describes how to use the boot
    loader and the various features it offers.

68
2 SW-TM4C-IQMATH-UG-2.1.0.12573
  • IQ Math document provides additional math
    functions that are not included in the standard C
    library.

69
2 SW-TM4C-SENSORLIB-UG-2.1.0.12573
  • The sensor library provides many functions to
    control third party sensors that can be connected
    to the Tiva board.
  • 160 pages of how to work with a wide variety of
    sensors
  • Note that not all sensors are created by TI.

70
2 SW-TM4C-TOOLS-UG-2.1.0.12573
  • The tools user guide provide additional
    information on the development environment

71
2 SW-TM4C-USBL-UG-2.1.0.12573
  • USB is a dedicated document for the USB function
    on the Tiva board. While USB is a standard, it
    is more involved than a UART.

72
3 SW-TM4C-GRL-UG-2.1.0.12573
  • The graphics library provides functions to
    translate and display graphics options to use
    resistive touch screens and there are multiple
    booster packs that take advantage of this.

73
3 SW-TM4C-NFCLIB-UG-2.1.0.12573
  • The NFC library provides functions to control
    near field communications chips. NFC is the new
    RF ID. Think ApplePay on the new iWatch. The
    common chip is from NXP

74
3 SW-TM4C-UTILS-UG-2.1.0.12573
  • The utilities document is an extension of the
    tools document and describes additional utilities
    for debugging, programming, operations and
    applications.

75
Syllabus
Day 1 - 830 am Introduction / Survey - 915
am What is a Microcontroller - 945
am Compiler and C as Tools - 1015 am Break -
1030 am Lab 1 Load Software - 1100 am Lab 2
White Light - 1200 pm Lunch - 100 pm C
Syntax, Compilers, Basic C Statements,
Preprocessor - 200 pm Lab 3 Blinking Light
and Preprocessor - 300 pm Lab 4 LED and
Counter
76
C Programming Language
  • ARM Processor

77
Basic C
  • Variables and Datatypes
  • Arithmetic Expressions
  • Relational and Logical Operators
  • Bitwise operators
  • Conditional statements
  • Loops
  • Functions
  • Pointers

78
Variables and Data types
  • Variables store bits of data, the size depends on
    the data type.
  • Missing data types are bool and bit. These are
    typically handled differently by the compiler.

79
Arithmetic Expressions
80
Relational and Logical Operators
These operations always return a Boolean result
aka True/False , On/Off. NOTE False is any
zero value, and True is a non-zero value.
81
Bitwise Operators
Bitwise Operations work on each bit within a
given value
82
Conditional Statements
  • Conditional Statements execute ONLY when a
    certain condition is evaluated as true, or tested
    to be a specific value.
  • if(condition)
  • else
  • switch(value)
  • case value1
  • break
  • case value2
  • break
  • default
  • break

83
Loops
  • Loops involve a code block that will continue
    running in a loop while a current condition is
    evaluated to be true.
  • While(condition)
  • For((initialize) (condition) (after loop))

Notice that each example contains a while(1)
loop. If this code block was not there, the code
will execute only once.
84
Functions
  • Functions allow you to separate you code into
    small chunks that are intended to accomplish a
    specific task.
  • All programs begin with the main() function
  • Functions must be declared before the main
    function. This is called a prototype.
  • All functions that call another function, must be
    declared below the called function.

85
Pointers
  • Pointers are variables that contain the memory
    address of a specific value.
  • Pointer bit size depends on the architecture of
    the hardware used.
  • Pointers are usually the most confusing subject
    for those new to programming. There is even books
    dedicated to the proper use of pointers.
  • We will cover pointers in the labs as they come
    up.

86
Preprocessor
  • The C preprocessor, is a macro processor that is
    used automatically by the C compiler to transform
    your program before compilation.
  • The Preprocessor allows the developer to organize
    code to make it more readable, portable, and
    reusable.
  • All statements that begin with are handled by
    the Preprocessor before the compiler is invoked.

87
C Syntax
  • All define are in all CAPS
  • All functions begin with a capital letter
  • All variables are lower case
  • Indent one tab for all sub block code (eg. All
    code between )
  • Keep all code related to a particular task
    together. Dont create patchy code.
  • Comment, Comment, Comment!!!

88
Syllabus
Day 1 - 830 am Introduction / Survey - 915
am What is a Microcontroller - 945
am Compiler and C as Tools - 1015 am Break -
1030 am Lab 1 Load Software - 1100 am Lab 2
White Light - 1200 pm Lunch - 100 pm C
Syntax, Compilers, Basic C Statements,
Preprocessor - 200 pm Lab 3 Blinking Light
and Preprocessor - 300 pm Lab 4 LED and
Counter
89
Lab 3 Overview
  • Blinking Light and Preprocessor

90
Next Project
91
Lab 4 Overview
  • LED and Counter

92
Syllabus
Day 1 - 830 am Introduction / Survey - 915
am What is a Microcontroller - 945
am Compiler and C as Tools - 1015 am Break -
1030 am Lab 1 Load Software - 1100 am Lab 2
White Light - 1200 pm Lunch - 100 pm C
Syntax, Compilers, Basic C Statements,
Preprocessor - 200 pm Lab 3 Blinking Light
and Preprocessor - 300 pm Lab 4 LED and
Counter
93
Day 2
  • Recap yesterday events

94
Syllabus
Day 2 - 830 am Recap of Day 1 - 900
am Functions and Libraries - 1000 am Lab 5
Interrupts - 1100 am Lab 6 UART - 1200
pm Lunch - 100 pm Lab 7 Accelerometers -
200 pm Lab 8 Temp Sensor - 300 pm Lab 9
OLED / Final Project - 345 pm Microcontroller
peripherals - 400 pm Support System (Software
Wiki, etc.) - 430 pm Implementation /
Adaption Plan / Issues at schools - 500
pm Conclusions / Feedback / Survey
95
Functions
  • A function is a block of code that has a name and
    it has a property that is reusable (i.e. it can
    be executed from as many different points in a C
    program as required
  • A function groups a number of program statements
    into a unit and gives it a name.
  • Functions give the ability for code segmented
    into modules or black boxes

96
Libraries
  • A C library is a set of named functions. Some
    libraries are part of the C language standard.
    There are static and dynamic libraries
  • Static Libraries are part of the build
    environment
  • Dynamic Libraries are part of the run-time
    environment
  • .h files or header files include functional
    prototypes and declarations (not definitions) of
    functions
  • The .h file is used to generate a library

97
Lab 5 Overview
  • Interrupts airbag or stereo

98
Lab 6 Overview - UART Implementation
  • According to wikipedia A universal
    asynchronous receiver/transmitter, abbreviated
    UART, is a piece of computer hardware that
    translates data between parallel and serial
    forms. UARTs are commonly used in conjunction
    with communication standards such as EIA, RS-232,
    RS-422 or RS-485. The universal designation
    indicates that the data format and transmission
    speeds are configurable. The electric signaling
    levels and methods (such as differential
    signaling etc.) are handled by a driver circuit
    external to the UART.
  • A UART is usually an individual (or part of an)
    integrated circuit used for serial communications
    over a computer or peripheral device serial port.
    UARTs are now commonly included in
    microcontrollers.

99
Lunch
  • Documentation
  • TivaWare
  • Tutorials
  • Software Installation
  • Online Resources

100
TivaWare Documentation
101
TivaWare Documentation
  • You only care about the files with TM4C123 in
    them

102
Lab 7 Overview - Accelerometer
  • Accelerometer This device is on the Orbit
    board.

Y X Z
103
Lab 7 Overview
  • What is an accelerometer? An accelerometer is an
    electromechanical device that will measure
    acceleration forces. These forces may be static,
    like the constant force of gravity pulling at
    your feet, or they could be dynamic - caused by
    moving or vibrating the accelerometer.
  • What are accelerometers useful for? By measuring
    the amount of static acceleration due to gravity,
    you can find out the angle the device is tilted
    at with respect to the earth. By sensing the
    amount of dynamic acceleration, you can analyze
    the way the device is moving. At first, measuring
    tilt and acceleration doesn't seem all that
    exciting. However, engineers have come up with
    many ways to make really useful products with
    them.

104
(No Transcript)
105
Lab 8 Overview
  • Temp Sensor with a UART

106
Dont get frustrated
The project may not be successful for each person
each time. Dont get frustrated. The process is
simple but it is often easy to make simple
mistakes.
107
Lab 9 Overview
  • Final Project
  • Suggestions
  • Output Temp sensor data to the LEDs on the Orbit
    board
  • Output Accelerometer data to the UART

108
Impediments to Implementation
  • Hurdles we have seen
  • We have always done it this way
  • Hurdles you might see
  • Fear factor

109
Additional Materials
  • Here is the link for our tutorials
  • http//cosmiac.org/Projects_Micro.html
  • Here is a link for an advanced TI ARM series of
    tutorials and workshops.
  • http//processors.wiki.ti.com/index.php/Getting_St
    arted_with_the_Stellaris_EK-LM4F120XL_LaunchPad_Wo
    rkshop

110
The Teams Plan
  • Develop Instructional Material
  • Train Faculty

111
Collaboration
  • We do collaborations very well
  • Small Grants for Institutions New to the ATE
    Program
  • Project Proposals

112
Developing Curriculum
  • Lab1 Intro SW Install
  • Lab 2 LED
  • Lab 3 Blink LED
  • Lab 4 Switches Buttons
  • Lab 5 Interrupts
  • Lab 6 UART
  • Lab 7 Accelerometer
  • Lab 8 Temp Sensor
  • Lab 9 OLED
  • Lab 10 EEPROM
  • Lab 11 ADC
  • Lab 12 Graphic Display Module

113
Moving Forward
  • Different Development Platforms
  • Additional resources and examples
  • Different architectures
  • Operating Systems
  • Higher level languages
  • Object Oriented language

114
Conclusions
115
Painful survey
We need your help in statistics. We will be
contacting you!
116
APPENDIX
117
(No Transcript)
118
(No Transcript)
About PowerShow.com