Lab Initialization, GPIO, Basic Scheduling
Lab Initialization, GPIO, Basic Scheduling
Lab Initialization, GPIO, Basic Scheduling
Spring 2020
Lab # 1
Initialization, GPIO, Basic Scheduling
Please note: This is only a suggestion/proposal to help you put together the lab report,
the template/format can be changed per lab expectations. Please edit this document as
needed
Honor code:
Student Name::
School ID #
Submission Date:
Lab # 1
1. Experimental Objective:
The objective of this lab is to
Understand General architecture & Key features of the EVB and the
microcontroller.
Familiar with the Concepts of microcontroller pins (IOs) and usage Pins:
First foot in the door exposure to the programming of I/O, which when executed
by the microcontroller (32-bit TM4C1294NCPDT) simply blinks LED located on
the development board.
2. Equipment required:
32-bit TM4C1294NCPDT Microcontroller
3. Methodology/Design:
A microcontroller (MCU or μC) is a small integrated circuit device which is used to
control whole portion of electronic system. Micro-controller is a basic computer
system on a chip. They are used in many automatically controlled devices, such as
remote controls, power tools appliances, and toys. Microcontrollers electronically
controls many more processes by reducing the size, cost, power consumption and
cost as compared to other designs. A microcontroller is a single integrated circuit,
commonly with the following features:
• Central processing unit - The central processing unit functions like managing
data flow, arithmetic operations and generates control signals in accordance with the
sequence of instructions created by the programmer. It ranges from small and
simple 4-bit processors to 32- or 64-bit processors
• Input/output interfaces such as serial ports (UARTs)
• Other serial communications interfaces like I²C, Serial Peripheral Interface and
Controller Area Network for system interconnect
• Peripherals such as timers and watchdog
• RAM for data storage
• ROM, EPROM, EEPROM or Flash memory for program storage
• Clock generator - often an oscillator for a quartz timing crystal, resonator or RC
circuit
Input/output Ports
Microcontroller consists of one or more registers which are connected to the pins of
microcontroller. Usually, each I/O port is under control of another SFR, which means
that each bit of that register determines the state of the corresponding microcontroller
pin. To program a pin to be an output or an input, we simply send a 0 or a 1 to the
relevant bit in the TRISx register (0 for output and 1 for input) To make one of the output
pins high (+5v), we simply send a ‘1’ to the corresponding bit in PORTx register.
Flash memory
Memory of the microcontroller can be written and re-written many times the
microcontrollers with Flash ROM are ideal for learning, experimentation, and small-
scale manufacture. Because of its popularity, the most microcontrollers are
manufactured in flash versions today. So, if you are going to buy a microcontroller,
the type to look for is definitely flash.
Random Access Memory (RAM)
Random Access Memory is used for storing data and intermediate results during the
operation of the microcontroller temporarily. Once the power supply of the system
goes off, the contents of the memory become cleared.
Electrically Erasable Programmable ROM (EEPROM)
Like RAM, the contents of the EEPROM can be changed during the operation but
remains permanently saved even power is turned off. EEPROM usually used to
store values, during operation, which must be permanently saved. For example, if
you design an electronic lock or an alarm, it would be great to enable the user to
create and enter a password, but useless if it is lost every time the power supply
goes off. The ideal solution is the microcontroller with an embedded EEPROM.
4. Observation:
Structure of the Program
By using infinite toggling 28 bits loop of the address 0x2009C020, LED flashing code
is implemented after a certain delay. The shorter flowchart leads to smaller code size
and the longer flowchart translates to an inefficient code.
The overall structure of the program is shown in listing below which begins by
defining macros for the relevant register addresses. The main routine follows the
initialization steps described above then enters a loop in which it toggles an LED and
waits for some time.
5. Conclusion:
By completing this experiment, we have sufficient knowledge about architecture & Key
features of the EVB and the microcontroller. In this lab we explored different
components of (32-bit TM4C1294NCPDT) microcontroller which simply blinks LED
located on the development board