Você está na página 1de 149

Dr. N.G.P.

INSTITUTE OF TECHNOLOGY
COIMBATORE 641 048

DEPARTMENT OF
ELECTRONICS AND COMMUNICATION ENGINEERING

LABORATORY MANUAL

EC6711 - EMBEDDED LABORATORY


VII SEMESTER ECE

Prepared by

Mr. U. Vinothkumar, AP/ECE

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


EC6711 EMBEDDED LABORATORY LTPC
0032

OBJECTIVES: The student should be made to:

Learn the working of ARM processor


Understand the Building Blocks of Embedded Systems
Learn the concept of memory map and memory interface
Know the characteristics of Real Time Systems
Write programs to interface memory, I/Os with processor
Study the interrupt performance

LIST OF EXPERIMENTS

1. Study of ARM evaluation system


2. Interfacing ADC and DAC.
3. Interfacing LED and PWM.
4. Interfacing real time clock and serial port.
5. Interfacing keyboard and LCD.
6. Interfacing EPROM and interrupt.
7. Mailbox.
8. Interrupt performance characteristics of ARM and FPGA.
9. Flashing of LEDS.
10. Interfacing stepper motor and temperature sensor.
11. Implementing zigbee protocol with ARM.

OUTCOMES:
At the end of the course, the student should be able to:
Write programs in ARM for a specific Application
Interface memory and Write programs related to memory operations
Interface A/D and D/A convertors with ARM system
Analyze the performance of interrupt
Write programmes for interfacing keyboard, display, motor and sensor.
Formulate a mini project using embedded system

LIST OF EQUIPMENT FOR A BATCH OF 30 STUDENTS (3 students per batch)

1. Embedded trainer kits with ARM board 10 No.s


2. Embedded trainer kits suitable for wireless communication 10 No.s
3. Adequate quantities of Hardware, software and consumables

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 1 STUDY OF ARM EVALUATION SYSTEM

AIM
To study of ARM evaluation system using TI CC3200 Launch pad with Code Composer
Studio (CCS) Integrated Development Environment (IDE) and Interfacing Board with Terminal
Emulator Software.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI pinmux tool

THEORY
CC3200 Launch pad
The high performance CC3200 is the industry's first single-chip Microcontroller
(MCU) with built-in Wi-Fi connectivity for the LaunchPad ecosystem. Created for the Internet of
Things (IoT), the SimpleLink Wi- Fi CC3200 device is a wireless MCU that integrates a high-
performance ARM Cortex-M4 MCU allowing customers to develop an entire application with a
single IC. With on-chip Wi-Fi, internet and robust security protocols, no prior Wi-Fi experience is
needed for faster development.
The CC3200 LaunchPad is a low-cost evaluation platform for ARM Cortex-
M4F-based microcontrollers. The LaunchPad design highlights the CC3200 Internet-on-a-chip
solution and WiFi capabilities. The CC3200 LaunchPad also features programmable user buttons,
RGB LED for custom applications and onboard emulation for debugging. The stackable headers of
the CC3200 LaunchPad XL interface demonstrate how easy it is to expand the functionality of the
LaunchPad when interfacing with other peripherals on many existing BoosterPack add-on boards
such as graphical displays, audio codec, antenna selection, environmental sensing, and much more.
Figure 1 shows a photo of the CC3200 LaunchPad.

Key Features

CC3200, SimpleLink Wi-Fi, internet-on-a-chip solution with integrated MCU


40-pin LaunchPad standard that leverages the BoosterPack ecosystem
FTDI based JTAG emulation with serial port for Flash programming
Two buttons and three LEDs for user interaction
Backchannel universal asynchronous receiver/transmitter (UART) through USB to PC
On-board chip antenna with U.FL for conducted testing
On-board accelerometer and temperature sensor for out-of-box demo
Micro USB connector for power and debug connections

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


HARDWARE DESCRIPTION

Figure 1: CC3200 Launch pad

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


BLOCK DIAGRAM

Figure 2: CC3200 Block Diagram

HARDWARE FEATURES
1. CC3200, Simple Link Wi-Fi, internet-on-a-chip solution with integrated MCU40-pin
Launchpad standard that leverages the Booster Pack ecosystem.
2. FTDI-based JTAG emulation with serial port for Flash programming
a. Supports both 4-wire JTAG and 2-wire SWD(Serial Wire Debug)
3. Two buttons and three LEDs for user interaction .Virtual COM port UART through USB on
PC.
4. On-board chip antenna with U.FL (miniature RF connector) for conducted testing.
5. On-board accelerometer and temperature sensor for out-of-box demo with option to isolate
them from the inter-integrated circuit (I2C) bus.
6. Micro USB connector for power and debug connections.
7. Headers for current measurement and external JTAG connection.
8. Bus-powered device with no external power required for Wi-Fi.
9. Long range transmission with highly optimized antenna (200m typical in open air with a 6dBi
antenna AP).
10. Can be powered externally, with 2xAA or 2xAAA alkaline batteries working down to 2.3V
typical.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


CONNECTING A BOOSTER PACK
A compatible Booster Pack can be stacked on top of the Launchpad using the 2x20 pin
connectors. Note that the connectors do not have a key to prevent the misalignment of the pins or
reverse connection.
Ensure that Vcc and 5V pins, are aligned with the Booster Pack header pins. On the
CC3200 Launchpad, a small white triangle symbol is provided near P1 (see Figure 3) to orient all
Booster Packs. This same marking, provided on compatible Booster Packs, needs to be aligned
before powering up the boards.

Figure 3: P1 marking on the Launchpad (white triangle)

INTERFACING BOARD
Top View:

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Bottom View:

Code Composer Studio

Overview
Code Composer Studio (CCS) is the integrated development environment for the whole
span of TI Microcontrollers, DSPs and application processors. Code Composer Studio includes a
suite of tools used to develop and debug embedded applications. For all device families, CCS
includes compilers, source code editor, project build environment, debugger, profiler, simulators
and many other features.

CCS Functional Overview


The CCS supports all the phases of the development cycle: design, code and build, debug.
The CCS includes all the development tools - compilers, assembler, linker, debugger, BIOS and
one target - the Simulator as shown in Figure.

The C compiler converts C source code into assembly language source code.
The assembler translates assembly language source files into machine language object files.
The standard run-time libraries contain ANSI standard run-time-support functions, compiler-
utility functions, floating-point arithmetic functions and I/O functions that are supported by the
C compiler.
The linker combines object files, library files and system or BIOS configuration files into a
single object module. The .out file is the executable program for the target device.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


The debugger supports debug activities such as watching variables, graphing signals on the
target, viewing the memory and call stack, etc. The .gel files initialize the debugger with
address of memory, peripherals and other hardware setup details.
The program code can be debugged on the simulator or emulator or the target device based
on the target config file (.ccxml) that specifies the connection to the target.

Figure 4: CCS FUNCTIONAL OVERVIEW

CCS Perspectives
The Code Composer GUI has two perspectives:
The Edit Perspective
The Debug Perspective

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


WORKSPACES AND PROJECTS:
A workspace contains your settings and preferences, as well as links to your projects.
Deleting projects from the workspace deletes the links, not the files. A project contains your build
and tool settings, as well as links to your input files. Deleting files from the workspace deletes the
links, not the files.

CREATE A NEW PROJECT


A project contains all the files you will need to develop an executable output file (.out)
which can be run on the CC3200 hardware.
Step 1: Create a New Project from Project New Project
Select the Target as Wireless connectivity MCU,CC3200
Choose the Connection as Stellar is In-Circuit Debug Interface
Give a relevant Project name
Click on Finish to create the new project.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Step 2: (i) Go to Properties from Project Properties
Click on Include Options under ARM Compiler
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


(ii) ARM Linker-->File search path-->Add

C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a

Code Composer will add the named project to your workspace and display it in the Project
Explorer panel. Based on your template selection, it will also add a file called main.c, main.asm
and open it for editing. Type in your Program Code in the main.c/ main.asm file and save it.CCS
can automatically save modified source files, build the program, open the debug perspective view,
connect and download it to the target (flash device), and then run the program to the beginning of

the main function. To do this, click on the Debug button.

When the Ultra-Low-Power Advisor (ULP Advisor) appears, click the Proceed button.
When the download completes, CCS is in the Debug perspective. Notice the Debug tab in the upper
right-hand corner indicating that we are now in the CCS Debug view. Click and drag the
perspective tabs to the left until you can see all of both tabs. The program ran through the C-
environment initialization routine in the runtime support library and stopped at main() in main.c.

DEBUG ENVIRONMENT
The basic buttons that control the debug environment are located in the top of the Debug
pane. If you ever accidentally close the pane, your Debug controls will vanish.

View Debug on the menu bar.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Please feel to explore by clicking each button to see its function.

At this point your code should be at the beginning of main(). Look for a small blue arrow
left of the opening brace of main() in the middle window. The blue arrow indicates where the
Program Counter (PC) is pointing to.

Click the Resume button to run the code.

Click Suspend The code should stop somewhere in the middle of the program.

TERMINATE DEBUG SESSION AND CLOSE PROJECT

The Terminate button will terminate the active debug session, close the debugger and
return CCS to the CCS Edit perspective. It also sends a reset to the Launchpad board.
NOTE FOR ALL EXPERIMENTS:
1. Make sure your Launch Pad USB DEBUG port is connected to your PC
2. The chosen project for the experiment is active.
3. Build the project by clicking the Debug button on the menu bar
4. If there is a warning that the project was created with an earlier compiler version for
experiments which are taken from the library, it can be safely ignored.
5. When you import the project, it will be automatically copied into your workspace,
preserving the original files
6. All the modifications done are in the local workspace and does not get reflected on to the
CC3200-sdk folder. So you can safely do modifications save and always retrieve the demo
code from CC3200-sdk.
7. If you delete the project, accidentally or intentionally in the CCS the project in the
workspace is only deleted and the imported project stays intact in you workspace.
8. In the dialog box it is also possible to delete files from the disk which will erase the files
from the library but that is a general OS file delete operation and should not be attempted.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Defining Port location and Tera Term setup

Com Ports location

Device manager is needed to check on the ports being used and what is being initialized

Right click my Computer


Under Properties and left click to enter the Device Manager.

Accessing Device Manager look for the port

Example (com3) Serial on USB Port.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Accessing TeraTerm

Using Tera Term for RS232

Download TERA TERM if the PC doesnt have a RS232 program already.


Click on Tera Term and a window will pop up asking about a new connection
USING TERATERM AS A SERIAL TERMINAL:
1. Teraterm is an open source freely downloadable terminal emulator software used for
testing serial communication. Download the software from the Internet and run the
same.
2. Open Teraterm program and Select Serial Port. The corresponding port to which the
CC3200 is connected in the Tera Term is displayed in the New Connection Window.
The Serial Port option is enabled only if the CC3200 Drivers are properly installed else
it stays at TCP/IP.
3. The Serial Port number will differ based on the USB to Serial Emulation and the
connectivity.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


4. The port is opened with a default Baud Rate of 9600. Change the Baud Rate by
selecting Setup -> Serial Port. Change the required Serial Port Setup parameters like
Baud Rate, Data bits, Parity, Stop Bit.

RESULT:
Thus the study of ARM evaluation system using TI CC3200 Launch pad with Code
Composer Studio (CCS) Integrated Development Environment (IDE) and Interfacing Board with
Terminal Emulator Software was done successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What is ARM stands for?


ARM, originally Acorn RISC Machine, later Advanced RISC Machine

2. What is mean by RISC?


RISC- Reduced Instruction Set Computing. A RISC-based computer design approach
means processors require fewer transistors than typical complex instruction set computing
(CISC) x86 processors in most personal computers.

3. What is the Abbreviation for CISC?


CISC-Complex Instruction Set Computing.

4. Who Developed the ARM?


The British computer manufacturer Acorn Computers first developed the Acorn RISC
Machine architecture (ARM) in the 1980s to use in its personal computers.

5. What is the acronym of MIPS?


MIPS (originally an acronym for Microprocessor without Interlocked Pipeline Stages) is
a reduced instruction set computer (RISC) instruction set architecture (ISA) developed by MIPS
Technologies (formerly MIPS Computer Systems, Inc.).

(OR)

MIPS-million instructions per second (MIPS)

6. What is ARM Cortex-M Stands for?


The ARM Cortex-M is a group of 32-bit RISC ARM processor cores licensed by ARM
Holdings. The cores are intended for microcontroller use, and consist of the Cortex-M0, M0+,
M1, M3, M4, and M7.

7. What are all the key features of Cortex-M3?


Key features of the Cortex-M3 core are:
ARMv7-M architecture
3-stage pipeline with branch speculation.
Instruction sets:
Thumb (entire).
Thumb-2 (entire).
32-bit hardware multiply with 32-bit or 64-bit result, signed or unsigned, add or
subtract after the multiply.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


32-bit hardware divide (2-12 cycles).
Saturation arithmetic support.
1 to 240 interrupts, plus NMI.
12 cycle interrupt latency.
Integrated sleep modes.

8. What is Thumb instruction in ARM?


To improve compiled code-density, processors since the ARM7TDMI (released in 1994)
have featured the Thumb instruction set, which have their own state. (The "T" in "TDMI"
indicates the Thumb feature.) When in this state, the processor executes the Thumb instruction
set, a compact 16-bit encoding for a subset of the ARM instruction set. Most of the Thumb
instructions are directly mapped to normal ARM instructions. The space-saving comes from
making some of the instruction operands implicit and limiting the number of possibilities
compared to the ARM instructions executed in the ARM instruction set state.
9. What is pipe-line in terms of computing?
In computing, a pipeline is a set of data processing elements connected in series, where the
output of one element is the input of the next one. The elements of a pipeline are often executed
in parallel or in time-sliced fashion; in that case, some amount of buffer storage is often inserted
between elements.
10. What is Thumb-2 instruction in ARM?
Thumb-2 technology was introduced in the ARM1156 core, announced in 2003. Thumb-2
extends the limited 16-bit instruction set of Thumb with additional 32-bit instructions to give the
instruction set more breadth, thus producing a variable-length instruction set. A stated aim for
Thumb-2 was to achieve code density similar to Thumb with performance similar to the ARM
instruction set on 32-bit memory.
11. What is the technology behind the thumb-2 instruction?
Thumb-2 extends the Thumb instruction set with bit-field manipulation, table branches and
conditional execution. At the same time, the ARM instruction set was extended to maintain
equivalent functionality in both instruction sets. A new "Unified Assembly Language" (UAL)
supports generation of either Thumb or ARM instructions from the same source code; versions
of Thumb seen on ARMv7 processors are essentially as capable as ARM code (including the
ability to write interrupt handlers).
12. Define Code Density?

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Code density - Computer Definition. The amount of space that an executable program takes
up in memory. Code density is important in mobile devices that contain a limited amount of
memory
13. What is Microcode?
Microcode is "a technique that imposes an interpreter between the hardware and the
architectural level of a computer." As such, the microcode is a layer of hardware-level
instructions that implement higher-level machine code instructions or internal state
machine sequencing in many digital processing elements.
14. Define Atomicity.
In concurrent programming, an operation (or set of operations)
is atomic, linearizable, indivisible or uninterruptible if it appears to the rest of the system to
occur instantaneously. Atomicity is a guarantee of isolation from concurrent processes.
Additionally, atomic operations commonly have a succeed-or-fail definitionthey either
successfully change the state of the system, or have no apparent effect
15. What is Load/Store instruction?
In computer engineering, a load/store architecture divides instructions into 2
categories: memory access (load and store between memory and registers), and ALU operations
(which only occur between registers);RISC systems such as PowerPC, SPARC, RISC-
V, ARM or MIPS use the load/store architecture.
16. What is ARM license?
ARM Holdings neither manufactures nor sells CPU devices based on its own designs, but
rather licenses the processor architecture to interested parties. ARM offers a variety of licensing
terms, varying in cost and deliverables. To all licensees, ARM provides an integratable hardware
description of the ARM core, as well as complete software development toolset and the right to
sell manufactured silicon containing the ARM CPU.
17. What are the applications of ARM Core?
ARM cores are used in a number of products, particularly PDAs and smartphones.
Some computing examples are Microsoft's first generation Surface and Surface 2, Apple's iPads,
and Asus's Eee Pad Transformer tablet computers. Others include Apple's iPhone
smartphone and iPod portable media player, Canon Power Shot digital cameras, Nintendo
DS handheld game consoles and TomTom turn-by-turn navigation systems.
18. What is predication in ARM?
Almost every ARM instruction has a conditional execution feature called predication, which
is implemented with a 4-bit condition code selector (the predicate). To allow for unconditional

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


execution, one of the four-bit codes causes the instruction to be always executed. Most other
CPU architectures only have condition codes on branch instructions.
19. What is Coprocessor?
The ARM architecture (pre-ARMv8) provides a non-intrusive way of extending the
instruction set using "coprocessors" that can be addressed using MCR, MRC, MRRC, MCRR,
and similar instructions.
20. Define IDE.
An integrated development environment (IDE) is a software application that provides
comprehensive facilities to computer programmers for software development. An IDE normally
consists of a source code editor, build automation tools and a debugger. Most modern IDEs have
intelligent code completion.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 2(a) ADC INTERFACING WITH ARM PROCESSOR
AIM
To interface the ADC (POT) with the TI CC3200 Launch Pad using CCS IDE & TI
pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI pinmux tool

THEORY
Analog to Digital Converter (ADC)

The ADC peripheral converts a continuous analog voltage into a discrete digital number. The
CC3200 device includes ADC modules with four input channels. Each ADC module features 12-
bit conversion resolution for the four input channels.

Features include:

Number of bits: 12-bit


Effective nominal accuracy: 10 bits
Four analog input channels
Automatic round-robin sampling
Fixed sampling interval of 16 s per channel
Automatic 16-bit time-stamping of every ADC samples based on the system clock
Dedicated DMA channel to transfer ADC channel data to the application RAM.
The CC32xx device has an internal ADC which is rated to work at 500Ksps at 12bits
resolution

The CC32xx device has an internal ADC which is rated to work at 500Ksps at 12bits resolution.
The ADC has 8 analog inputs which are multiplexed and out of these 4 are available for the user
on external pins while the remaining 4 are used for internal signals
This creates an effective sampling rate at each pin to be 500/8 = 62.5KHz
These are available on pins 57, 58, 59, 60. Out of these pin 57 is used as UART on the
Launchpad, so this pin is not readily available while debugging.
These pins are 4 alternate pins of the ADC input mux to ensure that the pins are sampled at a
regular interval.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Another important fact to consider is that the internal ADC is continuously kept sampling and
the 8 inputs are sampled in a round robin method. i.e. the ADC samples input1, input2 .... input
8, input 1..... Continuously. The user has the only option to connect and disconnect this ADC pin
to external pin of the device.
Once connected to the external pin, the ADC continuously samples the pin and the contents are
available to be read out using the corresponding API.

PROCEDURE:
1. Connect the Embedded lab kit to PC using USB cable. Jumper position for ADC(POT)

2. Open Code Composer Studio CCS V6.1.1

3. File-->New -->CCS Project

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


4. Select the Target--> Wireless connectivity MCU, CC3200,

Connection-->Stellaris In-Circuit Debug Interface

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


5. Replace the code of main.c with the respective ADC code.

6. Open TI Pinmux tool. Select the Device CC3200 and click the start button .Select the pin 58
using TI Pin configuration tool.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


7. Select the pin 58 using TI Pin configuration tool. Download the driverlib of the pin mux
config.c and pinmux config.h .

8. Copy and paste the pin_mux_config.c and pin_mux_ config.h in ADC

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


9. Change the properties of the program,

General-->Build-->ARM compiler-->Add

C:\ti\CC3200-SDK\cc3200sdk\driverlib

C:\ti\CC3200-SDK\cc3200sdk\inc

C:\ti\CC3200-SDK\cc3200sdk\example\common

10. ARM Linker-->File search path-->Add

C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


11. Build and debug the program.

12. Resume the main.c code.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


13. Right click the ADC select the open Declaration .See the output in Expressions.

14. Change the POT values and see the changing ADC values in Expression.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM
// ADC

// IC Pin | ADC_CH | Port | Value


//---------------------------------------
// 58 | ADC_CH1 | A0.3| 0X08

#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>

// Driverlib includes
#include "utils.h"
#include "hw_memmap.h"
#include "hw_common_reg.h"
#include "hw_types.h"
#include "hw_adc.h"
#include "hw_ints.h"
#include "hw_gprcm.h"
#include "rom.h"
#include "rom_map.h"
#include "interrupt.h"
#include "prcm.h"
#include "pin.h"
#include "adc.h"

#include "hw_gpio.h"
#include "gpio.h"

float ADC;
float readADC(unsigned long uiAdcInputPin);

void main()

{
PRCMPeripheralClkEnable(PRCM_ADC, PRCM_RUN_MODE_CLK);
ADCTimerConfig(ADC_BASE,2^17);
ADCTimerEnable(ADC_BASE);
ADCEnable(ADC_BASE);
PinTypeADC(PIN_58, 0XFF);
ADCChannelEnable(ADC_BASE, ADC_CH_1);

while(1)
{

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


ADC=readADC(PIN_58);

}
}

float readADC(unsigned long uiAdcInputPin)

{
unsigned long ulSample;
UtilsDelay(800000);
if(MAP_ADCFIFOLvlGet(ADC_BASE, ADC_CH_1))
{
ulSample = MAP_ADCFIFORead(ADC_BASE, ADC_CH_1);
ulSample = (ulSample & 0x3ffc)>>2;
}
return ulSample;
}

RESULT:
Thus the interfacing of ADC (POT) using TI CC3200 Launch pad with Code Composer
Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What is an embedded system? Differentiate between embedded system and real-time


system.
An embedded system is some combination of computer hardware and software, either
fixed in capability or programmable, that is specifically designed for a particular function.
Real-time systems are the ones that are designed to provide a result within a specific
time-frame.

2. State the Three Types of RTS?


Hard Real Time System
Firm Real Time System
Soft Real Time System

3. Define Hard and Soft real-time system.

A hard real-time system (also known as an immediate real-time system) is hardware or


software that must operate within the confines of a stringent deadline. The application may
be considered to be failed if it does not complete its function within the allotted time span.
Examples of hard real-time systems include components of pacemakers, anti-lock brakes and
aircraft control systems.

A soft real-time system is a system where a critical real-time task gets priority over other
tasks and retains that priority until it completes. As in hard real time systems, kernel delays
need to be bounded.
4. Describe Trigger Generator?
The Trigger generator is a representation at the mechanism used to trigger the
execution of individual jobs. It is not really a separate hardware unit, typically it is a part of
an executive software. Many of the jobs are periodic i.e. they execute regularly. The schedule
for these jobs can be obtained offline and loaded as a look up table to be used by the
scheduler.

5. Define real time database and give its types.


A real-time database system is a database system in which a timely response to a user
request is needed.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


6. State the Types of Real-Time Database Systems.
Hard real-time database systems, e.g., safety-critical system such as an early warning
system, etc.
Soft real-time database systems, e.g., banking system,airline reservation system, digital
library, stock market system, etc.
Mixed real-time database systems, e.g., air traffic control system, etc.
7. What are the types of task classes in real time system?

There are five types of task classes:

(i)Periodic and aperiodic tasks


(ii) sporadic task
(iii) Critical task
(iv) Noncritical task

8. Define Periodic Task.


Periodic task: There are many tasks in real time systems that are done repetitively.
For example one may wish to monitor the speed altitude and attitude of an aircraft every 100
ms. this sensor information will be used by periodic tasks that control surfaces of the aircraft
in order to maintain stability and other desired characteristics. The periodicity of these tasks
is known to the designer, and much tasks can be pre-scheduled.

9. What is Aperiodic Task?


Aperiodic task: There are many other tasks that are aperiodic, that occur occasionally.
For instance, when the pilot wishes to execute a turn a large number of subtasks. Associated
with that action are self-off aperiodic tasks cannot be predicted and sufficient completing
power must be held in a reserve to execute them in a timely fashion.

10. What Critical Task?


Critical tasks: Critical tasks are those whose timely executions is critical; if deadlines
are missed, catastrophes occur. Example include life support systems and the stability
control of air craft. If critical tasks are executed at a higher frequency then it is absolutely
necessary.

11. What is non-critical Task?


Non critical tasks: Non critical tasks are real times tasks. As the name implies, they are
not critical to the application. However they do deal with time varying data and hence they

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


are useless if not completed within a deadline. The goal in scheduling these tasks is to
maximize the percentage of jobs successfully executed within their deadlines.

12. Define TargetOS.


TargetOS is a full-featured real-time operating system (RTOS) from Blunk Microsystems
designed specifically for embedded applications. TargetOS is fast, small, and preemptive. To
help reduce your time to market, TargetOS is integrated with development tools and off-the-
shelf board support packages. Custom board support packages and drivers are also available.

13. What are the benefits of TargetOS?


Benefits: Royalty Free, Source Code, Integrated with TargetTools, Integrated Event
Trace Tool, Board Support Packages and Device Drivers

14. Discuss issues in real time scenario.


Important issues regarding real-time systems are:
Recovering from Failures.
Working with distributed Architectures.
Asynchronous Communication
Race Conditions and Timing.
Real Time response.

15. What are the Advantages and disadvantages of using macro and inline functions?
Advantage: Macros and Inline functions are efficient than calling a normal function. The
times spend in calling the function is saved in case of macros and inline functions as these
are included directly into the code.
Disadvantage: Macros and inline functions increased the size of executable code.

16. What is the difference between inline functions and macro?


1) Macro is expanded by preprocessor and inline function are expanded by compiler.
2) Expressions passed as arguments to inline functions are evaluated only once while
_expression passed as argument to inline functions are evaluated more than once.
More over inline functions are used to overcome the overhead of function calls. Macros are
used to maintain the readability and easy maintenance of the code.

17. What is semaphore?


In computer science, a semaphore is a protected variable or abstract data type which
constitutes the classic method for restricting access to shared resources such as shared
memory in a parallel programming environment. A counting semaphore is a counter for a set
of available resources, rather than a locked/unlocked flag of a single resource.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


18. What is interrupt latency? How can we reduce it?
Interrupt latency is the time required to return from the interrupt service routine after
tackling a particular interrupt. We can reduce it by writing smaller ISR routines

19. What are the different types of semaphore?


There are two types of semaphores:
The binary semaphore which can take only 0,1 values. (used when there is contention for a
single resource entity)
The counting semaphore which can take incremental values to certain limit (used when
number of resources is limited).

20. What is the difference between microprocessor and microcontroller?


Microprocessor is a manager of the resources (I/O, Memory) which lie out-side of its
architecture.
Micro-controllers have I/O, Memory etc. built into it and specially designed for Control
applications

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp.No: 2(a) DAC INTERFACING WITH ARM PROCESSOR
AIM
To interface the DAC (POT) with the TI CC3200 Launch Pad using CCS IDE & TI
pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI pinmux tool

THEORY:
In electronics, a digital-to-analog converter (DAC, D/A, DA, D2A, or D-to-A) is a function
that converts digital data (usually binary) into an analog signal (current, voltage, or electric charge).
An analog-to-digital converter (ADC) performs the reverse function. Unlike analog signals, digital
data can be transmitted, manipulated, and stored without degradation, albeit with more complex
equipment. But a DAC is needed to convert the digital signal to analog to drive an earphone or
loudspeaker amplifier in order to produce sound (analog air pressure waves).

DACs and their inverse, ADCs, are part of an enabling technology that has contributed
greatly to the digital revolution. To illustrate, consider a typical long-distance telephone call. The
caller's voice is converted into an analog electrical signal by a microphone, then the analog signal
is converted to a digital stream by an ADC. The digital stream is then divided into packets where
it may be sent along with other digital data, not necessarily audio. The digital packets are then
received at the destination, but each packet may take a completely different route and may not
even arrive at the destination in the correct time order. The digital voice data is then extracted
from the packets and assembled into a digital data stream. A DAC converts this into an analog
electrical signal, which drives an audio amplifier, which in turn drives a loudspeaker, which
finally produces sound.

There are several DAC architectures; the suitability of a DAC for a particular application is
determined by six main parameters: physical size, power consumption, resolution, speed,
accuracy, cost. Due to the complexity and the need for precisely matched components, all but the
most specialist DACs are implemented as integrated circuits (ICs). Digital-to-analog conversion
can degrade a signal, so a DAC should be specified that has insignificant errors in terms of the
application.

DACs are commonly used in music players to convert digital data streams into analog audio
signals. They are also used in televisions and mobile phones to convert digital video data into
analog video signals which connect to the screen drivers to display monochrome or color images.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


These two applications use DACs at opposite ends of the speed/resolution trade-off. The audio
DAC is a low speed high resolution type while the video DAC is a high speed low to medium
resolution type. Discrete DACs would typically be extremely high speed low resolution power
hungry types, as used in military radar systems. Very high speed test equipment, especially
sampling oscilloscopes, may also use discrete DACs.

PROCEDURE:
1. Connect the Embedded lab kit to PC using USB cable.
2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name DAC
5. Replace the code of main.c with the respective DAC code.
6. Open the TI pinmux tool.
7. Select the pins 5,6,7,8 using TI pinmux tool. Download the driverlib of the pinmuxconfig.c
and pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in DAC code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the DAC main.c code.
12. Resume the main.c code.
13. Check the analog output in JP17 jumper using multimeter. The output voltage value is 1.6
volt.

PROGRAM:

#include <string.h>
#include "hw_types.h"
#include "hw_memmap.h"
#include "hw_common_reg.h"
#include "hw_ints.h"
#include "spi.h"
#include "rom.h"
#include "rom_map.h"
#include "utils.h"
#include "prcm.h"

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


#include "uart.h"
#include "interrupt.h"
#include "gpio.h"
#include "pin.h"
#include "pinmux.h"

#define SPI_IF_BIT_RATE 1000000


unsigned long ulUserData;

void main()
{
PinMuxConfig();
GPIOPinWrite(GPIOA3_BASE, 0x10, 0x10);
PRCMPeripheralClkEnable(PRCM_GSPI,PRCM_RUN_MODE_CLK);
PRCMPeripheralReset(PRCM_GSPI);
SPIReset(GSPI_BASE);
SPIConfigSetExpClk(GSPI_BASE,MAP_PRCMPeripheralClockGet(PRCM_GSPI),
SPI_IF_BIT_RATE,SPI_MODE_MASTER,SPI_SUB_MODE_1,
(SPI_SW_CTRL_CS |SPI_4PIN_MODE |SPI_TURBO_OFF | SPI_CS_ACTIVELOW
|SPI_WL_16));

SPIEnable(GSPI_BASE);
ulUserData =0x3ffc;
while(1)
{
SPICSEnable(GSPI_BASE);
SPIDataPut(GSPI_BASE,ulUserData);
SPICSDisable(GSPI_BASE);
UtilsDelay(8000);
}

RESULT:
Thus the interfacing of DAC (POT) using TI CC3200 Launch pad with Code Composer
Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS
1. While writing interrupt handlers (ISR), which are points needed to be considered?
Avoid sleep, use GFP_ATOMIC instead of GFP_KERNEL in kmalloc.

2. What are recursive functions? Can we make them in line?


The recursive functions refer to the functions which make calls to itself before giving out
the final result. These can be declared as in-line functions and the compiler will allocate the
memory space intended for the first call of the function.

3. What is a memory leak? What is a segmentation fault?


The memory leak refers to the uncleared memory mat builds up across me lifetime of the
process. When it comes to a huge value me system stalls its execution due to me
unavailability of the memory. The segmentation fault on the other hand refers to me
condition when our program tries to access a memory space that has already been freed up.

4. What is the difference between FIFO and the memory?


FIFO (First in First Out) is a memory structure where data can be stored and retrieved (in
the order of its entry only). This is a queue, whereas Memory is a storage device which can
hold data dynamically or at any desired locations and can be retrieved in any order.

5. What type of registers contains an (INTEL) CPU?


Special function registers like accumulator, Program controller (PC), data pointer
(DPTR), TMOD and TCON (timing registers), 3 register banks with r0 to r7, Bit addressable
registers like B.

6. What is the volatile keyword used for?


The volatile keyword is used to represent variables that point to memory in other mapped
devices. In such a case the value of the variable can be changed outside of a program. The
compiler does not do additional optimizations to the code if there is volatile keyword.

7. What is the scope of a function that is declared as static?


The static function when declared within a specific module is scoped only in that module
and can only be accessed from it.

8. DMA deals with which address (physical/virtual addresses)?


DMA deals with Physical addresses. Only when CPU accesses addresses it refers to
MMU (Memory Management Unit) and MMU converts the Physical address to Virtual
address. But, DMA controller is a device which directly drives the data and address bus
during data transfer. So, it is purely Physical address. (It never needs to go through MMU &

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Virtual addresses). That is why when writing the device drivers, the physical address of the
data buffer has to be assigned to the DMA.

9. What are little endian and big endian types of storage? How can you identify which type of allocation a
system follows?
The little endian memory representation allocates the least address to the least significant
bit and the big endian is where the highest significant bit takes up the least addressed
memory space. We can identify the systems usage by defining an integer value and
accessing it as a character.

10. What is watchdog timer?


A watchdog timer (or computer operating properly timer) is a computer hardware timing
device that triggers a system reset if the main program, due to some fault condition, such as a
hang, neglects to regularly service the watchdog. The intention is to bring the system back
from the hung state into normal operation.

11. What is meant by a forward reference in C?


The forward reference refers to the case when we point an address space of a smaller data
type with a pointer of a bigger data type this can be pictured as allocating memory in single
bytes and accessing it with integer pointer as chunks of 4.

12. Explain why cannot arrays be passed by values to functions?


Because in C when you say the name of the array it means the address of the first element.
Example :
int a[];
func (a);
int func(int a[]);
In this when you call the function by passing the argument a actually &a[0](address of first
element) gets passed. Hence it is impossible to pass by value in C.

13. Why cannot arrays be passed by values to functions?


When an array is passed to a function, the array is internally changed to a pointer. And
pointers are always passed by reference.

14. What is the Scope of static variables?


Scope of static variable is within the file if it is static global. Scope of static variable is
within the function if variable is declared local to a function. But the life time is throughout
the program

15. What is ISR? Can they be passed any parameter and can they return a value?

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


ISR refers to the Interrupt Service Routines. These are procedures stored at specific memory
addresses which are called when certain type of interrupt occurs. The ISRs cannot return a value
and they cannot be passed any parameters.

16. Is it necessary to start the execution of a program from the main() in C?


Normally you are at liberty to give functions whatever names you like, but main is
special your program begins executing at the beginning of main. This means that every
program must have a main somewhere.

17. Explain can structures be passed to the functions by value?


Yes structures can be passed to functions by value. Though passing by value has two
disadvantages:
1) The charges by the calling function are not reflected
2) Its slower than the pass by reference function call.

18. Can structures be passed to the functions by value?


Yes structures can be passed by value. But unnecessary memory wastage.

19. Explain what are the different storage classes in C?


Four types of storage classes are there in c.
1.Auto
2.Register
3.Static
4.Extern or Global

20. Explain can microcontroller work independently?


Obviously, it can work independently. But to see the output we need certain output
devices like LED, Buzzer can be connected to check its functionality. Without the help of
any o/p device connected we can check the functionality of Microcontroller.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp.No: 3(a) LED INTERFACING WITH ARM PROCESSOR
AIM
To interface the LED with the TI CC3200 Launch Pad using CCS IDE & TI pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI pinmux tool

THEORY:
A light-emitting diode (LED) is a two-lead semiconductor light source. It is a pn
junction diode, which emits light when activated. When a suitable voltage is applied to the
leads, electrons are able to recombine with electron holes within the device, releasing energy in
the form of photons. This effect is called electroluminescence, and the color of the light
(corresponding to the energy of the photon) is determined by the energy band gap of the
semiconductor.
An LED is often small in area (less than 1 mm2) and integrated optical components may be
used to shape its radiation pattern.
Appearing as practical electronic components in 1962, the earliest LEDs emitted low-
intensity infrared light. Infrared LEDs are still frequently used as transmitting elements in
remote-control circuits, such as those in remote controls for a wide variety of consumer
electronics. The first visible-light LEDs were also of low intensity, and limited to red. Modern
LEDs are available across the visible, ultraviolet, and infrared wavelengths, with very high
brightness.
Early LEDs were often used as indicator lamps for electronic devices, replacing small
incandescent bulbs. They were soon packaged into numeric readouts in the form of seven-
segment displays, and were commonly seen in digital clocks. In this experiments three different
colour leds interfacing with the CC3200 Launchpad using experimenter board.

PROCEDURE:
1. Connect the Embedded lab kit to PC using USB cable.
2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name LED

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


5. Replace the code of main.c with the respective LED code.
6. Open the TI pinmux tool.
7. Select the pins using TI pinmux tool. Download the driverlib of the pinmuxconfig.c and
pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in LED code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the LED main.c code.
12. Resume the main.c code.

PROGRAM:
// Red, Orenge, Green On Board LED's Blinky

//// Standard includes

#include <stdio.h>

// Driverlib includes

#include "hw_types.h"

#include "hw_ints.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "interrupt.h"

#include "hw_apps_rcm.h"

#include "prcm.h"

#include "rom.h"

#include "rom_map.h"

#include "prcm.h"

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


#include "gpio.h"

#include "utils.h"

#include "hw_gpio.h"

#include "pin.h"

#include "pinmux.h"

void main()

PinMuxConfig();

while(1)

MAP_GPIOPinWrite(GPIOA1_BASE, 0xF, 0x0E);

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0x0F, 0x00);

MAP_UtilsDelay(8000000);

RESULT:
Thus the interfacing of LED using TI CC3200 Launch pad with Code Composer Studio
(CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. Define Process?
Process is a computational unit that processes on a CPU under the control of a scheduling
kernel of an OS. It has a process structure, called Process control block. A process defines a
sequentially executing program and its state.

2. What is meant by operating system?


An operating system (OS) is software that manages computer hardware and software
resources and provides common services for computer programs. The operating system is an
essential component of the system software in a computer system. Application programs
usually require an operating system to function.

3. What is termed as task?


A task is a set of computations or actions that processes on a CPU under the control of a
scheduling kernel. It also has a process control structure called a task control block that saves
at the memory. It has a unique ID. It has states in the system as follows: idle, ready, running,
blocked and finished.

4. What are the states of a process?


Processes may be in any one of the 5 states,
New
Ready
Running
Waiting
Terminated

5. Define Scheduling?
This is defined as a process of selection which says that a process has the right to use the
processor at given time.

6. What is scheduling policy?


It says the way in which processes are chosen to get promotion from ready state to
running state.

7. What is scheduling overhead?


It is defined as time of execution needed to select the next execution process.

8. Define priority scheduling?


A simple scheduler maintains a priority queue of processes that are in the runnable state.

9. Give the different styles of inter-process communication?

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


10. What is the function in ready state?
The process has all the resources available that it needs to run, but the CPU is not
currently working on this process's instructions. Processes in the Ready state are placed in the
ready queue.

11. What is meant by context switching?


In computing, a context switch is the process of storing and restoring the state (context)
of a process or thread so that execution can be resumed from the same point at a later time.
This enables multiple processes to share a single CPU and is an essential feature of a
multitasking operating system. What constitutes the context is determined by the processor
and the operating system.

12. What are the types of Scheduling?


Long term scheduling: which determines which programs are admitted to the system for
execution and when, and which ones should be exited.
Medium term scheduling: which determines when processes are to be suspended and
resumed;
Short term scheduling (or dispatching): which determines which of the ready processes
can have CPU resources, and for how long.

13. What is multirate system?


Multirate simply means "multiple sampling rates". A multirate DSP system uses multiple
sampling rates within the system. Whenever a signal at one rate has to be used by a system that
expects a different rate, the rate has to be increased or decreased, and some processing is
required to do so. Therefore "Multirate DSP" really refers to the art or science of changing
sampling rates.

14. What is Multiprocessing, Multithreading?


Multiprocessing is the use of two or more central processing units (CPUs) within a single
computer system. The term also refers to the ability of a system to support more than one
processor and/or the ability to allocate tasks between them.

15. What is Multithreading?


Multithreading is the ability of a program or an operating system process to manage its
use by more than one user at a time and to even manage multiple requests by the same user
without having to have multiple copies of the programming running in the computer.

16. What is meant by RTOS?


An RTOS is an OS for response time controlled and event controlled processes. RTOS is
an OS for embedded systems, as these have real time programming issues to solve.

17. Define RMS (Rate Monotonic Scheduling)?


In computer science, rate-monotonic scheduling (RMS) is a scheduling algorithm used
in real-time operating systems with a static-priority scheduling class. The static priorities are
assigned on the basis of the cycle duration of the job: the shorter the cycle duration is, the higher
is the job's priority.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


18. Define queue.
In computer technology, a queue is a sequence of work objects that are waiting to be
processed.

19. Define stack.


A stack is a container of objects that are inserted and removed according to the last-in
first-out (LIFO) principle.

20. Define Inter-process Communication


An output from one task passed to another task through the scheduler and use of signals,
exception, semaphore, queues, mailbox, pipes, sockets, and RPC.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp.No: 3(b) GENERATING PWM SIGNAL, INTERFACING
WITH ARM PROCESSOR
AIM
To generate a Pulse Width Modulation (PWM) using PWM Module on TI CC3200 using
CCS IDE & TI pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI pinmux tool

THEORY:
Pulse Width Modulation (PWM) is a method of digitally encoding analog signal levels.
High-resolution digital counters are used to generate a square wave of a given frequency, and the
duty cycle of that square wave is modulated to encode the analog signal. Typical applications for
PWM are switching power supplies, motor control, servo positioning and lighting control.
Pulse Width Modulation, or PWM, is a technique for getting analog results with digital
means. Digital control is used to create a square wave, a signal switched between on and off.
This on-off pattern can simulate voltages in between full on (~3 Volts) and off (0 Volts) by
changing the portion of the time the signal spends on versus the time that the signal spends off.
The duration of on time is called the pulse width. To get varying analog values, you change, or
modulate, that pulse width. If you repeat this on-off pattern fast enough with an LED for
example, the result is as if the signal is a steady voltage between 0 and 3v controlling the
brightness of the LED.
In the graphic below, the green lines represent a regular time period. This duration or
period is the inverse of the PWM frequency. In other words, with the Launch Pads PWM
frequency at about 500Hz, the green lines would measure 2 milliseconds each. A call to analog
Write() is on a scale of 0 255, such that analog Write(255) requests a 100% duty cycle (always
on), and analog Write(127) is a 50% duty cycle (on half the time) for example.

Figure: Pulse width modulation

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROCEDURE:
1. Connect the Embedded lab kit to PC using USB cable.
2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name PWM
5. Replace the code of main.c with the respective PWM code.
6. Open the TI pinmux tool.
7. Select the pins using TI pinmux tool. Download the driverlib of the pinmuxconfig.c and
pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in PWM code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the PWM main.c code.
12. Resume the main.c code.
13. See the output in CC3200 Launch pad. Green, Yellow, Red LEDs brightness is increased
and reduced by the PWM code.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:
#include <stdio.h>

// Driverlib includes

#include "hw_types.h"

#include "hw_ints.h"

#include "hw_memmap.h"

#include "hw_apps_rcm.h"

#include "hw_common_reg.h"

#include "interrupt.h"

#include "rom.h"

#include "rom_map.h"

#include "timer.h"

#include "utils.h"

#include "prcm.h"

#include "pinmux.h"

#define APPLICATION_VERSION "1.1.1"

#define DBG_PRINT Report

#define TIMER_INTERVAL_RELOAD 40035 /* =(255*157) */

#define DUTYCYCLE_GRANULARITY 157

//*****************************************************************************

// GLOBAL VARIABLES -- Start

//*****************************************************************************

extern void (* const g_pfnVectors[])(void);

void UpdateDutyCycle(unsigned long ulBase, unsigned long ulTimer, unsigned char ucLevel)

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


MAP_TimerMatchSet(ulBase,ulTimer,(ucLevel*DUTYCYCLE_GRANULARITY));

void SetupTimerPWMMode(unsigned long ulBase, unsigned long ulTimer, unsigned long


ulConfig, unsigned char ucInvert)

// Set GPT - Configured Timer in PWM mode.

MAP_TimerConfigure(ulBase,ulConfig);

MAP_TimerPrescaleSet(ulBase,ulTimer,0);

// Inverting the timer output if required

MAP_TimerControlLevel(ulBase,ulTimer,ucInvert);

// Load value set to ~0.5 ms time period

MAP_TimerLoadSet(ulBase,ulTimer,TIMER_INTERVAL_RELOAD);

// Match value set so as to output level 0

MAP_TimerMatchSet(ulBase,ulTimer,TIMER_INTERVAL_RELOAD);

void InitPWMModules()

// Initialization of timers to generate PWM output

MAP_PRCMPeripheralClkEnable(PRCM_TIMERA2, PRCM_RUN_MODE_CLK);

MAP_PRCMPeripheralClkEnable(PRCM_TIMERA3, PRCM_RUN_MODE_CLK);

// TIMERA2 (TIMER B) as RED of RGB light. GPIO 9 --> PWM_5

SetupTimerPWMMode(TIMERA2_BASE, TIMER_B,

(TIMER_CFG_SPLIT_PAIR | TIMER_CFG_B_PWM), 1);

// TIMERA3 (TIMER B) as YELLOW of RGB light. GPIO 10 --> PWM_6

SetupTimerPWMMode(TIMERA3_BASE, TIMER_A,

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


(TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PWM | TIMER_CFG_B_PWM), 1);

// TIMERA3 (TIMER A) as GREEN of RGB light. GPIO 11 --> PWM_7

SetupTimerPWMMode(TIMERA3_BASE, TIMER_B,

(TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PWM | TIMER_CFG_B_PWM), 1);

MAP_TimerEnable(TIMERA2_BASE,TIMER_B);

MAP_TimerEnable(TIMERA3_BASE,TIMER_A);

MAP_TimerEnable(TIMERA3_BASE,TIMER_B);

void DeInitPWMModules()

{ MAP_TimerDisable(TIMERA2_BASE, TIMER_B);

MAP_TimerDisable(TIMERA3_BASE, TIMER_A);

MAP_TimerDisable(TIMERA3_BASE, TIMER_B);

MAP_PRCMPeripheralClkDisable(PRCM_TIMERA2, PRCM_RUN_MODE_CLK);

MAP_PRCMPeripheralClkDisable(PRCM_TIMERA3, PRCM_RUN_MODE_CLK);

static void

BoardInit(void)

{
MAP_IntVTableBaseSet((unsigned long)&g_pfnVectors[0]);
MAP_IntMasterEnable();
MAP_IntEnable(FAULT_SYSTICK);

PRCMCC3200MCUInit();
}

void main()
{
int iLoopCnt;

BoardInit();

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PinMuxConfig();

InitPWMModules();

while(1)
{

for(iLoopCnt = 0; iLoopCnt < 255; iLoopCnt++)


{
UpdateDutyCycle(TIMERA2_BASE, TIMER_B, iLoopCnt);
UpdateDutyCycle(TIMERA3_BASE, TIMER_B, iLoopCnt);
UpdateDutyCycle(TIMERA3_BASE, TIMER_A, iLoopCnt);
MAP_UtilsDelay(800000);
}
}

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


CALCULATIONS:

The PWM works based on the following settings:

Timer reload interval -> determines the time period of one cycle

Timer match value -> determines the duty cycle range [0, timer reload interval]

The computation of the timer reload interval and dutycycle granularity is as described below:

Timer tick frequency = 80 Mhz = 80000000 cycles/sec

For a time period of 0.5 ms,

Timer reload interval = 80000000/2000 = 40000 cycles

To support steps of duty cycle update from [0, 255]

duty cycle granularity = ceil(40000/255) = 157

Based on duty cycle granularity,

New Timer reload interval = 255*157 = 40035

New time period = 0.5004375 ms Timer match value = (update[0, 255] * duty cycle granularity)

RESULT:
Thus the generating of Pulse Width Modulation (PWM) using PWM Module on TI CC3200
Launch pad with Code Composer Studio (CCS) Integrated Development Environment (IDE) and
TI Pinmux tool was done successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What are the advantages of embedded system?


Advantages: Customization yields lower area, power, cost, etc.,

2. What are the disadvantages of embedded system?


Disadvantages: Higher HW/software development overhead design, compilers,
debuggers, etc., may result in delayed time to market

3. What are the main components of an embedded system?


Three main components of embedded systems:
The Hardware
Application Software
RTOS

4. Define embedded microcontroller.


An embedded microcontroller is particularly suited for embedded applications to perform
dedicated task or operation. Example: 68HC11xx, 8051, PIC, 16F877, etc.,

5. Explain digital signal processing in embedded system continued digitization of signals


increasing the role of DSP in ES.
Signals are represented digitally as sequence of "samples"
ADCs are moving closer to signals

6. What are the various classifications of embedded systems?


1. Small scale embedded systems
2. Medium scale embedded systems
3. Sophisticated embedded systems

7. What are the two essential units of a processor on an embedded system?


1. Program flow control unit (CU)
2. Execution unit (EU)

8. What does the execution unit of a processor in an embedded system do?


The execution unit implements data transfer and data conversion. It includes ALU and
circuits that execute instruction for jump, interrupt, etc.,

9. Give examples for general purpose processor.


1. Microprocessor
2. Microcontroller
3. Embedded processor
4. Digital Signal Processor
5. Media Processor

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


10. Define microprocessor.
A microprocessor fetches and processes the set of general-purpose instructions such as
data transfer, ALU operations, stack operations, I/O operations and other program control
operations.

11. What are the functional requirements of embedded system?


Data Collection
Sensor requirements
Signal conditioning
Alarm monitoring

12. What are the main components of an embedded system?


Three main components of embedded systems:
The Hardware
Application Software
RTOS

13. What are the two essential units of a processor on an embedded system?

Program flow control unit (CU)


Execution unit (EU)

14. What does the execution unit of a processor in an embedded system do?
The execution unit implements data transfer and data conversion. It includes ALU and
circuits that execute instruction for jump, interrupt, etc.,

15. Give examples for general purpose processor.

Microprocessor
Microcontroller
Embedded processor
Digital Signal Processor
Media Processor

16. What are embedded cores?


More and more vendors are selling or giving away their processors and peripherals in a
form that is ready to be integrated into a programmable logic-based design. They both
recognize the potential for growth in the system-on-a-chip area and want a piece of the
royalties or want to promote the use of their particular FPGA or CPLD by providing libraries
of ready-to-use building blocks. Either way, you will gain with lower system costs and faster
time-to-market.

17. Define FPGAs


Field Programmable Gate Arrays (FPGAs) can be used to implement just about any
hardware design. One common use is to prototype a lump of hardware that will eventually
find its way into an ASIC.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


18. What are dependability requirements of an embedded system?
Safety
Critical failure modes
Certification
Maintainability
MTTR in terms of repairs per hour
Availability
A = MTTF / (MTTF + MTTR)
Security

19. Define bus.


Buses: The exchange of information. Information is transferred between units of the
microcomputer by collections of conductors called buses. There will be one conductor for each
bit of information to be passed, e.g., 16 lines for a 16 bit address bus. There will be address,
control, and data buses.

20. What are the classifications of I/O devices?


i. Synchronous serial input and output
ii. Asynchronous serial UART input and output
iii. Parallel one bit input and output
iv. Parallel port input and output

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 4(a) INTERFACING RTC WITH ARM PROCESSOR

AIM
To Interface a Real Time Clock (RTC) with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:
A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit)
that keeps track of the current time. Although the term often refers to the devices in personal
computers, servers and embedded systems, RTCs are present in almost any electronic device which
needs to keep accurate time.

The term is used to avoid confusion with ordinary hardware clocks which are only signals
that govern digital electronics, and do not count time in human units. RTC should not be
confused with real-time computing, which shares its three-letter acronym but does not directly
relate to time of day.

Although keeping time can be done without an RTC using one has benefits:

Low power consumption (important when running from alternate power)


Frees the main system for time-critical tasks
Sometimes more accurate than other methods

RTCs often have an alternate source of power, so they can continue to keep time while the
primary source of power is off or unavailable. This alternate source of power is normally a
lithium battery in older systems, but some newer systems use a super capacitor, because they are
rechargeable and can be soldered. The alternate power source can also supply power to battery
backed RAM.

Most RTCs use a crystal oscillator, but some use the power line frequency. In many cases,
the oscillator's frequency is 32.768 kHz. This is the same frequency used in quartz clocks and
watches, and for the same reasons, namely that the frequency is exactly 215 cycles per second,
which is a convenient rate to use with simple binary counter circuits.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROCEDURE:
1. Connect the Embedded lab kit to PC using USB cable.
2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name RTC
5. Replace the code of main.c with the respective RTC code.
6. Open the TI pinmux tool.
7. Select the pins 1,2 using TI pinmux tool. Download the driverlib of the pinmuxconfig.c and
pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in RTC code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the RTC main.c code.
12. Resume the main.c code.
13. Open the Tera term. Select the SerialCC3200
14. The port is opened with a default Baud Rate of 9600. Change the Baud Rate by selecting
Setup -> Serial Port. Change the required Serial Port Setup parameters like Baud Rate is
115200, Data bits, Parity, Stop Bit.
15. Output of the RTC.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:

// Standard includes

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

// Driverlib includes

#include "hw_types.h"

#include "hw_ints.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "rom.h"

#include "rom_map.h"

#include "interrupt.h"

#include "prcm.h"

#include "utils.h"

#include "uart.h"

// Common interface includes

#include "uart_if.h"

#include "i2c_if.h"

#include "pinmux.h"

#define UART_PRINT Report

#define FOREVER 1

#define CONSOLE UARTA0_BASE

#define FAILURE -1

#define SUCCESS 0

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


#define RETERR_IF_TRUE(condition) {if(condition) return FAILURE;}

#define RET_IF_ERR(Func) {int iRetVal = (Func); \

if (SUCCESS != iRetVal) \

return iRetVal;}

extern void (* const g_pfnVectors[])(void);

/*

* Array Contains the data to be written in RTC.

* Array[0] = Register Offset Address

* Array[1] = Seconds (0-59)

* Array[2] = Minutes (0-59)

* Array[3] = Hour (1-12 AM/PM) or (0-23)

* Array[4] = Day (0-6)

* Array[5] = Date (1-31)

* Array[6] = Month (1-12)

* Array[7] = Year (0-99)

*/

unsigned char aucDataBuf[10] ={0x00,0x00,0x11,0x10,0x02,0x28,0x06,0x16};

void Day_Display(unsigned char day)

switch(day)

case 0: UART_PRINT("Sunday");

break;

case 1: UART_PRINT("Monday");

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


break;

case 2: UART_PRINT("Tuesday");

break;

case 3: UART_PRINT("Wednesday");

break;

case 4: UART_PRINT("Thursday");

break;

case 5: UART_PRINT("Friday");

break;

case 6: UART_PRINT("saturday");

break;

void DisplayTime_RTC(unsigned char *pucDataBuf)

UART_PRINT("RTC TIME:");

UART_PRINT(" ");

UART_PRINT("%d", ((pucDataBuf[4]&0xF0)>>4));

UART_PRINT("%d", ((pucDataBuf[4]&0x0F)));

UART_PRINT("/");

UART_PRINT("%d", ((pucDataBuf[5]&0xF0)>>4));

UART_PRINT("%d", ((pucDataBuf[5]&0x0F)));

UART_PRINT("/");

UART_PRINT("%d", ((pucDataBuf[6]&0xF0)>>4));

UART_PRINT("%d", ((pucDataBuf[6]&0x0F)));

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


UART_PRINT(" ");

Day_Display(pucDataBuf[3]);

UART_PRINT(" ");

UART_PRINT("%d", ((pucDataBuf[2]&0xF0)>>4));

UART_PRINT("%d", ((pucDataBuf[2]&0x0F)));

UART_PRINT(":");

UART_PRINT("%d", ((pucDataBuf[1]&0xF0)>>4));

UART_PRINT("%d", ((pucDataBuf[1]&0x0F)));

UART_PRINT(":");

UART_PRINT("%d", ((pucDataBuf[0]&0xF0)>>4));

UART_PRINT("%d", ((pucDataBuf[0]&0x0F)));

UART_PRINT("\r\n");

int ProcessReadRegCommand()

unsigned char ucRegOffset, ucRdLen,aucReadDataBuf[256];

ucRegOffset = 0x00;

ucRdLen = 7;

I2C_IF_Write(0x68,&ucRegOffset,1,0);

I2C_IF_Read(0x68,&aucReadDataBuf[0], ucRdLen);

DisplayTime_RTC(aucReadDataBuf);

return SUCCESS;

int ProcessWriteRegCommand()

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


{

unsigned char ucWrLen;

ucWrLen = 7;

I2C_IF_Write(0x68,&aucDataBuf[0],ucWrLen+1,1);

return SUCCESS;

void error_check(int iRetVal)

if(iRetVal < 0) UART_PRINT("Error in processing command\n\r");

int ParseNProcessCmd(int a)

int iRetVal;

switch(a)

case 1:iRetVal = ProcessWriteRegCommand();

break;

case 2:iRetVal = ProcessReadRegCommand();

break;

default: break;

return iRetVal;

static void BoardInit(void)

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


MAP_IntVTableBaseSet((unsigned long)&g_pfnVectors[0]);

MAP_IntMasterEnable();

MAP_IntEnable(FAULT_SYSTICK);

PRCMCC3200MCUInit();

void main()

int iRetVal;

BoardInit();

PinMuxConfig();

InitTerm();

I2C_IF_Open(I2C_MASTER_MODE_FST);

iRetVal = ParseNProcessCmd(1);

error_check(iRetVal);

while(FOREVER)

iRetVal = ParseNProcessCmd(2);

error_check(iRetVal);

MAP_UtilsDelay(90000000);

RESULT:
Thus the interfacing of Real Time Clock (RTC) with TI CC3200 Launch pad using Code
Composer Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. Give some examples for serial input I/O devices.


Audio input, video input, dial tone, transceiver input, scanner, serial IO bus input, etc.,

2. Give the steps for accomplishing input output data transfer.


Accomplishing input/output data transfer there are three main methods used to
perform/control input/output data transfers. They are,
Software programming (scanning or polling)
interrupt controlled
Direct memory access (DMA)

3. Give the limitations of polling technique.


The polling technique, however, has limitations.
It is wasteful of the processors time, as it needlessly checks the status of all devices all
the time.
It is inherently slow, as it checks the status of all I/O devices before it comes back to
check any given one again.
When fast devices are connected to a system, polling may simply not be fast enough to
satisfy the minimum service requirements. Priority of the device is determined

4. What do you meant by bus arbitration?


Bus Arbitration most processors use special control lines for bus arbitration, ie,
controlling the use of the address and data bus,
An input which the DMAC uses to request the bus
An output(s) indicating the bus status
An output indicating acceptance of the DMAC\'s bus request

5. What are the two characteristics of synchronous communication?


Bytes/frames maintain constant phase difference and should not be sent at random time
intervals. No handshaking signals are provided during the communication.
Clock pulse is required to transmit a byte or frame serially. Clock rate information is
transmitted by the transmitter.

6. What do you mean by asynchronous communication?


The most basic way of sharing data is by copying the data in question to each server. This
will only work if the data is changed infrequently and always by someone with
administrative access to all the servers in the cluster.

7. What are the characteristics of asynchronous communication?


Variable bit rate - need not maintain constant phase difference
Handshaking method is used
Transmitter need not transmit clock information along with data bit stream

8. What are the three ways of communication for a device?


i. Separate clock pulse along with data bits
ii. Data bits modulated with clock information

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


iii. Embedded clock information with data bits before transmitting

9. Expand a) SPI b) SCI


SPI - SERIAL PERIPHERAL INTERFACE
SCI - SERIAL COMMUNICATION INTERFACE

10. What are the features of SPI?


SPI has programmable clock rates
Full-duplex mode
Crystal clock frequency is 8MHz
Open drain or totempole output from master to slave

11. Define software timer.


A software timer is software that executes the increase/decrease count value on an
interrupt from timer or RTC. Software timer is used as virtual timing device.

12. What are the forms of timer?


Hardware interrupt timer
Software timer
User software controlled hardware timer
RTOS controlled hardware timer
UP/DOWN count action timer
One-shot timer (No reload after overflow and finished states)

13. Define RTC


RTC Stands for Real Time Systems. Once the system starts, do not stop/reset and the count
value cannot be reloaded.

14. What is I2C?


Inter- Integrated Circuit (2-wire/line protocol) which offers synchronous communication.
Standard speed: 100Kbps and High speed: 400 Kbps

15. What are the bits in I2C corresponding to?


SDA - Serial Data Line and SCL - Serial Clock line

16. What is a CAN bus? Where is it used?


CAN stands for Controller Area Network. Serial line, bi-directional bus used in
automobiles. Operates at the rate of 1Mbps.

17. What is USB? Where is it used?


USB - Universal Serial Bus Operating speed - upto 12 Mbps in fast mode and 1.5Mbps in
low-speed mode.

18. What are the features of the USB protocol?


A device can be attached, configured and used, reset, reconfigured and used, detached
and reattached, share the bandwidth with other devices.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


19. What are the four types of data transfer used in USB?
Controlled transfer
Bulk transfer
Interrupt driven data transfer
Iso-synchronous transfer

20. Explain briefly about PCI and PCI/X buses.


Used for most PC based interfacing
Provides superior throughput than EISA
Platform-independent
Clock rate is nearest to sub-multiples of system clock

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 4(b) INTERFACING SERIAL PORT WITH ARM
PROCESSOR

AIM
To Interface a serial port with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:
PROCEDURE:
1. Connect the Embedded lab kit to PC using USB cable.
2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name UART USB,
5. Replace the code of main.c with the respective UART USB code.
6. Open the TI pinmux tool.
7. Select the pins 55, 57. Using TI pinmux tool. Download the driverlib of the pinmuxconfig.c
and pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in RTC code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the UART USB main.c code.
12. Resume the main.c code.
13. Open the Tera term. And select the Serial-->Port: COM129: CC3200LP Dual
port(COM129)

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


14. Select the Setup-->Serial port.

In Serial port setup, Select

Port--> COM31
Baud rate--> 115200-->Ok
15. Output of the UART USB.

PROGRAM:

// UART1

// Sending "Texas Instruments" String Continously to PC

// In Tera term default uart configuration with 115200 Baud rate..

// IC Pin | GPIO | Port | Value

//---------------------------------------

// 55 | | |

// 57 | | |

// | | |

// Last Update 24/03/2016

// Driverlib includes

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


#include "rom.h"

#include "rom_map.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "hw_types.h"

#include "hw_ints.h"

#include "uart.h"

#include "interrupt.h"

#include "utils.h"

#include "prcm.h"

// Common interface include

#include "pin_mux_config.h"

//char ragu;

unsigned char msg[]={"Texas Instruments \n"};

unsigned int i;

void main()

PinMuxConfig();

UARTConfigSetExpClk(UARTA1_BASE,
PRCMPeripheralClockGet(PRCM_UARTA1), 115200,

(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
UART_CONFIG_PAR_NONE));

while(1)

for(i=0; msg[i]!='\0'; i++)

UARTCharPut(UARTA1_BASE, msg[i]);

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


UtilsDelay(8000000);

RESULT:
Thus the interfacing of Serial Port with TI CC3200 Launch pad using Code Composer
Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. Mention some advanced bus standard protocols;


GMII (Gigabit Ethernet MAC Interchange Interface)
XGMI (10 Gigabit Ethernet MAC Interchange Interface)
CSIX-1 6.6 Gbps
Rapid IO interconnect specification v1.1 at 8 Gbps

2. What do you meant by high speed device interfaces?


Fail-over clustering would not be practical without some way for the redundant servers to
access remote storage devices without taking a large performance hit, as would occur if these
devices were simply living on the local network. Two common solutions to this problem are
double-ended SCSI and fibre-channel.

3. Mention some I/O standard interfaces.


HSTL - High Speed Transceiver Logic (Used in high speed operations)
SSTL - Stub Series Terminated Logic (Used when the buses are needed to isolate from
the large no. of stubs)

4. What are the advantages of Assembly language?


It gives the precise control of the processor internal devices and full use of processor
specific features in its instruction sets and addressing modes.
The machine codes are compact, which requires only small memory.
Device drivers need only few assembly instructions.

5. What are advantages of high level languages?


Data type declaration
Type checking
Control structures
Probability of non-processor specific codes

6. Define In -line assembly


Inserting an assembly code in between is said to be in-line assembly.

7. Mention the elements of C program.


Files:
Header files
Source files
Configuration files
Preprocessor directives
Functions:
Macro function
Main function
Interrupt service routines or device drivers
Others:
Data types

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Data structures
Modifiers
Statements
Loops and pointers

8. What is the use of MACRO function?


A macro function executes a named small collection of codes, with the values passed by
the calling function through its arguments.
It has constant saving and retrieving overheads.

9. What is the use of interrupt service routines or device drivers?


It is used for the declaration of functions and datatypes, typedef and executes named set
of codes.
ISR must be small (short), reentrant or must have solution for shared data problem.

10. What are the datatypes available in C language?


Char - 8 bit; byte - 8 bit; short - 16 bit; unsigned short - 16 bit; unsigned int - 32 bit; int -
32 bit; long double - 64 bit; float - 32 bit; double 64

11. Mention the data structures available in C language.


1. Queue
2. Stack
3. Array (1-dimentional and multi-dimentional)
4. List
5. Tree
6. Binary-tree

12. Write the syntax for declaration of pointer and Null-pointer.


Syntax for pointer:
void *portAdata
Syntax for Null-pointer:
#define NULL (void*) 0x0000

13. Explain pass by values.


The values are copied into the arguments of the function.
Called programs does not change the values of the variables

14. What are the three conditions that must be satisfied by the re-entrant function?
All the arguments pass the values and none of the argument is a pointer.
When a non-atomic operation that function should not operate on the function declared
outside.
A function does does not call a function by itself when it is not reentrant.

15. Explain pass by reference.


When an argument value to a function is passed through a pointer, then the value can be
changed.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


New value in the calling function will be returned from the called function.

16. Write the syntax for function pointer.


Syntax:
void *<function_name> (function arguments)

17. Define queue.


A structure with a series of elements.
Uses FIFO mode.
It is used when an element is not directly accessed using pointer and index but
only through FIFO.
Two pointers are used for insertion and deletion.

18. Define stack.


A structure with a series of elements which uses LIFO mode.
An element can be pushed only at the top and only one pointer is used for POP.
Used when an element is not accessible through pointer and index, but only
through LIFO.

19. Define List.


Each element has a pointer to its next element.
Only the first element is identifiable and it is done using list-top pointer (header).
Other element has no direct access and is accessed through the first element.

20. What is Object oriented programming?


An object-oriented programming language is used when there is a need for re-usability of
defined objects or a set of objects that are common for many applications.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 5(a) INTERFACING KEYBOARD WITH ARM
PROCESSOR

AIM
To Interface a Keyboard with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:
A keypad is a set of buttons arranged in a block or "pad" which usually bear digits, symbols
and usually a complete set of alphabetical letters. If it mostly contains numbers then it can also be
called a numeric keypad. Keypads are found on many alphanumeric keyboards and on other
devices such as calculators, push-button telephones, combination locks, and digital door locks,
which require mainly numeric input.

A computer keyboard usually has a small numeric keypad on the side, in addition to the
other number keys on the top, but with a calculator-style arrangement of buttons that allow more
efficient entry of numerical data. This number pad (commonly abbreviated to "numpad") is
usually positioned on the right side of the keyboard because most people are right-handed.

Many laptop computers have special function keys which turn part of the alphabetical
keyboard into a numerical keypad as there is insufficient space to allow a separate keypad to be
built into the laptop's chassis. Separate external plug-in keypads can be purchased.

As a general rule, the keys on calculator-style keypads are arranged such that 123 is on
the bottom row, whereas in a telephone keypad, there will be the 123-keys at the top. A phone
key-pad also has the special buttons labelled * (star) and # (octothorpe, number sign, "pound",
"hex" or "hash") on either side of the zero key. Most of the keys on a telephone also bear letters
which have had several auxiliary uses, such as remembering area codes or whole telephone
numbers.

The keypad of a calculator contains the digits 0 through 9, from bottom upwards, together
with the four arithmetic operations, the decimal point and other more advanced mathematical
functions.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROCEDURE:

1. Connect the Embedded lab kit to PC using USB cable.


2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name Keyboard
5. Replace the code of main.c with the respective Keyboard code.
6. Open the TI pinmux tool.
7. Select the pins 59,60,61,62. Using TI pinmux tool. Download the driverlib of the
pinmuxconfig.c and pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in Keyboard code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the Keyboard main.c code.
12. Resume the main.c code.
13. See the output in 7 segment display in Interfacing Board. Press the keyboard buttons
numbers display in 7 segment display.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:

// Std header files

#include <string.h>

#include <stdint.h>

#include <stdlib.h>

#include <stdbool.h>

#include "utils.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "hw_types.h"

#include "hw_adc.h"

#include "hw_ints.h"

#include "hw_gprcm.h"

#include "rom.h"

#include "rom_map.h"

#include "interrupt.h"

#include "prcm.h"

#include "pin.h"

#include "hw_gpio.h"

#include "gpio.h"

#include "pin_mux_config.h"

void disp();

unsigned char seg_no[]={0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x77, 0x7c,
0x58, 0x5e, 0x79, 0x71}; // Segment number 0,1,2,3,4,5,6,7,8,9,A,b,c,d,E,F

unsigned long secCnt=0;

unsigned int i,k, Numb=0, Count;

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


int
x=0,a=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,a10=0,a11=0,a12=0,a13=0,a14=0,a
15=0;

void main()

PinMuxConfig();

GPIOPinWrite(GPIOA3_BASE, 0x10, 0x00); // pin 18 is low

PinConfigSet(PIN_59, PIN_STRENGTH_2MA, PIN_TYPE_STD_PU);

PinConfigSet(PIN_60, PIN_STRENGTH_2MA, PIN_TYPE_STD_PU);

PinConfigSet(PIN_61, PIN_STRENGTH_2MA, PIN_TYPE_STD_PU);

PinConfigSet(PIN_62, PIN_STRENGTH_2MA, PIN_TYPE_STD_PU);

GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x00); // port A1 is low

while(1)

GPIOPinWrite(GPIOA2_BASE, 0x03, 0x00);

if((GPIOPinRead(GPIOA0_BASE, 0x10))== 0x10) // pin 59 Row 1

while(((GPIOPinRead(GPIOA0_BASE, 0x10))== 0x10));

disp(1);

a++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x20))== 0x20) // pin 60 Row 2

while(((GPIOPinRead(GPIOA0_BASE, 0x20))== 0x20));

disp(2);

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


a1++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x40))== 0x40) //pin 61 Row3

while(((GPIOPinRead(GPIOA0_BASE, 0x40))== 0x40));

disp(3);

a2++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x80))== 0x80) // pin 62 row 4

while(((GPIOPinRead(GPIOA0_BASE, 0x80))== 0x80));

disp(4);

a3++;

x++;

GPIOPinWrite(GPIOA2_BASE, 0x03, 0x01);

if((GPIOPinRead(GPIOA0_BASE, 0x10))== 0x10) // pin 59 row1

while(((GPIOPinRead(GPIOA0_BASE, 0x10))== 0x10));

disp(5);

a4++;

x++;

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


if((GPIOPinRead(GPIOA0_BASE, 0x20))== 0x20) //pin 60 row 3

while(((GPIOPinRead(GPIOA0_BASE, 0x20))== 0x20));

disp(6);

a5++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x40))== 0x40) // pin 61 row 3

while(((GPIOPinRead(GPIOA0_BASE, 0x40))== 0x40));

disp(7);

a6++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x80))== 0x80) // pin62 row 4

while(((GPIOPinRead(GPIOA0_BASE, 0x80))== 0x80));

disp(8);

a7++;

x++;

GPIOPinWrite(GPIOA2_BASE, 0x03, 0x02);

if((GPIOPinRead(GPIOA0_BASE, 0x10))== 0x10) // pin 59 row 1

while(((GPIOPinRead(GPIOA0_BASE, 0x10))== 0x10));

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


disp(9);

a8++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x20))== 0x20) // pin 60 row 2

while(((GPIOPinRead(GPIOA0_BASE, 0x20))== 0x20));

disp(10);

a9++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x40))== 0x40) // pin 61 row 3

while(((GPIOPinRead(GPIOA0_BASE, 0x40))== 0x40));

disp(11);

a10++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x80))== 0x80) // pin 62 row 4

while(((GPIOPinRead(GPIOA0_BASE, 0x80))== 0x80));

disp(12);

a11++;

x++;

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


}

GPIOPinWrite(GPIOA2_BASE, 0x03, 0x03);

if((GPIOPinRead(GPIOA0_BASE, 0x10))== 0x10) // pin 59 row 1

while(((GPIOPinRead(GPIOA0_BASE, 0x10))== 0x10));

disp(13);

a12++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x20))== 0x20) // pin 60 row 2

while(((GPIOPinRead(GPIOA0_BASE, 0x20))== 0x20));

disp(14);

a13++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x40))== 0x40) // pin 61 row 3

while(((GPIOPinRead(GPIOA0_BASE, 0x40))== 0x40));

disp(15);

a14++;

x++;

if((GPIOPinRead(GPIOA0_BASE, 0x80))== 0x80) // pin 62 row 4

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


while(((GPIOPinRead(GPIOA0_BASE, 0x80))== 0x80));

disp(0);

a15++;

x++;

void disp(Numb)

GPIOPinWrite(GPIOA1_BASE, 0XFF, seg_no[Numb]);// ---x

UtilsDelay(800);

GPIOPinWrite(GPIOA1_BASE, 0XFF, seg_no[Numb]);// --x-

UtilsDelay(800);

GPIOPinWrite(GPIOA1_BASE, 0XFF, seg_no[Numb]); // -x--

UtilsDelay(800);

GPIOPinWrite(GPIOA1_BASE, 0XFF, seg_no[Numb]);// x---

UtilsDelay(800);

RESULT:
Thus the interfacing of Keyboard with TI CC3200 Launch pad using Code Composer
Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What is a Preprocessor Directive?


A preprocessor directive starts with # sign. The following are the types of preprocessor
directives:
1. Preprocessor global variables
2. Preprocessor constants

2. Mention the flags available for queue.


1. QerrrorFlag
2. HeaderFlag
3. TrailingFlag
4. cirQuFlag
5. PolyQuFlag

3. Define stack.
A structure with a series of elements which uses LIFO mode.
An element can be pushed only at the top and only one pointer is used for POP.
Used when an element is not accessible through pointer and index, but only
through LIFO.

4. Define List.
Each element has a pointer to its next element.
Only the first element is identifiable and it is done using list-top pointer (header).
Other element has no direct access and is accessed through the first element.

5. What is Object oriented programming?


An object-oriented programming language is used when there is a need for re-usability of
defined objects or a set of objects that are common for many applications.

6. What are the advantages of OOPs?


Data encapsulation
Reusable software components
inheritance

7. What are the characteristics of OOPs?


An identity - reference to a memory block
A state - data, field and attributes
A behavior - methods to manipulate the state of the object

8. Define Class.
A class declaration defines a new type that links code and data. It is then used to declare
objects of that class. Thus a class is an logical abstraction but an object has physical existence.

9. Define NULL function


NULL defines empty stack or no content in the stack/queue/list.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


10. What is Multiple Inheritance?
Inheritance is the process by which objects of one class acquire the properties of objects
of another class. In OOP, the concept of inheritance provides the idea of reusability.

11. Define Exception handling


Exceptions are used to report error conditions. Exception handling is built upon three
keywords:
1. try
2. catch
3. throw

12. Define queue.


A structure with a series of elements.
Uses FIFO mode.
It is used when an element is not directly accessed using pointer and index but
only through FIFO.
Two pointers are used for insertion and deletion.

13. What is a Preprocessor Directive?


A preprocessor directive starts with # sign. The following are the types of preprocessor
directives:
1. Preprocessor global variables
2. Preprocessor constants

14. Mention the flags available for queue.


1. QerrrorFlag
2. HeaderFlag
3. TrailingFlag
4. cirQuFlag
5. PolyQuFlag

15. Define process.


A process is a program that performs a specific function.

16. Define task and Task state.


A task is a program that is within a process. It has the following states:
1. Ready
2. Running
3. Blocked
4. Idle
3. Define (TCB)
The TCB stands for Task Control Block which holds the control of all the tasks within the
Block. It has separate stack and program counter for each task.

17. What is a thread?


A thread otherwise called a lightweight process (LWP) is a basic unit of CPU utilization,
it comprises of a thread id, a program counter, a register set and a stack. It shares with other

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


threads belonging to the same process its code section, data section, and operating system
resources such as open files and signals.

18. What are the benefits of multithreaded programming?


The benefits of multithreaded programming can be broken down into four major
categories:
Responsiveness
Resource sharing
Economy
Utilization of multiprocessor architectures

19. Compare user threads and kernel threads.


User threads Kernel threads
User threads are supported above the kernel and are implemented by a thread library at
the user level Kernel threads are supported directly by the operating system

20. Define RTOS.


A real-time operating system (RTOS) is an operating system that has been developed for
real-time applications. It is typically used for embedded applications, such as mobile telephones,
industrial robots, or scientific research equipment.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 5(b) INTERFACING LCD WITH ARM
PROCESSOROR

AIM
To Interface a LCD with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:
A liquid-crystal display (LCD) is a flat-panel display or other electronic visual display that
uses the light-modulating properties of liquid crystals. Liquid crystals do not emit light directly.
LCDs are available to display arbitrary images (as in a general-purpose computer display) or
fixed images with low information content, which can be displayed or hidden, such as preset
words, digits, and 7-segment displays as in a digital clock. They use the same basic technology,
except that arbitrary images are made up of a large number of small pixels, while other displays
have larger elements.
LCDs are used in a wide range of applications including computer monitors,
televisions, instrument panels, aircraft cockpit displays, and signage. They are common in
consumer devices such as DVD players, gaming devices, clocks, watches, calculators, and
telephones, and have replaced cathode ray tube (CRT) displays in nearly all applications. They
are available in a wider range of screen sizes than CRT and plasma displays, and since they do
not use phosphors, they do not suffer image burn-in. LCDs are, however, susceptible to image
persistence.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROCEDURE:

1. Connect the Embedded lab kit to PC using USB cable.


2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name LCD
5. Replace the code of main.c with the respective LCD code.
6. Open the TI pinmux tool.
7. Select the pins 15,50,3,4,5,6. Using TI pinmux tool. Download the driverlib of the
pinmuxconfig.c and pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in LCD code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the Keyboard main.c code.
12. Resume the main.c code.
13. See the output in Interfacing board LCD.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:

// CC3200 4bit LCD

//RS=15

//EN=50

//D4=03

//D5=04

//D6=05

//D7=06

//Std header files

#include <string.h>

#include <stdint.h>

#include <stdlib.h>

#include <stdbool.h>

#include "utils.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "hw_types.h"

#include "hw_adc.h"

#include "hw_ints.h"

#include "hw_gprcm.h"

#include "rom.h"

#include "rom_map.h"

#include "interrupt.h"

#include "prcm.h"

#include "pin.h"

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


#include "hw_gpio.h"

#include "gpio.h"

#include "pin_mux_config.h"

void commd(unsigned char comm);

void data(unsigned char dat);

unsigned char msg[]={" Texas Instrument"};

unsigned int i,j;

void main()

PinMuxConfig();

GPIOPinWrite(GPIOA3_BASE, 0X10, 0x00);

GPIOPinWrite(GPIOA1_BASE, 0X0f, 0x0f);

UtilsDelay(80);

commd(0x28);

commd(0x06);

commd(0x0C);

commd(0x01);

commd(0x80);

while(1)

commd(0x01);

commd(0x80);

for(j=0; msg[j]!='\0'; j++){

data(msg[j]);

UtilsDelay(2000000);

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


}

//15 rs

//50 EN

void data(unsigned char dat)

GPIOPinWrite(GPIOA1_BASE, 0XF0, (dat & 0XF0));

GPIOPinWrite(GPIOA0_BASE, 0X01, 0x01);

GPIOPinWrite(GPIOA2_BASE, 0X40, 0x40); // RS=1 EN=1

for(i=0;i<100;i++); //RS=1 EN=0

GPIOPinWrite(GPIOA0_BASE, 0X01, 0x00);

GPIOPinWrite(GPIOA2_BASE, 0X40, 0x40);

for(i=0;i<640;i++);

GPIOPinWrite(GPIOA1_BASE, 0XF0, ((dat<<4) & 0XF0)); //RS=1 EN=1

GPIOPinWrite(GPIOA0_BASE, 0X01, 0x01); // RS=1 EN=1

GPIOPinWrite(GPIOA2_BASE, 0X40, 0x40); // RS=1 EN=1

for(i=0;i<100;i++); //RS=1 EN=0

GPIOPinWrite(GPIOA0_BASE, 0X01, 0x00);

GPIOPinWrite(GPIOA2_BASE, 0X40, 0x40);

for(i=0;i<640;i++);

void commd(unsigned char comm)

GPIOPinWrite(GPIOA1_BASE, 0XF0, (comm & 0XF0)); //RS=0 EN=1

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


GPIOPinWrite(GPIOA0_BASE, 0X01, 0x01);

GPIOPinWrite(GPIOA2_BASE, 0X40, 0x00);

for(i=0;i<100;i++); //RS=0 EN=0

GPIOPinWrite(GPIOA0_BASE, 0X01, 0x00);

GPIOPinWrite(GPIOA2_BASE, 0X40, 0x00);

for(i=0;i<640;i++);

GPIOPinWrite(GPIOA1_BASE, 0XF0, ((comm<<4) & 0XF0));//RS=0 EN=1

GPIOPinWrite(GPIOA0_BASE, 0X01, 0x01);

GPIOPinWrite(GPIOA2_BASE, 0X40, 0x00);

for(i=0;i<100;i++); //RS=0 EN=0

GPIOPinWrite(GPIOA0_BASE, 0X01, 0x00);

GPIOPinWrite(GPIOA2_BASE, 0X40, 0x00);

for(i=0;i<640;i++);

RESULT:
Thus the interfacing of LCD with TI CC3200 Launch pad using Code Composer Studio
(CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What is the technology behind the thumb-2 instruction?


Thumb-2 extends the Thumb instruction set with bit-field manipulation, table branches and
conditional execution. At the same time, the ARM instruction set was extended to maintain
equivalent functionality in both instruction sets. A new "Unified Assembly Language" (UAL)
supports generation of either Thumb or ARM instructions from the same source code; versions
of Thumb seen on ARMv7 processors are essentially as capable as ARM code (including the
ability to write interrupt handlers).
2. Define Code Density?
Code density - Computer Definition. The amount of space that an executable program takes
up in memory. Code density is important in mobile devices that contain a limited amount of
memory
3. What is Microcode?
Microcode is "a technique that imposes an interpreter between the hardware and the
architectural level of a computer." As such, the microcode is a layer of hardware-level
instructions that implement higher-level machine code instructions or internal state
machine sequencing in many digital processing elements.
4. Define Atomicity.
In concurrent programming, an operation (or set of operations)
is atomic, linearizable, indivisible or uninterruptible if it appears to the rest of the system to
occur instantaneously. Atomicity is a guarantee of isolation from concurrent processes.
Additionally, atomic operations commonly have a succeed-or-fail definitionthey either
successfully change the state of the system, or have no apparent effect
5. What is Load/Store instruction?
In computer engineering, a load/store architecture divides instructions into 2
categories: memory access (load and store between memory and registers), and ALU operations
(which only occur between registers);RISC systems such as PowerPC, SPARC, RISC-
V, ARM or MIPS use the load/store architecture.
6. What is ARM license?
ARM Holdings neither manufactures nor sells CPU devices based on its own designs, but
rather licenses the processor architecture to interested parties. ARM offers a variety of licensing
terms, varying in cost and deliverables. To all licensees, ARM provides an integratable hardware
description of the ARM core, as well as complete software development toolset and the right to
sell manufactured silicon containing the ARM CPU.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


7. What are the applications of ARM Core?
ARM cores are used in a number of products, particularly PDAs and smartphones.
Some computing examples are Microsoft's first generation Surface and Surface 2, Apple's iPads,
and Asus's Eee Pad Transformer tablet computers. Others include Apple's iPhone
smartphone and iPod portable media player, Canon Power Shot digital cameras, Nintendo
DS handheld game consoles and TomTom turn-by-turn navigation systems.
8. What is predication in ARM?
Almost every ARM instruction has a conditional execution feature called predication, which
is implemented with a 4-bit condition code selector (the predicate). To allow for unconditional
execution, one of the four-bit codes causes the instruction to be always executed. Most other
CPU architectures only have condition codes on branch instructions.
9. What is Coprocessor?
The ARM architecture (pre-ARMv8) provides a non-intrusive way of extending the
instruction set using "coprocessors" that can be addressed using MCR, MRC, MRRC, MCRR,
and similar instructions.
10. Define IDE.
An integrated development environment (IDE) is a software application that provides
comprehensive facilities to computer programmers for software development. An IDE normally
consists of a source code editor, build automation tools and a debugger. Most modern IDEs have
intelligent code completion.
11. What is meant by context switching?
In computing, a context switch is the process of storing and restoring the state (context)
of a process or thread so that execution can be resumed from the same point at a later time.
This enables multiple processes to share a single CPU and is an essential feature of a
multitasking operating system. What constitutes the context is determined by the processor
and the operating system.

12. What are the types of Scheduling?


Long term scheduling: which determines which programs are admitted to the system for
execution and when, and which ones should be exited.
Medium term scheduling: which determines when processes are to be suspended and
resumed;
Short term scheduling (or dispatching): which determines which of the ready processes
can have CPU resources, and for how long.

13. What is multirate system?


Multirate simply means "multiple sampling rates". A multirate DSP system uses multiple
sampling rates within the system. Whenever a signal at one rate has to be used by a system that

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


expects a different rate, the rate has to be increased or decreased, and some processing is
required to do so. Therefore "Multirate DSP" really refers to the art or science of changing
sampling rates.

14. What is Multiprocessing, Multithreading?


Multiprocessing is the use of two or more central processing units (CPUs) within a single
computer system. The term also refers to the ability of a system to support more than one
processor and/or the ability to allocate tasks between them.

15. What is Multithreading?


Multithreading is the ability of a program or an operating system process to manage its
use by more than one user at a time and to even manage multiple requests by the same user
without having to have multiple copies of the programming running in the computer.

16. What is meant by RTOS?


An RTOS is an OS for response time controlled and event controlled processes. RTOS is
an OS for embedded systems, as these have real time programming issues to solve.

17. Define RMS (Rate Monotonic Scheduling)?


In computer science, rate-monotonic scheduling (RMS) is a scheduling algorithm used
in real-time operating systems with a static-priority scheduling class. The static priorities are
assigned on the basis of the cycle duration of the job: the shorter the cycle duration is, the higher
is the job's priority.

18. Define queue.


In computer technology, a queue is a sequence of work objects that are waiting to be
processed.

19. Define stack.


A stack is a container of objects that are inserted and removed according to the last-in
first-out (LIFO) principle.

20. Define Inter-process Communication


An output from one task passed to another task through the scheduler and use of signals,
exception, semaphore, queues, mailbox, pipes, sockets, and RPC.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 6 INTERFACING EEPROM AND INTERRUPT

AIM
To Interface EEPROM with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:

EEPROM:

EEPROM (Electrically Erasable Programmable ROM) offer users excellent capabilities


and performance. Only one external power supply is required since the high voltage for
program/erase is internally generated. Write and erase operations are performed on a byte per
byte basis. The EEPROM uses the same principle as the UV-EPROM. Electrons trapped in a
floating gate will modify the characteristics of the cell, and so a logic 0 or a logic 1 will be
stored. The EEPROM is the memory device that implements the fewest standards in cell design.
The more common cell is composed of two transistors. The storage transistor has a floating gate
(similar to the EPROM storage transistor) that will trap electrons. In addition, there is an access
transistor, which is required for operations. Figure 9-10 shows the voltages applied on the
memory cell to program/erase a cell. Note that an EPROM cell is erased when electrons are
removed from the floating gate and that the EEPROM cell is erased when the electrons are
trapped in the floating cell. To have products electrically compatible, the logic path of both types
of product will give a 1 for erase state and a 0 for a programmed state. Figure 9-11 shows
the electrical differences between EPROM and EEPROM cells.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROCEDURE:

1. Connect the Embedded lab kit to PC using USB cable.


2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name EEPROM
5. Replace the code of main.c with the respective EEPROM code.
6. Open the TI pinmux tool.
7. Select the pins. Using TI pinmux tool. Download the driverlib of the pinmuxconfig.c and
pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in EEPROM code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the EEPROM main.c code.
12. Resume the main.c code.
13. Right click the GPIOP select the open Declaration .See the output in Expressions.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:

// Standard includes

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

// Driverlib includes

#include "hw_types.h"

#include "hw_ints.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "rom.h"

#include "rom_map.h"

#include "interrupt.h"

#include "prcm.h"

#include "utils.h"

#include "uart.h"

#include "i2c_if.h"

#include "pin_mux_config.h"

#include "gpio.h"

extern void (* const g_pfnVectors[])(void);

unsigned char ucDevAddr = 0x57 ,ucLen =4,READ_ADDRESS;

unsigned char aucDataBuf[10],RCVDataBuf[10];

//************************************************************************//

//! Board Initialization & Configuration

//!

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


//! \param None

//!

//! \return None

//

//*****************************************************************************

static void BoardInit(void)

MAP_IntVTableBaseSet((unsigned long)&g_pfnVectors[0]);

MAP_IntMasterEnable();

MAP_IntEnable(FAULT_SYSTICK);

PRCMCC3200MCUInit();

void main (void)

BoardInit();

PinMuxConfig();

aucDataBuf[0]=0x00;

aucDataBuf[1]=0x00;

aucDataBuf[2]=0x40;

I2C_IF_Open(I2C_MASTER_MODE_FST);

GPIOPinWrite(GPIOA3_BASE, 0x10 , 0x10);

while(1)

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


I2C_IF_Write(ucDevAddr,&aucDataBuf[0],4,1);

UtilsDelay(80000);

I2C_IF_Write(ucDevAddr,&aucDataBuf[0],3,0);

I2C_IF_Read(ucDevAddr,&RCVDataBuf[0],2);

UtilsDelay(800000);

RESULT:
Thus the interfacing of EEPROM and Interrupt with TI CC3200 Launch pad using Code
Composer Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What is a Preprocessor Directive?


A preprocessor directive starts with # sign. The following are the types of preprocessor
directives:
1. Preprocessor global variables
2. Preprocessor constants

2. Mention the flags available for queue.


1. QerrrorFlag
2. HeaderFlag
3. TrailingFlag
4. cirQuFlag
5. PolyQuFlag

3. Define stack.
A structure with a series of elements which uses LIFO mode.
An element can be pushed only at the top and only one pointer is used for POP.
Used when an element is not accessible through pointer and index, but only
through LIFO.

4. Define List.
Each element has a pointer to its next element.
Only the first element is identifiable and it is done using list-top pointer (header).
Other element has no direct access and is accessed through the first element.

5. What is Object oriented programming?


An object-oriented programming language is used when there is a need for re-usability of
defined objects or a set of objects that are common for many applications.

6. What are the advantages of OOPs?


Data encapsulation
Reusable software components
inheritance

7. What are the characteristics of OOPs?


An identity - reference to a memory block
A state - data, field and attributes
A behavior - methods to manipulate the state of the object

8. Define Class.
A class declaration defines a new type that links code and data. It is then used to declare
objects of that class. Thus a class is an logical abstraction but an object has physical existence.

9. Define NULL function


NULL defines empty stack or no content in the stack/queue/list.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


10. What is Multiple Inheritance?
Inheritance is the process by which objects of one class acquire the properties of objects
of another class. In OOP, the concept of inheritance provides the idea of reusability.

11. Define Exception handling


Exceptions are used to report error conditions. Exception handling is built upon three
keywords:
1. try
2. catch
3. throw

12. Define queue.


A structure with a series of elements.
Uses FIFO mode.
It is used when an element is not directly accessed using pointer and index but
only through FIFO.
Two pointers are used for insertion and deletion.

13. What is a Preprocessor Directive?


A preprocessor directive starts with # sign. The following are the types of preprocessor
directives:
1. Preprocessor global variables
2. Preprocessor constants

14. Mention the flags available for queue.


1. QerrrorFlag
2. HeaderFlag
3. TrailingFlag
4. cirQuFlag
5. PolyQuFlag

15. Define process.


A process is a program that performs a specific function.

16. Define task and Task state.


A task is a program that is within a process. It has the following states:
1. Ready
2. Running
3. Blocked
4. Idle
3. Define (TCB)
The TCB stands for Task Control Block which holds the control of all the tasks within the
Block. It has separate stack and program counter for each task.

17. What is a thread?


A thread otherwise called a lightweight process (LWP) is a basic unit of CPU utilization,
it comprises of a thread id, a program counter, a register set and a stack. It shares with other

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


threads belonging to the same process its code section, data section, and operating system
resources such as open files and signals.

18. What are the benefits of multithreaded programming?


The benefits of multithreaded programming can be broken down into four major
categories:
Responsiveness
Resource sharing
Economy
Utilization of multiprocessor architectures

19. Compare user threads and kernel threads.


User threads Kernel threads
User threads are supported above the kernel and are implemented by a thread library at
the user level Kernel threads are supported directly by the operating system

20. Define RTOS.


A real-time operating system (RTOS) is an operating system that has been developed for
real-time applications. It is typically used for embedded applications, such as mobile telephones,
industrial robots, or scientific research equipment.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 7 STUDY OF MAILBOX

AIM
To study of Mailbox using TI CC3200 Launch pad with Code Composer Studio (CCS)
Integrated Development Environment (IDE) and Interfacing Board with Terminal Emulator
Software.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI pinmux tool

THEORY:

MESSAGE MAIL BOXES


Inter-task Communication

Information transfer is sometimes needed among tasks or between the task and the ISR.
Information transfer can be also called inter-task communication.

There are two ways to implement it: through the global variable or by sending messages.

When using the global variable, it is important to ensure that each task or ISR possesses the
variable alone. The only way to ensure it is enabling the interrupt. When two tasks share one
variable, each task possesses the variable alone through firstly enabling then disabling the
interrupt or by the semaphore. Please note that a task can communicate with the ISR only
through the global variable and the task wont know when the global variable has been modified
by the ISR (unless the ISR sends signals to the task in manner of semaphore or the task keeps
searching the variables value). In this case, CooCox CoOS supplies the mailboxes and the
message queues to avoid the problems above.

* Mailboxes

System or the user code can send a message by the core services. A typical mail message,
also known as the exchange of information, refers to a task or an ISR using a pointer variable,
through the core services to put a message (that is, a pointer) into the mailbox. Similarly, one or
more tasks can receive this message by the core services. The tasks sending and receiving the
message promise that the content that the pointer points to is just that piece of message.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


The mailbox of CooCox CoOS is a typical message mailbox which is composed of two parts:
one is the information which expressed by a pointer of void; the other is the waiting list which
composed of the tasks waiting for this mailbox. The waiting list supports two kinds of sorting:
FIFO and preemptive priority. The sorting mode is determined by the user when creating the
mailbox.

You can create a mailbox by calling CoCreateMbox ( ) in CooCox CoOS. After being created
successfully, there wont be any message inside. You can send a message to the mailbox by
calling CoPostMail ( ) or isr_PostMail ( ) respectively in a task or the ISR. You can also get a
message from the mailbox by calling CoPendMail ( ) or CoAcceptMail ( ).

The use of the mailbox

*
void myTaskA(void* pdata)
{
void* pmail;
StatusType err;
..........
mboxID = CoCreateMbox(EVENT_SORT_TYPE_PRIO); //Sort by preemptive
priority pmail = CoPendMail(mboxID,0,&err);
..........
}
void myTaskB(void* pdata)
{
......
CoPostMail(mboxID,"hello,world");
......
}
void myISR(void)
{
CoEnterISR ( );
......
isr_PostMail(mboxID,"hello,CooCox");
CoExitISR ( );
}

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


* Message Queues

Message queue is just an array of mailboxes used to send messages to the task in fact. The
task or the ISR can put multiple messages (that is, the pointers of the message) to the message
queue through the core services. Similarly, one or more tasks can receive this message by the
core services. The tasks sending and receiving the message promise that the content that the
pointer points to is just that piece of message.

The difference between the mailbox and the message queue is that the former can store only
one piece of message while the latter can store multiple of it. The maximum pieces of message
stored in a queue are determined by the user when creating the queue in CooCox CoOS.

In CooCox CoOS, message queue is composed of two parts: one is the struct which pointed to
the message queue; the other is the waiting list which composed of the tasks waiting for this
message queue. The waiting list supports two kinds of sorting: FIFO and preemptive priority.
The sorting mode is determined by the user when creating the message queue.

You can create a message queue by calling CoCreateQueue ( ) in CooCox CoOS. After
being created successfully, there wont be any message inside. You can send a message to the
message queue by calling CoPostQueueMail ( ) or isr_PostQueueMaill ( ) respectively in a task
or the ISR. Similarly, you can also obtain a message from the message queue by calling
CoPendQueueMail ( ) or CoAcceptQueueMail ( ).

The use of the message queue

*
void myTaskA(void* pdata)
{
void* pmail;
Void* queue[5];
StatusType err;
..........
queueID = CoCreateQueue(queue,5,EVENT_SORT_TYPE_PRIO);
//5 grade, sorting by preemptive priority
pmail = CoPendQueueMail(queueID ,0,&err);
..........
}
void myTaskB(void* pdata)
{
......
CoPostQueueMail(queueID ,"hello,world");

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


......
}
void myISR(void)
{
CoEnterISR ( );
......
isr_PostQueueMail(queueID ,"hello,CooCox");
CoExitISR ( );
}

RESULT:
Thus the study of Mailbox concept using TI CC3200 Launch pad with Code Composer
Studio (CCS) Integrated Development Environment (IDE) and Interfacing Board with Terminal
Emulator Software was done successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. Mention some advanced bus standard protocols;


GMII (Gigabit Ethernet MAC Interchange Interface)
XGMI (10 Gigabit Ethernet MAC Interchange Interface)
CSIX-1 6.6 Gbps
Rapid IO interconnect specification v1.1 at 8 Gbps

2. What do you meant by high speed device interfaces?


Fail-over clustering would not be practical without some way for the redundant servers to
access remote storage devices without taking a large performance hit, as would occur if these
devices were simply living on the local network. Two common solutions to this problem are
double-ended SCSI and fibre-channel.

3. Mention some I/O standard interfaces.


HSTL - High Speed Transceiver Logic (Used in high speed operations)
SSTL - Stub Series Terminated Logic (Used when the buses are needed to isolate from
the large no. of stubs)

4. What are the advantages of Assembly language?


It gives the precise control of the processor internal devices and full use of processor
specific features in its instruction sets and addressing modes.
The machine codes are compact, which requires only small memory.
Device drivers need only few assembly instructions.

5. What are advantages of high level languages?


Data type declaration
Type checking
Control structures
Probability of non-processor specific codes

6. Define In -line assembly


Inserting an assembly code in between is said to be in-line assembly.

7. Mention the elements of C program.


Files:
Header files
Source files
Configuration files
Preprocessor directives
Functions:
Macro function
Main function
Interrupt service routines or device drivers
Others:
Data types

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Data structures
Modifiers
Statements
Loops and pointers

8. What is the use of MACRO function?


A macro function executes a named small collection of codes, with the values passed by
the calling function through its arguments.
It has constant saving and retrieving overheads.

9. What is the use of interrupt service routines or device drivers?


It is used for the declaration of functions and datatypes, typedef and executes named set
of codes.
ISR must be small (short), reentrant or must have solution for shared data problem.

10. What are the datatypes available in C language?


Char - 8 bit; byte - 8 bit; short - 16 bit; unsigned short - 16 bit; unsigned int - 32 bit; int -
32 bit; long double - 64 bit; float - 32 bit; double 64

11. What are the datatypes available in C language?


Char - 8 bit; byte - 8 bit; short - 16 bit; unsigned short - 16 bit; unsigned int - 32 bit; int -
32 bit; long double - 64 bit; float - 32 bit; double 64

12. Mention the data structures available in C language.


1. Queue
2. Stack
3. Array (1-dimentional and multi-dimentional)
4. List
5. Tree
6. Binary-tree

13. Write the syntax for declaration of pointer and Null-pointer.


Syntax for pointer:
void *portAdata
Syntax for Null-pointer:
#define NULL (void*) 0x0000

14. Explain pass by values.


The values are copied into the arguments of the function.
Called programs does not change the values of the variables

15. What are the three conditions that must be satisfied by the re-entrant function?
All the arguments pass the values and none of the argument is a pointer.
When a non-atomic operation that function should not operate on the function declared
outside.
A function does does not call a function by itself when it is not reentrant.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


16. Explain pass by reference.
When an argument value to a function is passed through a pointer, then the value can be
changed.
New value in the calling function will be returned from the called function.

17. Write the syntax for function pointer.


Syntax:
void *<function_name> (function arguments)

18. Define queue.


A structure with a series of elements.
Uses FIFO mode.
It is used when an element is not directly accessed using pointer and index but
only through FIFO.
Two pointers are used for insertion and deletion.

19. Define stack.


A structure with a series of elements which uses LIFO mode.
An element can be pushed only at the top and only one pointer is used for POP.
Used when an element is not accessible through pointer and index, but only
through LIFO.

20. Define List.


Each element has a pointer to its next element.
Only the first element is identifiable and it is done using list-top pointer (header).
Other element has no direct access and is accessed through the first element.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 8 Interrupt Performance characteristics of ARM &
FPGA

AIM

To study the interrupt performance characteristics of ARM and FPGA and determine their efficiency

APPARATUS REQUIED
ARM + FPGA (Spartan-3E [XC3S250E]) Evaluation board.
5V/2A Adapter.
USB Cable

THEORY:
The complexity of the design of a new SoC has consistently increased during the latest 10
years, due to the smartphone/tablet revolution which pushed the semiconductor industry to
release constantly faster and less power greedy chips. The time-to-market requirements have
shrunk as well, giving even more challenges to engineers working in this sector: develop a
complicated design and verify it thoroughly in a very short time, mainly through pre-silicon
verification since the increased cost of silicon masks has made Test Chips less attractive.

With the increasing complexity of cores, the validation phase now has even more
importance during the development. The risk of shipping buggy SoCs must be minimized
through careful analysis and the use of different verification and validation processes, starting
from the very beginning of the project and continuing through each design phase until the end of
the life cycle of the chip.
The design of the SoC is usually just a small part of the job compared to the entire effort
necessary to develop a new product - the majority of the costs are in the verification of the
product and developing the software to run on it.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


The following chart (IBS 2013 data) shows an interesting analysis of the costs involved

The chart shows that the growth of the costs associated with validation and software have
been growing exponentially when compared with the process technology scale; this is the reason
why they both see a dramatic rise in importance, not only at the end of the design phase but from
the beginning of the project, where hardware design, verification and software are performed
simultaneously.
There are mainly three methods to test a design before the tape-out, each of them has
different advantages and disadvantages thus all three are used during the development of a core.

Simulation is used from the very beginning of the design because it gives a complete
view of the signals in the RTL and it is often used to verify functionality at the module level.
When the structure of the chip is close to being completed, the limits of this method start to rise
quickly: the huge computational power required for the simulation limits the speed of the
execution to 100Hz for the latest cores, requiring too much time to execute a boot of an
operating system for example.
The performance problem could be partially solved by using an emulator which, with
specialized hardware, can reach a speed of 1MHz, still keeping the same complete view of the

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


internal status of the system. The main disadvantages of emulators are the cost of ownership,
which is an order of magnitude bigger than the other methods, and again the time required to
boot an actual operating system is not suitable for software developers who need to reboot few
times during the day when developing kernel and device drivers.

Last but not least is the use of FPGAs: this method has been often relegated to being used
during the later stages of validation, or to easily replicate a design for software developers, since
it does not enable a complete (and not even a sufficient) view of the status of the system which
helps the hardware developers to find the source of an error. Additionally the burden of having to
setup a FPGA with the right hardware and all the components needed to have a functional FPGA
prototyping board make this method less attractive for designers.
Even though the cost of a simulator is the cheapest and the most scalable option for
testing a design, each solution must be taken in consideration together with the number of gates
and speed achievable. In the following graph it is possible to see how the different modus
operandi compares using this new metric relative to a final silicon chip:

As can be easily deduced from the graph, the simulator has the least attractive price/speed
ratio whilst the FPGA has the most attractive one. This is the main reason that convinced ARM
to start to think about to using FPGAs as integral part of its verification process and developing a
new FPGA farm for this purpose.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Even though an additional step is required to port the design to an FPGA, the cost and speed
benefits are much bigger and become crucial in the validation phase. Software developers can
connect to an FPGA board directly through a JTAG connection and debug their code running on
a development core. This brings benefits to both the hardware and software engineer: the SoC
can be verified against real code and software engineers can test their code at early stages of the
SoC development.
In the following graph is possible to see the general structure of the farm developed and
used within ARM:

The structure of the farm has been designed for scalability. Each module of the farm is
composed by a Linux server, an mbed and four pairs of FPGA boards/DSTREAM debugger. The
server is the main access for the users of the farm and, through terminal, gives access to all of the
operations that can be executed on the FPGA such as mapping the design on the FPGA to the
read/write from the serial port.
Engineers who designed the farm did not have to look very far to find a suitable FPGA
board as ARM already had what they were looking for: ARMs Versatile Express series boards
fit perfectly for the scope of the farm, giving all the necessary flexibility and scalability.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


ARM Versatile Express boards minimize the time required to setup a prototype and
allow engineers to concentrate on IP or software instead of debugging the development system.
The architecture of Versatile Express board has been designed for the development of future
ARM cores and, with all necessary peripherals, give engineers a very flexible instrument to
debug and test IPs before sending it to customers. In order to overcome the small visibility of the
internal signals inside the cores, each Versatile Express has been connected to a Synopsis
Protolink which provides simulator-like visibility with small effort. Protolink can be used in
different ways:
As a Probe it is possible to acquire 1200 signals/FPGA at 10MHz to about 1M cycles
Scan shift gives about 93% of visibility of the core
Vector capture and replay allows snapshot of the status of the FPGA plus the vector
capture of the external signals for replay in a simulator where an issue can be investigated
in depth thanks to the full visibility.
To add even more debug capabilities, a DSTREAM debug and trace device is connected
through a JTAG port to each Versatile Express. DSTREAM is not just a simple JTAG debug
interface but a fully customizable device to access to all the features of a targets ARM
CoreSight. If paired with the new CoreSight System Trace Macrocell (STM), DSTREAM
become a powerful debugging tool which, not only gives the execution trace of the cores, but it
will record selected software and hardware events. The STM supports time stamping and can be
used by any device on the system main bus, providing time correlated information on events
generated by CPU, GPU or DMA controllers.
A remarkable advantage of using DSTREAM over a normal debug device is the ability for
it to be configured for new devices that are still in development. A good example of a successful
use of DSTREAM in a real use case scenario was the development of ARM Cortex-A53 and
Cortex-A57 processors: DSTREAM already supports ARMv8 code trace and, using CoreSight
Access Tool, it was possible to have debugging capabilities on the cores before a debug
connection to the targets was available. Obviously it is possible to create configurations also for
third party IPs to enable debug during development of complex targets running on the Versatile
Express.
Even though DSTREAM provides a faster USB2.0 connection, Ethernet has been chosen for
the FPGA farm to enable remote access simply by connecting it to through the existing network
infrastructure.
mBed is a cheap and effective way to develop a prototype but there is nothing to stop you to
use it for fully functional solutions! Thats exactly what happened in this case: mbed has a full
set of peripherals such as Ethernet, USB, I/O and, most importantly, it is very easy to program.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


ARM engineers used a simple mBed board to develop an easy but functional system to manage
the power of DSTREAMs, Versatile Express boards and Synopsis Protolink adapters. The
system, connected through Ethernet to the server, allows remote user to reset and power cycle
each single device they are working on without moving from their desk.

Software developers can use DS-5 Development Studio for the whole life cycle of SoC
development, from the design phase, where no silicon is available to a final product, right
through to the final product. This aspect is particularly important since the costs and time to get
familiar with different tools with different characteristics can jeopardize the advantages of
having an early access to the core in development.
The usage of the FPGA farm is not limited to CPU design within ARM: The Media
Processing Division uses it as a part of its development process to test their GPUs.The scalability
of the solution has been proven by the 86 FPGA boards currently installed in two farms in
Cambridge and more are being installed. Access to these boards is guaranteed from all ARM

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


sites and the usage of FPGAs is now essential to the development of all new cores in ARM, both
from a hardware and software point of view. Its also worth mentioning that the Processor
Division is not the only user of the farm: the Media Processing Division uses it as a part of its
development process to test their GPUs, sharing all of the existing infrastructure, as proof of the
great flexibility achieved thanks to the ARM tools.
Conclusion:
In this article we analysed the three main different methods currently available for the
verification and validation of a new chip design. We introduced the /MHz.MG metric to
compare effectively the different methods and, in particular, we described how FPGA can be
effectively used for this scope. We described the current FPGA farm used within ARM to test
and verify new designs and how ARM products such as Versatile Express and
DSTREAM simplify the whole process and enable both hardware and software developers to
collaborate on the same project in an effective way.
The scalability and the effectiveness of the solution has been proven during the last two
years where ARM engineers in different sites around the world (Cambridge, Austin, Sophia-
Antipolis) developed the first two ARMv8 cores, Cortex-A53 and Cortex-A57, while software
developers were developing the support software in parallel.

RESULT:
Thus the Study of interrupt performance characteristics of ARM and FPGA was done successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS
1. What is a FPGA?
A field-programmable gate array (FPGA) is an integrated circuit designed to be
configured by a customer or a designer after manufacturing hence "field-programmable".
The FPGA configuration is generally specified using a hardware description language
(HDL), similar to that used for an application-specific integrated circuit (ASIC).

2. What are the different methods of programming of PALs?


Programming languages (by chronological order of appearance)
PALASM "PAL assembler"
CUPL (Compiler for Universal Programmable Logic)
ABEL

3. What is an antifuse?
Antifuses are widely used to permanently program integrated circuits (ICs).
Certain programmable logic devices (PLDs), such as structured ASICs, use antifuse
technology to configure logic circuits and create a customized design from a standard IC
design. Antifuse PLDs are one time programmable in contrast to other PLDs that
are SRAM based and which may be reprogrammed to fix logic bugs or add new functions.

4. What are the steps in ASIC physical design?


The main steps in the ASIC physical design flow are:
Design Netlist (after synthesis)
Floorplanning
Partitioning
Placement
Clock-tree Synthesis (CTS)
Routing
Physical Verification
GDS II Generation

5. What are macros?


A macro in computer science is a rule or pattern that specifies how a certain input
sequence (often a sequence of characters) should be mapped to a replacement output
sequence (also often a sequence of characters) according to a defined procedure. The
mapping process that instantiates (transforms) a macro use into a specific sequence is known
as macro expansion.

6. What are Programmable Interconnects?

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Programmable interconnect points, or PIPs, provide the routing paths used to
connect the inputs and outputs of IOBs and CLBs into logic networks.
A PIP is a CMOS transistor switch that you can program to turn on or off.

7. Give the steps in ASIC design flow.

8. What are the characteristics of FPGA?


None of the mask layers are customized
A method for programming the basic logic cells and interconnect.
The core is a regular array of programmable basic logic cells that can implement
combinational as well as sequential logic (flip-flops).
A matrix of programmable interconnect surrounds the basic logic cells.
Design turnaround is a few hours

9. What are the types of gate arrays in ASIC?


1) Channeled gate arrays 2) Channel less gate arrays 3) Structured gate arrays

10. What is the standard cell-based ASIC design?


A cell-based ASIC (CBIC) USES PREDESIGNED LOGIC CELLS KNOWN AS STANDARD
CELLS. The standard cell areas also called fle4xible blocks in a CBIC are built of rows of standard
cells. The ASIC designer defines only the placement of standard cells and interconnect in a CBIC. All
the mask layers of a CBIC are customized and are unique to a particular customer.

11. The address system supported by ARM systems is/are


Little Endian
Big Endian

12. The address space in ARM is 2^32

13. The ARM processors doesnt support Byte address ability?


NO, The ability to store data in the form of consecutive bytes

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


14. ARM processors where basically designed for Mobile systems

15. The main importance of ARM micro-processors is providing operation with Low cost
and low power consumption

16. ARM stands for Advanced RISC Machines

17. In ARM, PC is implemented using General purpose register

18. The additional duplicate register used in ARM machines are called as Banked registers

19. Each instruction in ARM machines is encoded into 4 byte Word.

20. The addressing mode where the EA of the operand is the contents of Rn is Post-indexed
mode

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 9 FLASHING of LEDS WITH ARM
PROCESSOR

AIM
To flash LEDs with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:
A light-emitting diode (LED) is a two-lead semiconductor light source. It is a pn
junction diode, which emits light when activated. When a suitable voltage is applied to the
leads, electrons are able to recombine with electron holes within the device, releasing energy in
the form of photons. This effect is called electroluminescence, and the color of the light
(corresponding to the energy of the photon) is determined by the energy band gap of the
semiconductor.
An LED is often small in area (less than 1 mm2) and integrated optical components may be
used to shape its radiation pattern.
Appearing as practical electronic components in 1962, the earliest LEDs emitted low-
intensity infrared light. Infrared LEDs are still frequently used as transmitting elements in
remote-control circuits, such as those in remote controls for a wide variety of consumer
electronics. The first visible-light LEDs were also of low intensity, and limited to red. Modern
LEDs are available across the visible ,ultraviolet, and infrared wavelengths, with very high
brightness.
Early LEDs were often used as indicator lamps for electronic devices, replacing small
incandescent bulbs. They were soon packaged into numeric readouts in the form of seven-
segment displays, and were commonly seen in digital clocks.
In this experiments three different colour leds interfacing with the CC3200 launchpad using
experimenter board.
D5 GREEN (GPIO_11) Glows when the GPIO is logic-1
D6 YELLOW (GPIO_10) Glows when the GPIO is logic-1
D7 RED (GPIO_09) Glows when the GPIO is logic-1

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROCEDURE:

1. Connect the Embedded lab kit to PC using USB cable.


2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name Led_ blinky
5. Replace the code of main.c with the respective Led_ blinky code
6. Open the TI pinmux tool.
7. Select the pins Using TI pinmux tool. Download the driverlib of the pinmuxconfig.c and
pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in Keyboard code in CCS project
explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the Led_ blinky main.c code.
12. Resume the main.c code.
13. See the output in Green,yellow,Red on-board leds .

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:

// Red, Orange, Green On Board LED's Blinky

// IC Pin | GPIO | Port | Value

//---------------------------------------

// 64 | GPIO09 | A1 | 0X02

// 01 | GPIO10 | A1 | 0X04

// 02 | GPIO11 | A1 | 0X08

#include <stdio.h>

// Driverlib includes

#include "hw_types.h"

#include "hw_ints.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "interrupt.h"

#include "hw_apps_rcm.h"

#include "prcm.h"

#include "rom.h"

#include "rom_map.h"

#include "prcm.h"

#include "gpio.h"

#include "utils.h"

// Common interface includes

#include "pin_mux_config.h"

void main()

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PinMuxConfig();

while(1)

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x02); // pin 64 (Red led) high

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x00);// pin 64 (Red led) low

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x04);//pin 64 (yellow led) high

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x00);//pin 64 (yellow led) low

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x08);//pin 64 (Red led) high

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x00);//pin 64 (Red led) low

MAP_UtilsDelay(8000000);

RESULT:
Thus the flashing of LEDS with TI CC3200 Launch pad using Code Composer Studio
(CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What are the advantages of embedded system?


Advantages: Customization yields lower area, power, cost, etc.,

2. What are the disadvantages of embedded system?


Disadvantages: Higher HW/software development overhead design, compilers,
debuggers, etc., may result in delayed time to market

3. What are the main components of an embedded system?


Three main components of embedded systems:
The Hardware
Application Software
RTOS

4. Define embedded microcontroller.


An embedded microcontroller is particularly suited for embedded applications to perform
dedicated task or operation. Example: 68HC11xx, 8051, PIC, 16F877, etc.,

5. Explain digital signal processing in embedded system continued digitization of signals


increasing the role of DSP in ES.
Signals are represented digitally as sequence of "samples"
ADCs are moving closer to signals

6. What are the various classifications of embedded systems?


1. Small scale embedded systems
2. Medium scale embedded systems
3. Sophisticated embedded systems

7. What are the two essential units of a processor on an embedded system?


1. Program flow control unit (CU)
2. Execution unit (EU)

8. What does the execution unit of a processor in an embedded system do?


The execution unit implements data transfer and data conversion. It includes ALU and
circuits that execute instruction for jump, interrupt, etc.,

9. Give examples for general purpose processor.


1. Microprocessor
2. Microcontroller
3. Embedded processor
4. Digital Signal Processor
5. Media Processor

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


10. Define microprocessor.
A microprocessor fetches and processes the set of general-purpose instructions such as
data transfer, ALU operations, stack operations, I/O operations and other program control
operations.

11. Define software timer.


A software timer is software that executes the increase/decrease count value on an
interrupt from timer or RTC. Software timer is used as virtual timing device.

12. What are the forms of timer?


Hardware interrupt timer
Software timer
User software controlled hardware timer
RTOS controlled hardware timer
UP/DOWN count action timer
One-shot timer (No reload after overflow and finished states)

13. Define RTC


RTC Stands for Real Time Systems. Once the system starts, do not stop/reset and the count
value cannot be reloaded.

14. What is I2C?


Inter- Integrated Circuit (2-wire/line protocol) which offers synchronous communication.
Standard speed: 100Kbps and High speed: 400 Kbps

15. What are the bits in I2C corresponding to?


SDA - Serial Data Line and SCL - Serial Clock line

16. What is a CAN bus? Where is it used?


CAN stands for Controller Area Network. Serial line, bi-directional bus used in
automobiles. Operates at the rate of 1Mbps.

17. What is USB? Where is it used?


USB - Universal Serial Bus Operating speed - upto 12 Mbps in fast mode and 1.5Mbps in
low-speed mode.

18. What are the features of the USB protocol?


A device can be attached, configured and used, reset, reconfigured and used, detached
and reattached, share the bandwidth with other devices.

19. What are the four types of data transfer used in USB?
Controlled transfer
Bulk transfer
Interrupt driven data transfer
Iso-synchronous transfer

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


20. Explain briefly about PCI and PCI/X buses.
Used for most PC based interfacing
Provides superior throughput than EISA
Platform-independent
Clock rate is nearest to sub-multiples of system clock

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 10(a) INTERFACING STEPPER MOTOR WITH ARM
PROCESSOR

AIM
To Interface a stepper motor with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:

A stepper motor or step motor or stepping motor is a brushless DC electric motor that divides
a full rotation into a number of equal steps. The motor's position can then be commanded to
move and hold at one of these steps without any feedback sensor (an open-loop controller), as
long as the motor is carefully sized to the application in respect to torque and speed.
Switched reluctance motors are very large stepping motors with a reduced pole count, and
generally are closed-loop commutated.
DC brushed motors rotate continuously when DC voltage is applied to their terminals. The
stepper motor is known by its property to convert a train of input pulses (typically square wave
pulses) into a precisely defined increment in the shaft position. Each pulse moves the shaft
through a fixed angle.
Stepper motors effectively have multiple "toothed" electromagnets arranged around a
central gear-shaped piece of iron. The electromagnets are energized by an external driver
circuit or a microcontroller. To make the motor shaft turn, first, one electromagnet is given
power, which magnetically attracts the gear's teeth. When the gear's teeth are aligned to the first
electromagnet, they are slightly offset from the next electromagnet. This means that when the
next electromagnet is turned on and the first is turned off, the gear rotates slightly to align with
the next one. From there the process is repeated. Each of those rotations is called a "step", with
an integer number of steps making a full rotation. In that way, the motor can be turned by a
precise angle.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROCEDURE:

1. Connect the Embedded lab kit to PC using USB cable.


2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200, Connection-->Stellaris In-
Circuit Debug Interface
Project Name Stepper Motor
5. Replace the code of main.c with the respective Stepper Motor code
6. Open the TI pinmux tool.
7. Select the pins 59,60,61,62 using TI pin mux tool. And download the driver lib of the
pinmux Config.h, pinmux Config.c.
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in Stepper Motor code in CCS
project explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the Stepper Motor main.c code.
12. Resume the main.c code.
13. The output of the code is rotation of the stepper motor.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:

#include <stdio.h>

// Driverlib includes

#include "hw_types.h"

#include "hw_ints.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "interrupt.h"

#include "hw_apps_rcm.h"

#include "prcm.h"

#include "rom.h"

#include "rom_map.h"

#include "prcm.h"

#include "gpio.h"

#include "utils.h"

// Common interface includes

#include "pin_mux_config.h"

unsigned int i=1;

void main()

PinMuxConfig();

while(1)

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x09);

MAP_UtilsDelay(8000000);

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x00);

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x0C);

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x00);

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x06);

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x00);

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x03);

MAP_UtilsDelay(8000000);

MAP_GPIOPinWrite(GPIOA1_BASE, 0xFF, 0x00);

MAP_UtilsDelay(8000000);

RESULT:
Thus the Interfacing of Stepper Motor with TI CC3200 Launch pad using Code Composer
Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What are the functional requirements of embedded system?


Data Collection
Sensor requirements
Signal conditioning
Alarm monitoring

2. What are the main components of an embedded system?


Three main components of embedded systems:
The Hardware
Application Software
RTOS

3. What are the two essential units of a processor on an embedded system?

Program flow control unit (CU)


Execution unit (EU)

4. What does the execution unit of a processor in an embedded system do?


The execution unit implements data transfer and data conversion. It includes ALU and
circuits that execute instruction for jump, interrupt, etc.,

5. Give examples for general purpose processor.

Microprocessor
Microcontroller
Embedded processor
Digital Signal Processor
Media Processor

6. What are embedded cores?


More and more vendors are selling or giving away their processors and peripherals in a
form that is ready to be integrated into a programmable logic-based design. They both
recognize the potential for growth in the system-on-a-chip area and want a piece of the
royalties or want to promote the use of their particular FPGA or CPLD by providing libraries
of ready-to-use building blocks. Either way, you will gain with lower system costs and faster
time-to-market.

7. Define FPGAs
Field Programmable Gate Arrays (FPGAs) can be used to implement just about any
hardware design. One common use is to prototype a lump of hardware that will eventually
find its way into an ASIC.

8. What are dependability requirements of an embedded system?


Safety
Critical failure modes

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Certification
Maintainability
MTTR in terms of repairs per hour
Availability
A = MTTF / (MTTF + MTTR)
Security

9. Define bus.
Buses: The exchange of information. Information is transferred between units of the
microcomputer by collections of conductors called buses. There will be one conductor for each
bit of information to be passed, e.g., 16 lines for a 16 bit address bus. There will be address,
control, and data buses.

10. What are the classifications of I/O devices?


i. Synchronous serial input and output
ii. Asynchronous serial UART input and output
iii. Parallel one bit input and output
iv. Parallel port input and output

11. Give some examples for serial input I/O devices.


Audio input, video input, dial tone, transceiver input, scanner, serial IO bus input, etc.,

12. Give the steps for accomplishing input output data transfer.
Accomplishing input/output data transfer there are three main methods used to
perform/control input/output data transfers. They are,
Software programming (scanning or polling)
interrupt controlled
Direct memory access (DMA)

13. Give the limitations of polling technique.


The polling technique, however, has limitations.
It is wasteful of the processors time, as it needlessly checks the status of all devices all
the time.
It is inherently slow, as it checks the status of all I/O devices before it comes back to
check any given one again.
When fast devices are connected to a system, polling may simply not be fast enough to
satisfy the minimum service requirements. Priority of the device is determined

14. What do you meant by bus arbitration?


Bus Arbitration most processors use special control lines for bus arbitration, ie,
controlling the use of the address and data bus,
An input which the DMAC uses to request the bus
An output(s) indicating the bus status
An output indicating acceptance of the DMAC\'s bus request

15. What are the two characteristics of synchronous communication?

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Bytes/frames maintain constant phase difference and should not be sent at random time
intervals. No handshaking signals are provided during the communication.
Clock pulse is required to transmit a byte or frame serially. Clock rate information is
transmitted by the transmitter.

16. What do you mean by asynchronous communication?


The most basic way of sharing data is by copying the data in question to each server. This
will only work if the data is changed infrequently and always by someone with
administrative access to all the servers in the cluster.

17. What are the characteristics of asynchronous communication?


Variable bit rate - need not maintain constant phase difference
Handshaking method is used
Transmitter need not transmit clock information along with data bit stream

18. What are the three ways of communication for a device?


i. Separate clock pulse along with data bits
ii. Data bits modulated with clock information
iii. Embedded clock information with data bits before transmitting

19. Expand a) SPI b) SCI


SPI - SERIAL PERIPHERAL INTERFACE
SCI - SERIAL COMMUNICATION INTERFACE

20. What are the features of SPI?


SPI has programmable clock rates
Full-duplex mode
Crystal clock frequency is 8MHz
Open drain or totempole output from master to slave

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 10(b) INTERFACING OF TEMPERATURE SENSOR
WITH ARM PROCESSOR

AIM
To Interface temperature sensor with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:

LM35

Description
The LM35 series are precision integrated-circuit temperature devices with an output voltage
linearly-proportional to the Centigrade temperature. The LM35 device has an advantage over
linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large
constant voltage from the output to obtain convenient Centigrade scaling. The LM35 device does
not require any external calibration or trimming to provide typical

Features
Calibrated Directly in Celsius (Centigrade)
Linear + 10-mV/C Scale Factor
0.5C Ensured Accuracy (at 25C)
Rated for Full 55C to 150C Range
Suitable for Remote Applications

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROCEDURE:

1. Connect embedded lab kit to PC using USB cable. Jumper position for temperature sensor.

2. Open Code Composer Studio CCS V6.1.1


3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name Temperature Sensor
5. Replace the code of main.c with the respective Temperature Sensor code
6. Open the TI pinmux tool.
7. Select the pins Using TI pinmux tool. Download the driverlib of the pinmuxconfig.c and
pinmuxconfig.h
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in Temperature Sensor code in
CCS project explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the Temperature Sensor main.c code.
12. Resume the main.c code.
13. See the output in Expressions (CCS).

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:

#include <string.h>

#include <stdint.h>

#include <stdlib.h>

#include <stdbool.h>

// Driverlib includes

#include "utils.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "hw_types.h"

#include "hw_adc.h"

#include "hw_ints.h"

#include "hw_gprcm.h"

#include "rom.h"

#include "rom_map.h"

#include "interrupt.h"

#include "prcm.h"

#include "pin.h"

#include "adc.h"

#include "hw_gpio.h"

#include "gpio.h"

float ADC;

float readADC(unsigned long uiAdcInputPin);

void main()

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PRCMPeripheralClkEnable(PRCM_ADC, PRCM_RUN_MODE_CLK);

ADCTimerConfig(ADC_BASE,2^17);

ADCTimerEnable(ADC_BASE);

ADCEnable(ADC_BASE);

PinTypeADC(PIN_59, 0XFF);

ADCChannelEnable(ADC_BASE, ADC_CH_2);

while(1)

ADC=readADC(PIN_59);

float readADC(unsigned long uiAdcInputPin)

unsigned long ulSample;

UtilsDelay(800000);

if(MAP_ADCFIFOLvlGet(ADC_BASE, ADC_CH_2))

ulSample = MAP_ADCFIFORead(ADC_BASE, ADC_CH_2);

ulSample = (ulSample & 0x3ffc)>>2;

return ulSample;

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


RESULT:
Thus the Interfacing of Temperature Sensor with TI CC3200 Launch pad using Code
Composer Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What is meant by a forward reference in C?


The forward reference refers to the case when we point an address space of a smaller data
type with a pointer of a bigger data type this can be pictured as allocating memory in single
bytes and accessing it with integer pointer as chunks of 4.

2. Explain why cannot arrays be passed by values to functions?


Because in C when you say the name of the array it means the address of the first element.
Example :
int a[];
func (a);
int func(int a[]);
In this when you call the function by passing the argument a actually &a[0](address of first
element) gets passed. Hence it is impossible to pass by value in C.

3. Why cannot arrays be passed by values to functions?


When an array is passed to a function, the array is internally changed to a pointer. And
pointers are always passed by reference.

4. What is the Scope of static variables?


Scope of static variable is within the file if it is static global. Scope of static variable is
within the function if variable is declared local to a function. But the life time is throughout
the program

5. What is ISR? Can they be passed any parameter and can they return a value?

ISR refers to the Interrupt Service Routines. These are procedures stored at specific memory
addresses which are called when certain type of interrupt occurs. The ISRs cannot return a value
and they cannot be passed any parameters.

6. Is it necessary to start the execution of a program from the main() in C?


Normally you are at liberty to give functions whatever names you like, but main is
special your program begins executing at the beginning of main. This means that every
program must have a main somewhere.

7. Explain can structures be passed to the functions by value?


Yes structures can be passed to functions by value. Though passing by value has two
disadvantages:
1) The charges by the calling function are not reflected
2) Its slower than the pass by reference function call.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


8. Can structures be passed to the functions by value?
Yes structures can be passed by value. But unnecessary memory wastage.

9. Explain what are the different storage classes in C?


Four types of storage classes are there in c.
1.Auto
2.Register
3.Static
4.Extern or Global

10. Explain can microcontroller work independently?


Obviously, it can work independently. But to see the output we need certain output
devices like LED, Buzzer can be connected to check its functionality. Without the help of
any o/p device connected we can check the functionality of Microcontroller.

11. Define Process?


Process is a computational unit that processes on a CPU under the control of a scheduling
kernel of an OS. It has a process structure, called Process control block. A process defines a
sequentially executing program and its state.

12. What is meant by operating system?


An operating system (OS) is software that manages computer hardware and software
resources and provides common services for computer programs. The operating system is an
essential component of the system software in a computer system. Application programs
usually require an operating system to function.

13. What is termed as task?


A task is a set of computations or actions that processes on a CPU under the control of a
scheduling kernel. It also has a process control structure called a task control block that saves
at the memory. It has a unique ID. It has states in the system as follows: idle, ready, running,
blocked and finished.

14. What are the states of a process?


Processes may be in any one of the 5 states,
New
Ready
Running
Waiting
Terminated

15. Define Scheduling?


This is defined as a process of selection which says that a process has the right to use the
processor at given time.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


16. What is scheduling policy?
It says the way in which processes are chosen to get promotion from ready state to
running state.

17. What is scheduling overhead?


It is defined as time of execution needed to select the next execution process.

18. Define priority scheduling?


A simple scheduler maintains a priority queue of processes that are in the runnable state.

19. Give the different styles of inter-process communication?


memory.

20. What is the function in ready state?


The process has all the resources available that it needs to run, but the CPU is not
currently working on this process's instructions. Processes in the Ready state are placed in the
ready queue.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Exp. No: 11 IMPLEMENTING ZIGBEE PROTOCOL WITH
ARM PROCESSOR

AIM
To Implement Zigbee Protocol with TI CC3200 using CCS IDE & TI Pinmux tool.

APPARATUS REQUIED
1. TI CC3200 Launch Pad
2. Computer with CCS IDE Software
3. Tera Term (Terminal Emulator) software
4. Interfacing board
5. USB Cable
6. Connecting wires
7. TI Pinmux tool

THEORY:

UART

A universal asynchronous receiver/transmitter abbreviated UART is a computer


hardware device that translates data between characters (usually bytes) in a computer and
an asynchronous serial communication format that encapsulates those characters between start
bits and stop bits. UARTs are commonly used in conjunction with communication standards
such as TIA (formerly 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 (IC) used for serial
communications over a computer or peripheral device serial port. UARTs are now commonly
included in microcontrollers. A dual UART, or DUART, combines two UARTs into a single
chip. An octal UART or OCTART combines eight UARTs into one package.

ZIGBEE

ZigBee is an IEEE802.15.4-based specification for a suite of high-level communication


protocols used to create personal area networks with small, low-power digital radios.
The technology defined by the ZigBee specification is intended to be simpler and less expensive
than other wireless personal area networks (WPANs), such as Bluetooth or Wi-Fi. Applications
include wireless light switches, electrical meters with in-home-displays, traffic management
systems, and other consumer and industrial equipment that requires short-range low-rate wireless
data transfer.
Its low power consumption limits transmission distances to 10100 meters line-of-sight,
depending on power output and environmental characteristics. ZigBee devices can transmit data
over long distances by passing data through a mesh network of intermediate devices to reach

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


more distant ones. ZigBee is typically used in low data rate applications that require long battery
life and secure networking ( ZigBee networks are secured by 128 bit symmetric
encryption keys.) ZigBee has a defined rate of 250 k bit/s, best suited for intermittent data
transmissions from a sensor or input device.

PROCEDURE:
1. Connect the Embedded lab kit to PC using USB cable. Connect reciver zigbee module to
PC using USB cable.
2. Open Code Composer Studio CCS V6.1.1
3. Project-->Import CCS Projects
4. Select the Target--> Wireless connectivity MCU, CC3200,
Connection-->Stellaris In-Circuit Debug Interface
Project Name UART Zigbee
5. Replace the main.c code with the respective UART zigbee code.
6. Open the TI pinmux tool.
7. Select the pins 53, 45. And download the pin_mux_config.c , pin_mux_config.h.
8. Copy and paste the pinmuxconfig.c and pinmuxconfig.h in UART Zigbee code in CCS
project explorer.
9. Change the properties of the program,
General-->Build-->ARM compiler-->Add
C:\ti\CC3200-SDK\cc3200sdk\driverlib
C:\ti\CC3200-SDK\cc3200sdk\inc
C:\ti\CC3200-SDK\cc3200sdk\example\common
10. ARM Linker-->File search path-->Add
C:\ti\CC3200SDK\cc3200-sdk\driverlib\ccs\Release\driverlib.a
11. Build and debug the Led_ blinky main.c code.
12. Resume the main.c code.
13. Open the computer management ,
Device manager-->Ports-->CC3200LP Dual Port(COM31)
Note down the Port number-->COM31
14. Open the Tera term. And select the Serial-->Port:COM129: CC3200LP Dual
port(COM129)
15. Select the Setup-->Serial port.
In Serial port setup, Select
Port--> COM31
Baud rate--> 115200-->Ok
16. Output of the UART zigbee.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PROGRAM:

// UART zigbee

// Sending "STEPS" String Continously to PC using zigbee

// In Tera term default uart configuration with 115200 Baud rate.

// IC Pin | GPIO | Port | Value

//---------------------------------------

// 53 | GPIO30 |A3.6 |0x02

// 45 | GPIO32 |A3.7 |0x04

// Driverlib includes

#include "rom.h"

#include "rom_map.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "hw_types.h"

#include "hw_ints.h"

#include "uart.h"

#include "interrupt.h"

#include "utils.h"

#include "prcm.h"

// Common interface include

#include "pin_mux_config.h"

unsigned char msg[]={"STEPS \n\n"}; // Display STEPS

unsigned int i;

void main()

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


PinMuxConfig();

UARTConfigSetExpClk(UARTA0_BASE,PRCMPeripheralClockGet(PRCM_UARTA0), 115200,

(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));

while(1)

for(i=0; msg[i]!='\0'; i++)

UARTCharPut(UARTA0_BASE, msg[i]);

UtilsDelay(8000000);

RESULT:
Thus the Interfacing of Zigbee Protocol with TI CC3200 Launch pad using Code Composer
Studio (CCS) Integrated Development Environment (IDE) and TI Pinmux tool was done
successfully.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


VIVA QUESTIONS

1. What is ARM stands for?


ARM, originally Acorn RISC Machine, later Advanced RISC Machine

2. What is mean by RISC?


RISC- Reduced Instruction Set Computing. A RISC-based computer design approach
means processors require fewer transistors than typical complex instruction set computing
(CISC) x86 processors in most personal computers.

3. What is the Abbreviation for CISC?


CISC-Complex Instruction Set Computing.

4. Who Developed the ARM?


The British computer manufacturer Acorn Computers first developed the Acorn RISC
Machine architecture (ARM) in the 1980s to use in its personal computers.

5. What is the acronym of MIPS?


MIPS (originally an acronym for Microprocessor without Interlocked Pipeline Stages) is
a reduced instruction set computer (RISC) instruction set architecture (ISA) developed by MIPS
Technologies (formerly MIPS Computer Systems, Inc.).

(OR)

MIPS-million instructions per second (MIPS)

6. What is ARM Cortex-M Stands for?


The ARM Cortex-M is a group of 32-bit RISC ARM processor cores licensed by ARM
Holdings. The cores are intended for microcontroller use, and consist of the Cortex-M0, M0+,
M1, M3, M4, and M7.

7. What are all the key features of Cortex-M3?


Key features of the Cortex-M3 core are:
ARMv7-M architecture
3-stage pipeline with branch speculation.
Instruction sets:
Thumb (entire).
Thumb-2 (entire).
32-bit hardware multiply with 32-bit or 64-bit result, signed or unsigned, add or
subtract after the multiply.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


32-bit hardware divide (2-12 cycles).
Saturation arithmetic support.
1 to 240 interrupts, plus NMI.
12 cycle interrupt latency.
Integrated sleep modes.

8. What is Thumb instruction in ARM?


To improve compiled code-density, processors since the ARM7TDMI (released in 1994)
have featured the Thumb instruction set, which have their own state. (The "T" in "TDMI"
indicates the Thumb feature.) When in this state, the processor executes the Thumb instruction
set, a compact 16-bit encoding for a subset of the ARM instruction set. Most of the Thumb
instructions are directly mapped to normal ARM instructions. The space-saving comes from
making some of the instruction operands implicit and limiting the number of possibilities
compared to the ARM instructions executed in the ARM instruction set state.
9. What is pipe-line in terms of computing?
In computing, a pipeline is a set of data processing elements connected in series, where the
output of one element is the input of the next one. The elements of a pipeline are often executed
in parallel or in time-sliced fashion; in that case, some amount of buffer storage is often inserted
between elements.
10. What is Thumb-2 instruction in ARM?
Thumb-2 technology was introduced in the ARM1156 core, announced in 2003. Thumb-2
extends the limited 16-bit instruction set of Thumb with additional 32-bit instructions to give the
instruction set more breadth, thus producing a variable-length instruction set. A stated aim for
Thumb-2 was to achieve code density similar to Thumb with performance similar to the ARM
instruction set on 32-bit memory.

11. What is an embedded system? Differentiate between embedded system and real-time
system.
An embedded system is some combination of computer hardware and software, either
fixed in capability or programmable, that is specifically designed for a particular function.
Real-time systems are the ones that are designed to provide a result within a specific
time-frame.

12. State the Three Types of RTS?


Hard Real Time System
Firm Real Time System

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


Soft Real Time System

13. Define Hard and Soft real-time system.

A hard real-time system (also known as an immediate real-time system) is hardware or


software that must operate within the confines of a stringent deadline. The application may
be considered to be failed if it does not complete its function within the allotted time span.
Examples of hard real-time systems include components of pacemakers, anti-lock brakes and
aircraft control systems.

A soft real-time system is a system where a critical real-time task gets priority over other
tasks and retains that priority until it completes. As in hard real time systems, kernel delays
need to be bounded.
14. Describe Trigger Generator?
The Trigger generator is a representation at the mechanism used to trigger the
execution of individual jobs. It is not really a separate hardware unit, typically it is a part of
an executive software. Many of the jobs are periodic i.e. they execute regularly. The schedule
for these jobs can be obtained offline and loaded as a look up table to be used by the
scheduler.

15. Define real time database and give its types.


A real-time database system is a database system in which a timely response to a user
request is needed.
16. State the Types of Real-Time Database Systems.
Hard real-time database systems, e.g., safety-critical system such as an early warning
system, etc.
Soft real-time database systems, e.g., banking system, airline reservation system, digital
library, stock market system, etc.
Mixed real-time database systems, e.g., air traffic control system, etc.
17. What are the types of task classes in real time system?

There are five types of task classes:

(i)Periodic and aperiodic tasks


(ii) sporadic task
(iii) Critical task
(iv) Noncritical task

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT


18. Define Periodic Task.
Periodic task: There are many tasks in real time systems that are done repetitively.
For example one may wish to monitor the speed altitude and attitude of an aircraft every 100
ms. this sensor information will be used by periodic tasks that control surfaces of the aircraft
in order to maintain stability and other desired characteristics. The periodicity of these tasks
is known to the designer, and much tasks can be pre-scheduled.

19. What is Aperiodic Task?


Aperiodic task: There are many other tasks that are aperiodic, that occur occasionally.
For instance, when the pilot wishes to execute a turn a large number of subtasks. Associated
with that action are self-off aperiodic tasks cannot be predicted and sufficient completing
power must be held in a reserve to execute them in a timely fashion.

20. What Critical Task?


Critical tasks: Critical tasks are those whose timely executions is critical; if deadlines
are missed, catastrophes occur. Example include life support systems and the stability
control of air craft. If critical tasks are executed at a higher frequency then it is absolutely
necessary.

PREPARED BY MR.U.VINOTHKUMAR AP/ECE DR.N.G.P.IT

Você também pode gostar