This document describes Lab 3 of an embedded systems course. It introduces header files, constants, variables and functions used to initialize and control an MCU's peripherals like LEDs, timers, UART, and ADC. The code configures the MCU's clock, enables interrupts, and implements a state machine to control the LEDs and read the ADC based on UART input from a user. Functions are defined to initialize each peripheral and an ISR handles timer interrupts.
This document summarizes code for a lab experiment on a Tiva C Series microcontroller. It includes header files for variable definitions, Boolean logic, the microcontroller hardware, memory mapping, common types and macros, GPIO, timer, UART, and pin mapping functionality. It declares functions for initializing LEDs, buttons, timers, and UART. It sets constants for LED pins, button pins, debounce checks, timer frequencies, and UART baud rate. The main function initializes clocks, LEDs, buttons, UART, and timers. It enables interrupts and timers, and uses a for loop to display text on the UART console.
This document summarizes code for a digital signal processing lab that uses a Tiva C Series microcontroller. The code includes header files for variable definitions, Boolean definitions, and APIs for the microcontroller, memory map, common types, and peripherals like system control, GPIO, and timers. Functions are declared to initialize LEDs and a timer. The timer is configured to generate interrupts at different frequencies by changing the TIMER0_FREQ definition, and an interrupt service routine toggles the LEDs.
The document discusses signals and daemon processes in Unix system programming. It covers:
1) Signals are software interrupts that allow processes to handle asynchronous events. Processes can accept default signal actions, ignore signals, or catch signals using user-defined handlers.
2) Common signals include SIGINT, SIGTERM, SIGKILL. The signal() function allows processes to set handlers for signals.
3) Daemons are long-running background processes that handle system services. Daemons detach from the controlling terminal and session.
TAE Technologies is working to develop commercial, cutting-
edge nuclear fusion power. This research depends on a network
of equipment to create an ultra-high vacuum within their plasma
generator. A single day of downtime costs up to $150,000, so they
require a control system that is reliable and flexible enough to
simplify the addition of new equipment. Using ControlLogix®,
Studio 5000® programming environment and FactoryTalk®
View SE, TAE has developed a distributed and structured control
system and has not experienced a day of downtime for the past
eight years
Implementation of the ZigBee ZCL Reporting Configuration FeaturesSimen Li
This slide presents the implementation of the ZigBee ZCL Reporting Configuration features by taking TI Z-Stack Home 1.2.1 SampleLight project as an example.
The Rockwell Automation® Library of Process Objects helps
you quickly develop process solutions with rich functionality
and known performance. In this session, how to build a control
strategy using Library objects will be demonstrated. The Library
objects and their functions within a typical control system will
be presented, highlighting features for operators, maintainers
and engineers. Walk away understanding the value of using the
Library to develop process solutions.
Klessydra t - designing vector coprocessors for multi-threaded edge-computing...RISC-V International
The document describes a proposed Klessydra-T1 vector coprocessor architecture designed for multi-threaded edge computing cores. It achieves a 3x speedup over a baseline core through configurable SIMD and MIMD vector acceleration schemes. Benchmark results show cycle count reductions for workloads like convolution and matrix multiplication when using the coprocessor in various SISD, SIMD, and MIMD configurations. Resource utilization and maximum frequency are also analyzed.
This document summarizes code for a lab experiment on a Tiva C Series microcontroller. It includes header files for variable definitions, Boolean logic, the microcontroller hardware, memory mapping, common types and macros, GPIO, timer, UART, and pin mapping functionality. It declares functions for initializing LEDs, buttons, timers, and UART. It sets constants for LED pins, button pins, debounce checks, timer frequencies, and UART baud rate. The main function initializes clocks, LEDs, buttons, UART, and timers. It enables interrupts and timers, and uses a for loop to display text on the UART console.
This document summarizes code for a digital signal processing lab that uses a Tiva C Series microcontroller. The code includes header files for variable definitions, Boolean definitions, and APIs for the microcontroller, memory map, common types, and peripherals like system control, GPIO, and timers. Functions are declared to initialize LEDs and a timer. The timer is configured to generate interrupts at different frequencies by changing the TIMER0_FREQ definition, and an interrupt service routine toggles the LEDs.
The document discusses signals and daemon processes in Unix system programming. It covers:
1) Signals are software interrupts that allow processes to handle asynchronous events. Processes can accept default signal actions, ignore signals, or catch signals using user-defined handlers.
2) Common signals include SIGINT, SIGTERM, SIGKILL. The signal() function allows processes to set handlers for signals.
3) Daemons are long-running background processes that handle system services. Daemons detach from the controlling terminal and session.
TAE Technologies is working to develop commercial, cutting-
edge nuclear fusion power. This research depends on a network
of equipment to create an ultra-high vacuum within their plasma
generator. A single day of downtime costs up to $150,000, so they
require a control system that is reliable and flexible enough to
simplify the addition of new equipment. Using ControlLogix®,
Studio 5000® programming environment and FactoryTalk®
View SE, TAE has developed a distributed and structured control
system and has not experienced a day of downtime for the past
eight years
Implementation of the ZigBee ZCL Reporting Configuration FeaturesSimen Li
This slide presents the implementation of the ZigBee ZCL Reporting Configuration features by taking TI Z-Stack Home 1.2.1 SampleLight project as an example.
The Rockwell Automation® Library of Process Objects helps
you quickly develop process solutions with rich functionality
and known performance. In this session, how to build a control
strategy using Library objects will be demonstrated. The Library
objects and their functions within a typical control system will
be presented, highlighting features for operators, maintainers
and engineers. Walk away understanding the value of using the
Library to develop process solutions.
Klessydra t - designing vector coprocessors for multi-threaded edge-computing...RISC-V International
The document describes a proposed Klessydra-T1 vector coprocessor architecture designed for multi-threaded edge computing cores. It achieves a 3x speedup over a baseline core through configurable SIMD and MIMD vector acceleration schemes. Benchmark results show cycle count reductions for workloads like convolution and matrix multiplication when using the coprocessor in various SISD, SIMD, and MIMD configurations. Resource utilization and maximum frequency are also analyzed.
AirSensEUR: AirQuality monitoring open framework technical presentationMarco Signorini
AirSensEUR is an open framework focused on air quality monitoring using low cost sensors. The project started on 2014 from a group of passionate researchers and engineers. The framework is composed by a set of electronic boards, firmware, and several software applications. The slides present the technical solutions adopted in the framework by entering on hardware and software related details. For more info, look at the project website www.airsenseur.org
This document discusses the challenges of building and optimizing open RAN systems for 5G networks. It describes Picocom's 5G baseband system-on-chip architecture using multiple RISC-V clusters and hardware accelerators. Maintaining performance and detecting problems is difficult due to the complex timing requirements across hundreds of users. Mentor's embedded analytics solution monitors the system non-intrusively using on-chip sensors to detect issues like timing overruns and help optimize performance both during development and over the lifetime of deployments.
A high level look at how to convert a cheap Chinese laser cutter to LinuxCNC.
The accompanying demo video can be found at: https://youtu.be/U3kADpXyDE8
The document summarizes an online test program generator for RISC-V microprocessors called MicroTESK. It describes how the generator works offline by translating specifications into test programs, and online by executing directly on the device under test to generate and run tests. The generator uses techniques like combinatorial brute-force and randomization to generate diverse test cases and checks results with signatures and transformations to detect errors. Future work areas include supporting more RISC-V instruction subsets and advanced techniques like model-based generation, mutations, and equivalence checking.
[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack FirmwareSimen Li
The document outlines an application called BasicApp that is used to understand the basic operations of the OSAL (Operating System Abstraction Layer) embedded in the ZigBee firmware. It describes initializing tasks using OSAL, processing events, and handling key presses to control an LED using the HAL (Hardware Abstraction Layer) APIs. The code files for the BasicApp include OSAL_BasicApp.c for task initialization, BasicApp.h for constants and function declarations, and BasicApp.c which implements the task event processing and key handling functions.
This document discusses process synchronization and classical synchronization problems. It covers topics like processes, threads, monitors, communicating sequential processes, and synchronization algorithms. Some key points include: processes allow concurrent execution through implicit or explicit tasking; synchronization is needed when processes share resources; semaphores are a common synchronization method that meet criteria for mutual exclusion; and hardware support like test-and-set instructions can aid semaphore implementation.
The document contains information about various digital circuits that can be used for a VHDL practical exam, including code and simulations for:
1. A 4-bit by 4-bit multiplier circuit with VHDL code and a simulation forcing inputs and displaying outputs.
2. An 8-bit by 8-bit multiplier circuit with similar VHDL code and simulation.
3. A 128-bit by 8-bit RAM circuit with 1024 bits of memory, VHDL code, and a simulation storing values and reading them back out.
32 bit ALU Chip Design using IBM 130nm process technologyBharat Biyani
- Implemented a 32 bit Arithmetic/Logic unit in VHDL using behavioral Modeling which involves all basic ALU operations including special functionality like binary-to-grey code conversion, parity check, sum of first N numbers. Simulation is performed in ModelSim IDE.
- Involved design using Cadence (Virtuoso Layout/Schematic) and Hspice simulation of standard library cell.
- Involved library characterization using NCX, RTL synthesis of VHDL code using Synopsys Design Vision, auto placement & routing using Encounter, static timing analysis using Synopsys Primetime.
The document discusses modules and ports in Verilog. It describes that a module defines distinct parts including module name, port list, port declarations, and optional parameters. Ports provide the interface for a module to communicate with its environment. There are two methods for connecting ports to external signals - by ordered list where signals must appear in the same order as ports, and by name where the order does not matter as long as port names match. Hierarchical names provide unique names for every identifier by denoting the design hierarchy with identifiers separated by periods.
This document provides an introduction to Verilog HDL including:
- An overview of Verilog keywords, data types, abstraction levels, and design methodology.
- Details on the history of Verilog including its development over time and transitions to newer standards.
- Explanations of key Verilog concepts like modules, ports, instantiation, stimuli, and lexical conventions.
Modules are the basic building blocks, ports define module interfaces, and instantiation replicates modules. Stimuli provide test inputs and lexical conventions cover syntax rules.
This document describes the design and characterization of a D flip-flop cell. It includes the layout, schematic, simulation waveforms, and timing analysis of the D flip-flop. The layout uses two metal layers and occupies an area of 76.8 μm2. Timing parameters such as setup time, clock-to-output time, and delay are calculated through HSPICE simulation and optimization curves.
Design and Implementation of 64 Bit RISC Processor Using System.pdfChowdappaKv1
The document describes the design and implementation of a 64-bit RISC processor using a system on chip. It includes a built-in self-test feature. The processor was designed for applications requiring automation and control, such as in bottling plants. The design includes a 64-bit architecture and instruction set. It was implemented in Verilog and tested in a Cadence simulator. Simulation results and analysis of area, power usage, and timing are presented.
The document describes the ARMv7-A architecture and its support for large physical addresses (LPAE) in Linux. Key points include:
- ARMv7-A supports LPAE through a 3-level translation table that maps 40-bit virtual addresses to 40-bit physical addresses.
- Linux implements LPAE by modifying page table definitions, extending the swapper page directory to cover three levels, and adapting functions for setting page table entries and switching address spaces.
- Low memory is mapped with 2MB sections while page tables can be allocated from high memory. Exception handling and PGD allocation/freeing were also updated for LPAE.
This document describes a chemical extraction system controlled by an FPGA programmed using VHDL. The system extracts acetone from a water/acetone solution based on the different boiling points. The FPGA controls valves and monitors temperature and concentration sensors. A VHDL program was developed and divided into four parts to control the system. The program was synthesized and downloaded to the FPGA. The system successfully extracted 99% pure acetone by opening and closing valves based on sensor readings. FPGAs provide facilities to control systems in parallel, allowing control of many elements with minimal delay.
This paper presents interfaces required in wireless sensor node (WSN) implementation. Here keyboard,
LCD, ADC and Wi-Fi module interfaces are presented. These interfaces are developed as hardware prototypes in
the application of wireless sensor node as a single chip solution. Protocols of these interfaces have been described
with the help of their hardware simulations and synthesis reports.
The end application is proposed to monitor physical parameters remotely using wireless protocol. The sensor node
has to be implemented on Field Programmable Gate Array (FPGA). The proposed node design is reconfigurable,
and hence flexible in context of future modification. Xilinx platform is proposed for synthesis, simulation and
implementation.
Keywords — FPGA, wireless sensor node.
The document discusses the 8051 microcontroller. It describes the basic components of the 8051 including 4K bytes of internal ROM, 128 bytes of internal RAM, four 8-bit I/O ports, two 16-bit timers/counters, and one serial interface. It also provides details on the block diagram, important pins like ports and serial interface pins, and how to connect an external clock source to the 8051.
The document discusses the 8051 microcontroller. It describes the basic components of the 8051 including 4K bytes of internal ROM, 128 bytes of internal RAM, four 8-bit I/O ports, two 16-bit timers/counters, and one serial interface. It also provides details on the block diagram, important pins like ports and serial interface pins, and how to connect an external clock source to the 8051.
International Journal of Engineering Inventions (IJEI) provides a multidisciplinary passage for researchers, managers, professionals, practitioners and students around the globe to publish high quality, peer-reviewed articles on all theoretical and empirical aspects of Engineering and Science.
The peer-reviewed International Journal of Engineering Inventions (IJEI) is started with a mission to encourage contribution to research in Science and Technology. Encourage and motivate researchers in challenging areas of Sciences and Technology.
This document summarizes four problems completed in a lab using a Tiva C Series microcontroller. Problem 1 introduced the microcontroller and Code Composer Studio software. Problem 2 described header files used in the code. Problem 3 explored adjusting clock speeds. Problem 4 provided an overview of the microcontroller platform, peripheral drivers library, and GPIO module. The code caused three LEDs to blink by writing pin values using delays timed based on clock speed.
Research Inventy: International Journal of Engineering and Scienceresearchinventy
This document describes a system on chip (SOC) architecture used in an industrial control system for a hydraulic damper test bench. The system uses a 32-bit ARM920T microcontroller as the digital controller. It interfaces with sensors, actuators, and other peripherals on a single printed circuit board. Software is developed in LabVIEW to implement PID control of the hydraulic damper testing process. Simulation results showed that the ARM920T-based electronic module provided more effective, lower cost and higher accuracy control compared to previous mechanical systems.
AirSensEUR: AirQuality monitoring open framework technical presentationMarco Signorini
AirSensEUR is an open framework focused on air quality monitoring using low cost sensors. The project started on 2014 from a group of passionate researchers and engineers. The framework is composed by a set of electronic boards, firmware, and several software applications. The slides present the technical solutions adopted in the framework by entering on hardware and software related details. For more info, look at the project website www.airsenseur.org
This document discusses the challenges of building and optimizing open RAN systems for 5G networks. It describes Picocom's 5G baseband system-on-chip architecture using multiple RISC-V clusters and hardware accelerators. Maintaining performance and detecting problems is difficult due to the complex timing requirements across hundreds of users. Mentor's embedded analytics solution monitors the system non-intrusively using on-chip sensors to detect issues like timing overruns and help optimize performance both during development and over the lifetime of deployments.
A high level look at how to convert a cheap Chinese laser cutter to LinuxCNC.
The accompanying demo video can be found at: https://youtu.be/U3kADpXyDE8
The document summarizes an online test program generator for RISC-V microprocessors called MicroTESK. It describes how the generator works offline by translating specifications into test programs, and online by executing directly on the device under test to generate and run tests. The generator uses techniques like combinatorial brute-force and randomization to generate diverse test cases and checks results with signatures and transformations to detect errors. Future work areas include supporting more RISC-V instruction subsets and advanced techniques like model-based generation, mutations, and equivalence checking.
[ZigBee 嵌入式系統] ZigBee 應用實作 - 使用 TI Z-Stack FirmwareSimen Li
The document outlines an application called BasicApp that is used to understand the basic operations of the OSAL (Operating System Abstraction Layer) embedded in the ZigBee firmware. It describes initializing tasks using OSAL, processing events, and handling key presses to control an LED using the HAL (Hardware Abstraction Layer) APIs. The code files for the BasicApp include OSAL_BasicApp.c for task initialization, BasicApp.h for constants and function declarations, and BasicApp.c which implements the task event processing and key handling functions.
This document discusses process synchronization and classical synchronization problems. It covers topics like processes, threads, monitors, communicating sequential processes, and synchronization algorithms. Some key points include: processes allow concurrent execution through implicit or explicit tasking; synchronization is needed when processes share resources; semaphores are a common synchronization method that meet criteria for mutual exclusion; and hardware support like test-and-set instructions can aid semaphore implementation.
The document contains information about various digital circuits that can be used for a VHDL practical exam, including code and simulations for:
1. A 4-bit by 4-bit multiplier circuit with VHDL code and a simulation forcing inputs and displaying outputs.
2. An 8-bit by 8-bit multiplier circuit with similar VHDL code and simulation.
3. A 128-bit by 8-bit RAM circuit with 1024 bits of memory, VHDL code, and a simulation storing values and reading them back out.
32 bit ALU Chip Design using IBM 130nm process technologyBharat Biyani
- Implemented a 32 bit Arithmetic/Logic unit in VHDL using behavioral Modeling which involves all basic ALU operations including special functionality like binary-to-grey code conversion, parity check, sum of first N numbers. Simulation is performed in ModelSim IDE.
- Involved design using Cadence (Virtuoso Layout/Schematic) and Hspice simulation of standard library cell.
- Involved library characterization using NCX, RTL synthesis of VHDL code using Synopsys Design Vision, auto placement & routing using Encounter, static timing analysis using Synopsys Primetime.
The document discusses modules and ports in Verilog. It describes that a module defines distinct parts including module name, port list, port declarations, and optional parameters. Ports provide the interface for a module to communicate with its environment. There are two methods for connecting ports to external signals - by ordered list where signals must appear in the same order as ports, and by name where the order does not matter as long as port names match. Hierarchical names provide unique names for every identifier by denoting the design hierarchy with identifiers separated by periods.
This document provides an introduction to Verilog HDL including:
- An overview of Verilog keywords, data types, abstraction levels, and design methodology.
- Details on the history of Verilog including its development over time and transitions to newer standards.
- Explanations of key Verilog concepts like modules, ports, instantiation, stimuli, and lexical conventions.
Modules are the basic building blocks, ports define module interfaces, and instantiation replicates modules. Stimuli provide test inputs and lexical conventions cover syntax rules.
This document describes the design and characterization of a D flip-flop cell. It includes the layout, schematic, simulation waveforms, and timing analysis of the D flip-flop. The layout uses two metal layers and occupies an area of 76.8 μm2. Timing parameters such as setup time, clock-to-output time, and delay are calculated through HSPICE simulation and optimization curves.
Design and Implementation of 64 Bit RISC Processor Using System.pdfChowdappaKv1
The document describes the design and implementation of a 64-bit RISC processor using a system on chip. It includes a built-in self-test feature. The processor was designed for applications requiring automation and control, such as in bottling plants. The design includes a 64-bit architecture and instruction set. It was implemented in Verilog and tested in a Cadence simulator. Simulation results and analysis of area, power usage, and timing are presented.
The document describes the ARMv7-A architecture and its support for large physical addresses (LPAE) in Linux. Key points include:
- ARMv7-A supports LPAE through a 3-level translation table that maps 40-bit virtual addresses to 40-bit physical addresses.
- Linux implements LPAE by modifying page table definitions, extending the swapper page directory to cover three levels, and adapting functions for setting page table entries and switching address spaces.
- Low memory is mapped with 2MB sections while page tables can be allocated from high memory. Exception handling and PGD allocation/freeing were also updated for LPAE.
This document describes a chemical extraction system controlled by an FPGA programmed using VHDL. The system extracts acetone from a water/acetone solution based on the different boiling points. The FPGA controls valves and monitors temperature and concentration sensors. A VHDL program was developed and divided into four parts to control the system. The program was synthesized and downloaded to the FPGA. The system successfully extracted 99% pure acetone by opening and closing valves based on sensor readings. FPGAs provide facilities to control systems in parallel, allowing control of many elements with minimal delay.
This paper presents interfaces required in wireless sensor node (WSN) implementation. Here keyboard,
LCD, ADC and Wi-Fi module interfaces are presented. These interfaces are developed as hardware prototypes in
the application of wireless sensor node as a single chip solution. Protocols of these interfaces have been described
with the help of their hardware simulations and synthesis reports.
The end application is proposed to monitor physical parameters remotely using wireless protocol. The sensor node
has to be implemented on Field Programmable Gate Array (FPGA). The proposed node design is reconfigurable,
and hence flexible in context of future modification. Xilinx platform is proposed for synthesis, simulation and
implementation.
Keywords — FPGA, wireless sensor node.
The document discusses the 8051 microcontroller. It describes the basic components of the 8051 including 4K bytes of internal ROM, 128 bytes of internal RAM, four 8-bit I/O ports, two 16-bit timers/counters, and one serial interface. It also provides details on the block diagram, important pins like ports and serial interface pins, and how to connect an external clock source to the 8051.
The document discusses the 8051 microcontroller. It describes the basic components of the 8051 including 4K bytes of internal ROM, 128 bytes of internal RAM, four 8-bit I/O ports, two 16-bit timers/counters, and one serial interface. It also provides details on the block diagram, important pins like ports and serial interface pins, and how to connect an external clock source to the 8051.
International Journal of Engineering Inventions (IJEI) provides a multidisciplinary passage for researchers, managers, professionals, practitioners and students around the globe to publish high quality, peer-reviewed articles on all theoretical and empirical aspects of Engineering and Science.
The peer-reviewed International Journal of Engineering Inventions (IJEI) is started with a mission to encourage contribution to research in Science and Technology. Encourage and motivate researchers in challenging areas of Sciences and Technology.
This document summarizes four problems completed in a lab using a Tiva C Series microcontroller. Problem 1 introduced the microcontroller and Code Composer Studio software. Problem 2 described header files used in the code. Problem 3 explored adjusting clock speeds. Problem 4 provided an overview of the microcontroller platform, peripheral drivers library, and GPIO module. The code caused three LEDs to blink by writing pin values using delays timed based on clock speed.
Research Inventy: International Journal of Engineering and Scienceresearchinventy
This document describes a system on chip (SOC) architecture used in an industrial control system for a hydraulic damper test bench. The system uses a 32-bit ARM920T microcontroller as the digital controller. It interfaces with sensors, actuators, and other peripherals on a single printed circuit board. Software is developed in LabVIEW to implement PID control of the hydraulic damper testing process. Simulation results showed that the ARM920T-based electronic module provided more effective, lower cost and higher accuracy control compared to previous mechanical systems.
Research Inventy : International Journal of Engineering and Science is publis...researchinventy
This document describes a system on chip (SOC) architecture used in an industrial control system for a hydraulic damper test bench. The system uses a 32-bit ARM920T microcontroller as the digital controller. It interfaces with sensors, actuators, and other peripherals on a single printed circuit board. Software is developed in LabVIEW to implement PID control of the hydraulic damper testing process. Simulation results showed that the ARM920T-based electronic module provided more effective, lower cost and higher accuracy control compared to previous mechanical systems.
Practical Distributed Control Systems (DCS) for Engineers and TechniciansLiving Online
This workshop will cover the practical applications of the modern Distributed Control System (DCS). Whilst all control systems are distributed to a certain extent today and there is a definite merging of the concepts of a DCS, Programmable Logic Controller (PLC) and SCADA and despite the rapid growth in the use of PLC’s and SCADA systems, some of the advantages of a DCS can still be said to be Integrity and Engineering time.
Abnormal Situation Management and Intelligent Alarm Management is a very important DCS issue that provides significant advantages over PLC and SCADA systems.
Few DCSs do justice to the process in terms of controlling for superior performance – most of them merely do the basics and leave the rest to the operators. Operators tend to operate within their comfort zone; they don’t drive the process “like Vettel drives his Renault”. If more than one adverse condition developed at the same time and the system is too basic to act protectively, the operator would probably not be able to react adequately and risk a major deviation.
Not only is the process control functionality normally underdeveloped but on-line process and control system performance evaluation is rarely seen and alarm management is often badly done. Operators consequently have little feedback on their own performance and exceptional adverse conditions are often not handled as well as they should be. This workshop gives suggestions on dealing with these issues.
The losses in process performance due to the inadequately developed control functionality and the operator’s utilisation of the system are invisible in the conventional plant and process performance evaluation and reporting system; that is why it is so hard to make the case for eliminating these losses. Accounting for the invisible losses due to inferior control is not a simple matter, technically and managerially; so it is rarely attempted. A few suggestions are given in dealing with this.
Why are DCS generally so underutilised? Often because the vendor minimises the applications software development costs to be sure of winning the job, or because he does not know enough about the process or if it is a green-field situation, enough could not be known at commissioning time but no allowance was made to add the missing functionality during the ramp-up phase. Often the client does not have the technical skills in-house to realise the desired functionality is missing or to adequately specify the desired functionality.
This workshop examines all these issues and gives suggestions in dealing with them and whilst not being by any means exhaustive provides an excellent starting point for you in working with a DCS.
MORE INFORMATION: http://www.idc-online.com/content/practical-distributed-control-systems-dcs-engineers-technicians-2
SCADA - Wikipedia, the free encyclopediaRaj Bakshi
SCADA systems monitor and control industrial processes, infrastructure, and facilities. They consist of human-machine interfaces, supervisory computers, remote terminal units that connect to sensors, and communication infrastructure. While SCADA systems have evolved to incorporate standard protocols and networking, their widespread implementation and connections to other systems have introduced new security vulnerabilities that could disrupt critical infrastructure if exploited.
This document provides an introduction to VHDL (VHSIC Hardware Description Language). It discusses what VHDL is used for, including modeling digital systems at different levels of abstraction, design specification, documentation, verification through simulation, test generation, and hardware synthesis. The document outlines the design flow process from initial idea to physical design. It provides examples of modeling behavioral and structural designs in VHDL and using VHDL for register transfer level logic design.
Design and Implementing Novel Independent Real-Time Software Programmable DAQ...Editor IJCATR
The crucial features of many demanding applications like industry and aerospace are data acquisition and telemetry. It is
vital to observe and analyse the real time performance, in launch vehicle systems,so that designs can be certified and tuneablefactors
could be regulated to intensification the act and competence. At present used DAQ structures are of augmented size, weight and turn out
to be exorbitant and power hungry. This article introduce a new mission-independent real time software programmable DAQ system
using multipurpose MCU and sigma delta ADCs are planned,taking into account size, weight, costand act without compromiseon
precision, firmness and drift act. Additional digital filtering steps are also added to progress the system act. This system isproficientfor
directconnectionswithdiverse pressure and temperature sensors whichinterfaces 32 low frequency channel and two high frequency
channels. The system planned operates in two modes; one is data acquisition mode and another is program mode. Operativepower
lesseningmethods and wireless interface protocol between diverse data acquisition modules is also affected upon as avenues for future
work.
Short.course.introduction.to.vhdl for beginners Ravi Sony
This document provides an introduction to VHDL (VHSIC Hardware Description Language). It discusses modeling and different levels of abstraction in modeling. It describes the design flow from idea to fabrication. It gives examples of architectural design, data path design, control path design, and register allocation. It discusses high-level synthesis and the tasks of scheduling and allocation. Finally, it provides some historical context and applications of hardware description languages.
This document discusses building a virtual platform for the OpenRISC architecture using SystemC and transaction-level modeling. It covers setting up the toolchain, writing test programs, and simulating the platform using event-driven or cycle-accurate simulation with Icarus Verilog or the Vorpsoc simulator. The virtual platform allows fast development and debugging of OpenRISC code without requiring physical hardware.
Implementation of T-Junction Traffic Light Control System Using Simatic S7-20...IJERA Editor
A conventional traffic light control system is designed by using devices such as timers, relays and
contactors etc. The critical timing operation is required to be carried out under the existence of heavy
traffic situations. This conventional practice leads to many problems that need additional maintenance
cost and subsequent delay for a long time. With the help of a PLC, the requirement of fast automation
and effective optimization of traffic light control system can be achieved. Use of PLC helps us to
develop this process not only for traffic signal on the roads, but also on the movement of trains and
the transfer of containers in ports in maritime works. In order to provide a solution to the above
problem, this paper introduces an execution and implementation of T-junction traffic control system
using SEIMENS S7-200 PLC. Programming in PLC is written in ladder logic with the help of STEP7
MICROWIN software
Development of Software for Estimation of Structural Dynamic Characteristics ...IRJET Journal
This document describes the development of software to estimate the structural dynamic characteristics of mechanical systems in real time. The software uses LabVIEW to analyze data from sensors measuring the response of a mechanical beam to applied forces. Signal processing methods extract parameters like resonance frequencies and damping from the sensor data. The software is also designed to provide closed-loop control to achieve a desired acceleration level at a specified point on the structure. This allows testing structural vibration within set parameters in the laboratory prior to flight.
Hi,
My name is Rohan Narula. I am a Fresh Graduate from The University of Texas at Arlington (MS Electrical Engineering) seeking full-time opportunities from June 2017. My specializations are in Embedded Systems / Firmware Development, Automation & Controls.
This document provides an overview of a presentation on programmable logic controllers (PLCs) and supervisory control and data acquisition (SCADA) systems. It discusses key topics including automation, PLC architecture and programming, SCADA features and software, dynamic process graphics, alarms, trends, security, and recipe management. The presentation aims to explain how PLCs and SCADA systems are used for industrial automation and process control.
The document provides information about a presentation on summer training in PLC and SCADA. It includes definitions and descriptions of automation, programmable logic controllers (PLCs), PLC architecture and programming, ladder logic, SCADA systems, and InTouch HMI software. Examples of PLC applications are also listed.
The aim of this project is to design and develop a system , which will help us to control the industrial processes sitting in a far of location.
Here a wireless concept of RF radio frequency (frequency Modulation technology) is used to control and monitor.
This document discusses serial ports and their management. Serial ports are universal I/O ports that can connect terminals, printers, modems and other devices. The most common standard is RS-232, which defines pinouts and voltage levels. Serial port configuration involves setting parameters like baud rate, parity and stop bits. Management involves starting processes like getty on ports to allow logins and monitoring modem connections. Solaris uses the Service Access Facility (SAF) to configure ports and monitors like ttymon that direct data to ports.
The document provides tips and tricks to optimize C code for 8-bit AVR microcontrollers to reduce code size and execution time. It discusses:
1. Understanding the AVR architecture and AVR GCC compiler to optimize code.
2. Tips to reduce code size such as using smallest data types, local variables over global, decrement loops, and storing constants in flash memory.
3. Examples are given to demonstrate the effect of different optimizations.
Design & Simulation of RISC Processor using Hyper Pipelining TechniqueIOSR Journals
This Hyper pipelining technique is different to the pipelining of instruction decoding known from
RISC processors. The point is that we can use hyper pipelining on top of any sequential logic, for example a
RISC processor, independent of its underlying functionality. The RISC processor with pipelined instruction set
decoding can automatically be hyper pipelined to generate CMF individual RISC processors. Hyper pipelining
implements additional register and can use register balancing for fine grain timing optimizations. The method
hyper pipelining is also called “C-slow Retiming”. The main benefit is the multiplication of the core's
functionality by only implementing registers. This is a great advantage for ASICs but obviously very attractive
for FPGAs with their already existing registers
This document provides an introduction to C programming for embedded systems using microcontrollers. It reviews basics of C programming syntax and shows examples of simple C programs for an 8051 microcontroller. Key topics covered include C program templates, directives like #include and #define, variables, functions, loops, conditional statements, and arrays. The goal is to provide sufficient knowledge to develop more complex C programs for small embedded systems using microcontrollers. Example programs are provided and discussed to illustrate various C programming concepts.
This document provides an overview of programmable logic controllers (PLCs) and supervisory control and data acquisition (SCADA) systems. It discusses the basic components and functions of PLCs, including input/output modules, the central processing unit, memory, power supply, and programming devices. It also covers PLC programming languages like ladder logic, timers, counters, and the operational sequence of a PLC. For SCADA systems, it defines what a SCADA system is, common brands and software, tags, features such as dynamic graphics, scripts, trends, alarms, security, and applications of PLCs and SCADA systems.
1. Lab 3
EENG 3910: Project V - Digital Signal
Processing System Design
9/28/2015
Joseph Chandler
University of North Texas
College of Engineering
Electrical Engineering
2. Introduction
Lab 3 continuesthe studyof the TIVA C SeriesTM4C123G MicrocontrollerandCCSsoftware.The lab
introducesmore software driverlibrariesanddifferenttypesof systemcontrols.The analogtodigital
converter(ADC) API andsystemcontrols are the mainfocusof the lab.
Results and Discussions
Problem 1
#include <stdint.h>
Thisline containsthe headerfile forvariabledefinitions.The headerfileisalreadydefinedinthe CCS
software.Examplesof the valuesare bitsize,precision,andsignedorunsignedintegers.
#include <stdbool.h>
Thisline contains the headerfile forBooleandefinitions.The headerfile isalreadydefinedinthe CCS
software.The file definitionsare usedforoperations,comparingvariables,andprogramcontrol flow.
#include "inc/tm4c123gh6pm.h"
Thisline containsthe headerfile forthe TM4C123GH6PM microcontroller.The headerfile ispart-
specificandcontainsmacrosand definitionstosimplifyprogrammingthe peripheral'sregistersand
interruptcontrol.Thisiscontainedinthe incdirectory.The .c file forthe TM4C123GH6PM
microcontrollerisincludedinthe projectfolderfordirectaccess.
#include "inc/hw_memmap.h"
Thisline containsthe headerfile forthe TivaCSeriesdevice memorymapdefinitions.The headerfile
containsmanyof the same definitionsusedfordirectregisteraccess.The headerfilecontainsmacros
and definitionstosimplifyprogrammingthe peripheral'sregistersandinterruptcontrol.Thisis
containedinthe incdirectory.The definitionsare usedbydriverlibrariesandare hiddenfromthe
programmer.
#include "inc/hw_types.h"
Thisline containsthe headerfile forcommontypesandmacros.The headerfile containsmanyof the
same definitionsusedfordirectregisteraccess.Thisiscontainedinthe incdirectory.The definitionsare
usedbydriverlibrariesandare hiddenfromthe programmer.The valuesare a wide varietyof general
use for itemssuchas arithmetic,clocktiming,file recognition,anddevicerecognition.
#include "driverlib/sysctl.h"
Thisline containsthe headerfile forthe System Control APIdefinitionsandmacros.The headerfile isin
the directory"driverlib"of the CCSsoftware.The file isconsideredpartof the currentprogram when
3. "#include"isstatedbefore the name of the headerfile.The driversprovide guidedcontrol of the
peripheralsandallowsforquickapplication.Enablingperipheralsisanexample of thiscontrol.
#include "driverlib/interrupt.h"
Thisline containsthe headerfile forthe SystemControl APIdefinitionsandmacros.The headerfile isin
the directory "driverlib"of the CCSsoftware.The driversprovideguidedcontrol of the peripheralsand
allowsforquickapplication.Enablingperipheralsisanexampleof thiscontrol.
#include "driverlib/gpio.h"
Thisline containsthe headerfile forGPIOAPIdefinitionsandmacros.The headerfile isinthe directory
"driverlib"of the CCSsoftware.The driverprovidesasetof functionstocontrol the inputand output
module.
#include "driverlib/timer.h"
Thisline containsthe headerfile forTimerAPIdefinitionsandmacros.The headerfile isinthe directory
"driverlib"of the CCSsoftware.The driversprovide quickcontrol of the peripheralsandallowsforquick
application.The timerAPIprovidesasetof functionsforusingthe timermodule.
#include "driverlib/pin_map.h"
Thisline containsthe headerfile forpin_mapAPIdefinitionsandmacros.The headerfile isinthe
directory"driverlib"of the CCSsoftware.The file isconsideredpartof the current programwhen
"#include"isstatedbefore the name of the headerfile.The driversprovide quickcontrol of the
peripheralsandallowsforquickapplication.The pin_map APIprovidesamapof the peripheral topin
configuration.
#include "driverlib/uart.h"
Thisline containsthe headerfile forUART (Universal AsynchronousReceiver/Transmitter) API
definitionsandmacros.The headerfile isinthe directory"driverlib"of the CCSsoftware.The drivers
provide quickcontrol of the peripheralsandallowsforquickapplication.The UARTAPIprovidesase tof
functionsforusingthe TIVA UART module.
#include "driverlib/adc.h"
Thisline containsthe header file forADC(Analog-to-Digital)APIdefinitionsandmacros.The header file
isin the directory"driverlib"of the CCSsoftware.The driversprovidequickcontrol of the peripherals
and allowsforquickapplication.The ADCAPIprovidesasetof functionsforusingthe TIVA ADCmodule.
#include "utils/uartstdio.h"
Thisline containsthe header file forUART.The header file isinthe directory "utils"of the CCS
software.The utilityprovidesquickcontrol of the peripheralsandallowsforquickapplication.The file
4. containsprototypesforthe UART console functions.Onbuildingthe project,the .cfile hadtobe added
manuallytolinkthe filestogether.
#define TIMER0_FREQ 2
Createsa constantusedfor frequencyinthe TimerAPImacrowitha value of 2 Hz.
#define UART0_BAUDRATE 115200
Createsa constantusedfor baudrate inthe UART APImacro witha of value 115200 bps.
#define ADC0_SEQ_NUM 0
Createsa constantusedfor the ADCsample sequence number.
#define RED_LED GPIO_PIN_1
Createsa constantfor pin1 inthe GPIO APImodule thatdisplaysthe redLED.
#define BLUE_LED GPIO_PIN_2
Createsa constantfor pin2 inthe GPIO APImodule thatdisplaysthe blue LED.
#define GREEN_LED GPIO_PIN_3
Createsa constantfor pin3 inthe GPIO APImodule thatdisplaysthe greenLED.
#define NUM_DISP_TEXT_LINE 4
Createsa constantfor the numberof linesof textdisplayinthe characterpointer"disp_text"witha
value of 4.
void init_LEDs(void);
Thisline declaresthe functionprototype "init_LEDs".Declarationatthispointgivesthe actual functiona
global scope.Anyotherfunction,header,or.c file containedinthissource file isgivenaccesstothe
functionandaccessible bythe function.
void init_timer(void);
Thisline declaresthe functionprototype " init_timer".Declarationatthispointgivesthe actual function
a global scope.Anyotherfunction,header,or.cfile containedinthissource fileisgivenaccesstothe
functionandaccessible bythe function.
void Timer0_ISR(void);
Thisline declaresthe functionprototype " Timer0_ISR".Declarationat thispointgivesthe actual
functionaglobal scope.Anyotherfunction,header,or.cfile containedinthissource fileisgivenaccess
to the functionandaccessible bythe function.
void init_UART(void);
5. Thisline declaresthe functionprototype " init_UART".Declarationatthispointgivesthe actual function
a global scope.Anyotherfunction,header,or.cfile containedinthissource fileisgivenaccesstothe
functionandaccessible bythe function.
void init_ADC(void);
Thisline declaresthe functionprototype " init_ADC".Declarationatthispointgivesthe actual function
a global scope.Anyotherfunction,header,or.cfile containedinthissource fileisgivenaccesstothe
functionandaccessible bythe function.
extern void UARTStdioIntHandler(void);
Thisline declaresafunctionprototype of type "extern".Thisinformsthe microprocessorthatitneedsto
access a functionthatexistsoutsideof thissource file.The uartstdio.cfileisincludedinthe project
folderfordirectaccess.The uartstdio.cfile hasadditional functionsforthe UARTconsole.Thisparticular
functionhandlesinterruptsfromthe UART.The UART has a transmitandreceive bufferthatisusedfor
data transfersbetweenthe microprocessorandthe puttyconsole.
uint32_t sys_clock;
Createsan unsigned32-bitglobal variable forthe systemclock.
uint8_t cur_LED = RED_LED;
Createsan unsigned8-bitglobal variable forthe redLED.
const char *disp_text[NUM_DISP_TEXT_LINE] = {
"n",
"UART and LED Demon",
"H: help, R: red, G: green, B: blue, T: temperature.n",
"> " };
Thisline createsa pointer fora systemmessage communicated tothe userviaputtyconsole.
uint32_t cur_temp=0, cur_temp_C=0, cur_temp_F=0;
Createsan unsigned32-bitglobal variable forthe temperatures.
int main(void){
The main processcallsandacts on variables,macros,definitions,andothersystemfunctions.
uint32_t i;
Createsan unsigned32-bitvariable forloops.
unsigned char user_cmd;
Createsan unsignedcharactervariable foruserinput.
6. SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
SystemControl ClockSetsetsthe clockingof the device.Osc_Mainconfiguresthe oscillatorsource.
XTAL_16MHZ usesa 16 MHZ crystal clock. USE_PLL is a phase lockedloop at400MHZ. SYSDIV_5 divides
the clock bythe numberspecifiedgivingcontrol of the frequency.
sys_clock = SysCtlClockGet();
Thisline retrievesthe processorclockrate andassignsit toa variable.
init_LEDs();
InitializesLEDconfigurationandenables by calling the function definition.
init_ADC();
InitializesADCconfigurationandenables by calling the function definition.
init_UART();
InitializesUARTconfigurationandenables by calling the function definition.
init_timer();
InitializesTimerconfigurationandenables by calling the function definition.
IntMasterEnable();
ThisNVICAPIfunctionenablesinterruptsfromthe microprocessortointerruptcontroller.
TimerEnable(TIMER0_BASE, TIMER_A);
ThisTIMER API functionenablesoperationof the timermodule.
for(i=0; i<NUM_DISP_TEXT_LINE; i++)
Thisline isa for loopto displayprogrammessage onconsole.
UARTprintf(disp_text[i]);
Thisfunctionprintsthe message onthe console.
while(1) {
The while loopprovidesacontinuousloopwhensetto"1".
if(UARTRxBytesAvail())
If the UART has available userinput.
user_cmd = UARTgetc();
7. Thisline retrievesthe userinputandstoresitina variable.
else
user_cmd = 0;
Else,the usercommand variable issetto 0.
switch(user_cmd){
Switchcase for the userinputdata.
case 'r':
Switchcase for red.
case ' ':
Switchcase for empty.
case 'H':
Switchcase for H.
case 'h':
Switchcase for h.
for(i=0; i<NUM_DISP_TEXT_LINE; i++)
Switchcase displayforlines87-90 is a for looptodisplayconsole message touserviaputty.
UARTprintf(disp_text[i]);
Thisfunctionprintsthe message onthe puttyconsole.
break;
Switchcase break.
case 'R':
Switchcase for redled.
case 'r':
Switchcase for redled.
cur_LED = RED_LED;
Storesthe red ledincurrentledvariable.
8. UARTprintf("n> ");
Thisfunctionprintsa newline witha> on the console.
break;
Switchcase break.
case 'B':
Switchcase for blue led.
case 'b':
Switchcase for blue led.
cur_LED = BLUE_LED;
Storesthe blue ledincurrentledvariable.
UARTprintf("n> ");
Thisfunctionprintsa newline witha> on the console.
break;
Switchcase break.
case 'G':
Switchcase for greenled.
case 'g':
Switchcase for greenled.
cur_LED = GREEN_LED;
Storesthe greenledincurrentledvariable.
UARTprintf("n> ");
Thisfunctionprintsa newline witha> on the console.
break;
Switchcase break.
case 'T':
Switchcase for temperature sensor.
9. case 't':
Switchcase for temperature sensor.
ADCProcessorTrigger(ADC0_BASE, ADC0_SEQ_NUM);
Thisfunctionenablesthe processortotriggerthe ADC sequence capture.
while(!ADCIntStatus(ADC0_BASE, ADC0_SEQ_NUM, false)) {
Thisfunctionandwhile loopenablesthe ADCinterrupttocapture dataas long as data exists.
ADCIntClear(ADC0_BASE, ADC0_SEQ_NUM);
Thisfunctionclearsthe ADCinterruptfromoccurringagain.
ADCSequenceDataGet(ADC0_BASE, ADC0_SEQ_NUM, &cur_temp);
Thisfunctionassignsthe captureddatato a variable.
cur_temp_C = (1475 - (2475*cur_temp)/4096)/10;
Thisvariable isassignedthe Celsiustemperatureconversion.
cur_temp_F = (cur_temp_C*9 + 160)/5;
Thisvariable isassignedthe Fahrenheit temperature conversion.
UARTprintf("nTemp = %dC = %dFn> ", cur_temp_C, cur_temp_F);
Thisfunctionprintsthe temperature conversions onthe puttyconsole.
void init_LEDs(void)
User-definedfunctiondefinitionforinitializingLEDs.The functionreturnsavalue of 0.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
The SystemControl APIfunctionenablesthe GPIOportF peripheral.
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);
The GPIO APIfunctionconfigurespins1,2, or 3 of port F for use as GPIOoutputs.
void init_timer(void)
User-definedfunctiondefinitionforinitializingTimer.The functionreturnsavalue of 0.
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
The SystemControl APIfunctionenablesTIMER0 peripheral.
10. TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);
The TimerAPI functionconfiguresthe timerasa 32-bitfull-widthperiodictimer.
TimerLoadSet(TIMER0_BASE, TIMER_A, sys_clock/TIMER0_FREQ -1);
The TimerAPI functionspecifiesthe base addressforconfiguration,the correctname fora full-width
timer,andthe load value specifiedbyuser-definedconstants.
IntRegister(INT_TIMER0A, Timer0_ISR);
The NVICAPIfunctionregistersthe "TIMER0_ISR"functiontobe calledwhenthe "TIMER0A"interruptis
enabled.
IntEnable(INT_TIMER0A);
The NVICAPIfunctionenables"TIMER0A"asa full-widthtimer tobe usedforthe interruptfunction
process.
TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionenablesthe specifictimermodule(TIMER0_Base) forthe timerinterruptsource.
The bit maskof the interruptsource tobe enabledis"TIMER_TIMA_TIMEOUT".
void init_UART(void)
User-definedfunctiondefinitionforinitializingUART.The functionreturnsavalue of 0.
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
The SystemControl APIfunctionenablesthe UART0 peripheral.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
The SystemControl APIfunctionenablesthe GPIOA peripheral.
GPIOPinConfigure(GPIO_PA0_U0RX);
The GPIO APIfunctionconfiguresthe alternate functionof aGPIO pin.GPIOPort A's pinmux is
configuredforthe UART peripheral.Pin0is configuredforthe UARTreceiverbuffer.
GPIOPinConfigure(GPIO_PA1_U0TX);
The GPIO APIfunctionconfiguresthe alternate functionof aGPIO pin.GPIOPort A's pinmux is
configuredforthe UART0 peripheral.Pin1isconfiguredforthe UART transmitterbuffer.
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
The GPIO APIfunctionconfigurespinsforuse bythe UART peripheral.GPIOPortA will be the peripheral
usedforUART communication.Pins1and2 of port A are available.
11. IntRegister(INT_UART0, UARTStdioIntHandler);
The NVICAPIfunctionregistersthe "UARTStdioIntHandler"functiontobe calledwhen the "UART0"
interruptisenabled.
UARTStdioConfig(0, UART0_BAUDRATE, sys_clock);
The UART driverfunctionconfiguresthe UARTforinput/output.UARTPort0 isthe base that will be
used.The user-definedconstant"UART0_BAUDRATE"isthe bitrate forthe UART and the user-defined
constant "sys_clock"isthe frequencyusedforthe source clockof the UART module.
void init_ADC(void)
User-definedfunctiondefinitionforinitializingADC.The functionreturnsavalue of 0.
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
The SystemControl APIfunctionenablesthe ADC0peripheral.
ADCSequenceConfigure(ADC0_BASE, ADC0_SEQ_NUM, ADC_TRIGGER_PROCESSOR, 0);
The ADC APIfunctionspecifiesthe base addressforconfiguration,the sequence number,the trigger
type,andorder importance.
ADCSequenceStepConfigure
(ADC0_BASE, ADC0_SEQ_NUM, 0, ADC_CTL_TS|ADC_CTL_IE|ADC_CTL_END);
The ADC APIfunctionspecifiesthe base addressforconfiguration,,the sequence number,order
importance,andsequence configurationoptionsfortemperaturesensor,interrupts,andend.
ADCSequenceEnable(ADC0_BASE, ADC0_SEQ_NUM);
The ADC APIfunctionenablesthe specificsequence numberforthe selectedbase.
void Timer0_ISR(void)
User-definedfunctiondefinitionforinterrupthandler. The functionreturnsavalue of 0.
TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionclearsthe timerinterruptsources.TIMER0 isthe base specifiedand
"TIMER_TIMA_TIMEOUT" isthe bitmaskfor the interruptsource cleared.
if(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_2)) {
If the GPIOAPIfunctionreadspins1,2, or 3 fromport F, readline 194.
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0);
The GPIO APIfunctionwritesa0 to pins1,2, or 3.
12. else {
Else the GPIO API function...
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, cur_LED);
Writesthe value of the variable "cur_LED" to the correct pin.
Figure 1 Putty Display
Problem 2
#define TIMER1_FREQ 0.5
I defined anothertimerfrequency constant(global) forthe temperature todisplayevery2seconds.
void init_timer1(void);
I createda prototype fortimer1'sinitialization.
void Timer1_ISR(void);
I createda prototype fortimer1'sinterrupt.
init_timer1();
I calledthe init_timer1functiontoinitializethe new timer.
TimerEnable(TIMER1_BASE, TIMER_A);
I enabledthe timermoduleforoperation.
while(1) {
While loopprovidescontinuousloop.
void init_timer1(void)
User-definedfunctiondefinitionfor initializingTimer.The functionreturnsavalue of 0.
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);
The SystemControl APIfunctionenablesthe timer1peripheral.
13. TimerConfigure(TIMER1_BASE, TIMER_CFG_PERIODIC);
The TimerAPI functionconfiguresthe timer1asa 32-bit full-widthperiodictimer.
TimerLoadSet(TIMER1_BASE, TIMER_A, sys_clock/TIMER1_FREQ );
The TimerAPI functionspecifiesthe base addressforconfiguration,the correctname fora full-width
timer,andthe load value specifiedbyuser-definedconstants.
IntRegister(INT_TIMER1A, Timer1_ISR);
The NVICAPIfunctionregistersthe "TIMER1_ISR"functiontobe calledwhenthe "TIMER0A"interruptis
enabled.
IntEnable(INT_TIMER1A);
The NVICAPIfunctionenables"TIMER1A"asa full-widthtimer tobe usedforthe interruptfunction
process.
TimerIntEnable(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionenablesthe specifictimermodule(TIMER1_Base) forthe timerinterruptsource.
The bit maskof the interruptsource tobe enabledis "TIMER_TIMA_TIMEOUT".
void Timer1_ISR(void)
User-definedfunctiondefinitionforinterrupthandler.The functionreturnsavalue of 0.
TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionclearsthe timerinterruptsources.TIMER1 isthe base specifiedand
"TIMER_TIMA_TIMEOUT" isthe bitmaskfor the interruptsource cleared.
ADCProcessorTrigger(ADC0_BASE, ADC0_SEQ_NUM);
Thisfunctionenablesthe processortotriggerthe ADC sequence capture.
while(!ADCIntStatus(ADC0_BASE, ADC0_SEQ_NUM, false)) {
Thisfunctionandwhile loopenablesthe ADCinterrupttocapture dataas longas data exists.
ADCIntClear(ADC0_BASE, ADC0_SEQ_NUM);
Thisfunctionclearsthe interruptfromoccurringagain.
ADCSequenceDataGet(ADC0_BASE, ADC0_SEQ_NUM, &cur_temp);
Thisfunctionassignsthe captureddatato a variable.
cur_temp_C = (1475 - (2475*cur_temp)/4096)/10;
14. Thisvariable isassignedthe Celsiustemperatureconversion.
cur_temp_F = (cur_temp_C*9 + 160)/5;
Thisvariable isassignedthe Fahrenheittemperatureconversion.
UARTprintf("nTemp = %dC = %dFn> ", cur_temp_C, cur_temp_F);
Thisfunctionprintsthe temperature conversionsonthe puttyconsole.
Figure 2 Putty Display
Problem 3
FPU isusedfor higherprecision calculationsandvariablesforstoringthe resultsinmemory.The
functionFPULazyStackingEnable allocatesspace onthe stackfor floating-pointstorage.The processor
onlysavesthe contextif itisinvolvedinaninstruction.The interrupthandlerdoesnotsave floating-
pointdata and takesmore time toconfigure the stackfor itsuse.
There isa software driverlibrarythatprovidesFPUAPI.The headerfile isincludedatthe beginningof
the source file.A constant isalso definedforthe space allocatedforstorage.The temperature variables
are savedas floatingpointastheywill be usedmultiple timestodisplaythe temperature if needed.A
variable of type char array isessentiallyusedforthe stringof charactersdisplayingthe temperatures.
The functionsnprintf storesthe formattedtemperaturesinabufferstringforformatdeclarationand
ease of use withrepetition.
Problem 4
#include <stdio.h>
The standard input/outputlibrarywasaddedforthe functionsnprintf.
15. #include "driverlib/fpu.h"
The FPU driverlibrarywasaddedforthe FPU APIavailability.
#define TIMER1_FREQ .5
I definedanothertimerfrequencyconstant(global) forthe temperature todisplayevery2seconds.
#define TEMP_STR_LEN 20
The constant wasrepeatedfromLab3_3 forthe lengthof the string.
uint32_t cur_temp=0;
The constant was repeatedfromLab3_3 for the unsigned32-bitinteger.
float cur_temp_C=0, cur_temp_F=0;
The constants wasrepeatedfromLab3_3 for the floating-pointtemperatures.
char temp_str[TEMP_STR_LEN];
The constant was repeatedfromLab3_3 for the char array.
void Timer1_ISR(void)
User-definedfunctiondefinitionforinterrupthandler.The functionreturnsavalue of 0.
TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionclears the timerinterruptsources.TIMER1 isthe base specifiedand
"TIMER_TIMA_TIMEOUT" isthe bitmaskfor the interruptsource cleared.
FPUEnable();
I enabledthe FPUmodule foroperation.
FPULazyStackingEnable();
I enabledthe floating-pointlazystackingformemoryaccess.
ADCProcessorTrigger(ADC0_BASE, ADC0_SEQ_NUM);
Thisfunctionenablesthe processortotriggerthe ADC sequence capture.
while(!ADCIntStatus(ADC0_BASE, ADC0_SEQ_NUM, false)) {
Thisfunctionandwhile loopenablesthe ADCinterruptto capture dataas longas data exists.
ADCIntClear(ADC0_BASE, ADC0_SEQ_NUM);
Thisfunctionclearsthe interruptfromoccurringagain.
17. Thisline containsthe headerfile forthe TivaCSeriesdevice memorymapdefinitions.The headerfile
containsmanyof the same definitionsusedfordirectregisteraccess.The headerfilecontainsmacros
and definitionstosimplifyprogrammingthe peripheral'sregistersandinterruptcontrol.Thisis
containedinthe incdirectory.The definitionsare usedbydriverlibrariesand are hiddenfromthe
programmer.
#include "inc/hw_types.h"
Thisline containsthe headerfile forcommontypesandmacros.The headerfile containsmanyof the
same definitionsusedfordirectregisteraccess.Thisiscontainedinthe incdirectory.The definitionsare
usedbydriverlibrariesandare hiddenfromthe programmer.The valuesare a wide varietyof general
use for itemssuchas arithmetic,clocktiming,file recognition,anddevicerecognition.
#include "driverlib/sysctl.h"
Thisline contains the headerfile forthe SystemControl APIdefinitionsandmacros.The headerfile isin
the directory"driverlib"of the CCSsoftware.The driversprovideguidedcontrol of the peripheralsand
allowsforquickapplication.Enablingperipheralsisanexampleof thiscontrol.
#include "driverlib/interrupt.h"
Thisline containsthe headerfile forthe SystemControl APIdefinitionsandmacros.The headerfile isin
the directory"driverlib"of the CCSsoftware.The driversprovideguidedcontrol of the peripheralsand
allowsforquickapplication.Enablingperipheralsisanexampleof thiscontrol.
#include "driverlib/gpio.h"
Thisline containsthe headerfile forGPIOAPIdefinitionsandmacros.The headerfile isinthe directory
"driverlib"of the CCSsoftware.The driverprovidesasetof functionstocontrol the inputand output
module.
#include "driverlib/timer.h"
Thisline containsthe headerfile forTimerAPIdefinitionsandmacros.The headerfile isinthe directory
"driverlib"of the CCSsoftware. The driversprovide quickcontrol of the peripheralsandallowsforquick
application.The timerAPIprovidesasetof functionsforusingthe timermodule.
#include "driverlib/pin_map.h"
Thisline containsthe headerfile forpin_mapAPIdefinitionsandmacros.The headerfile isinthe
directory"driverlib"of the CCSsoftware.The driversprovidequickcontrol of the peripheralsandallows
for quickapplication.The pin_map APIprovidesamapof the peripheral topinconfiguration.
#include "driverlib/uart.h"
Thisline containsthe headerfile forUART(Universal AsynchronousReceiver/Transmitter) API
definitionsandmacros.The headerfile isinthe directory"driverlib"of the CCSsoftware.The drivers
18. provide quickcontrol of the peripheralsandallowsforquickapplication.The UARTAPIprovidesasetof
functionsforusingthe TIVA UART module.
#include "driverlib/adc.h"
Thisline containsthe header file forADC(Analog-to-Digital)APIdefinitionsandmacros.The header file
isin the directory"driverlib"of the CCSsoftware.The driversprovidequickcontrol of the peripherals
and allowsforquickapplication.The ADCAPIprovidesasetof functionsforusingthe TIVA ADCmodule.
#include "utils/uartstdio.h"
Thisline containsthe header file forUART.The header file isinthe directory"utils"of the CCS
softwareThe utilityprovidesquickcontrol of the peripheralsandallowsforquickapplication.The file
containsprototypesforthe UART console functions.Onbuildingthe project,the .cfile hadtobe added
manuallytolinkthe filestogether.
#define TIMER0_FREQ 2
I definedanothertimerfrequencyconstant(global) for2Hz.
#define TIMER1_FREQ 1
I definedanothertimerfrequencyconstant(global) for1Hz.
#define ADC_PIN GPIO_PIN_0
Definedconstantforthe pinusedasinput for ADCmodule.
#define TIMER_PIN GPIO_PIN_4
Definedconstantforthe pinusedasinput for Timermodule.
void init_timer(void);
I createda prototype fortimer0'sinitialization.
void Timer0_ISR(void);
I createda prototype fortimer0'sinterrupt.
void init_GPIO(void);
I createda prototype fortimer0'sinitialization.
void init_timer1(void);
I createda prototype fortimer0'sinitialization.
void Timer1_ISR(void);
I createda prototype fortimer0'sinterrupt.
19. uint8_t cur_LED = RED_LED;
Createsan unsigned8-bitglobal variable forthe systemclock.
uint32_t sys_clock;
Createsan unsigned32-bitglobal variable forthe systemclock.
uint32_t analog_input;
Createsa 32-bit global variable forthe analogsample.
int main(void){
The main processcallsandacts on variables,macros,definitions,andothersystemfunctions.
unsigned char user_cmd;
Createsan unsignedcharactervariable foruserinput.
uint32_t i;
Createsan unsigned32-bitvariable forloops.
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
SystemControl ClockSetsetsthe clockingof the device.Osc_Mainconfiguresthe oscillatorsource.
XTAL_16MHZ usesa 16 MHZ crystal clock. USE_PLL is a phase lockedloopat400MHZ. SYSDIV_5 divides
the clock bythe numberspecifiedgivingcontrol of the frequency.
sys_clock = SysCtlClockGet();
Thisline retrievesthe processorclockrate andassignsit toa variable.
init_LEDs();
InitializesLEDconfigurationandenables by calling the function definition.
init_ADC();
InitializesADCconfigurationandenables by calling the function definition.
init_UART();
InitializesUARTconfigurationandenables by calling the function definition.
init_timer();
InitializesTimerconfigurationandenables by calling the function definition.
init_GPIO();
20. InitializesGPIOconfigurationandenables by calling the function definition.
init_timer1();
InitializesTimer1configurationand enables by calling the function definition.
IntMasterEnable();
ThisNVICAPIfunctionenablesinterruptsfromthe microprocessortointerruptcontroller.
TimerEnable(TIMER0_BASE, TIMER_A);
Enable timerwithinterruptsforLEDS.
for(i=0; i<NUM_DISP_TEXT_LINE; i++)
Thisline isa for loopto displayprogrammessage onconsole.
UARTprintf(disp_text[i]);
Thisfunctionprintsthe message onthe console.
while(1) {
The while loopprovidesacontinuousloopwhensetto"1".
if(UARTRxBytesAvail())
If the UART has available userinput.
user_cmd = UARTgetc();
Thisline retrievesthe userinputandstoresitina variable.
else
user_cmd = 0;
Else,the usercommandvariable issetto 0.
switch(user_cmd){
Switchcase for the userinputdata.
case 'r':
Switchcase for red.
case ' ':
Switchcase for empty.
case 'H':
21. Switchcase for H.
case 'h':
Switchcase for h.
for(i=0; i<NUM_DISP_TEXT_LINE; i++)
Switchcase displayforlines87-90 is a for looptodisplayconsole message touserviaputty.
UARTprintf(disp_text[i]);
Thisfunctionprintsthe message onthe puttyconsole.
break;
Switchcase break.
case 'R':
Switchcase for redled.
case 'r':
Switchcase for redled.
cur_LED = RED_LED;
Storesthe red ledincurrentledvariable.
UARTprintf("n> ");
Thisfunctionprintsa newline witha> on the console.
break;
Switchcase break.
case 'B':
Switchcase for blue led.
case 'b':
Switchcase for blue led.
cur_LED = BLUE_LED;
Storesthe blue ledincurrentledvariable.
UARTprintf("n> ");
22. Thisfunctionprintsa newline witha> on the console.
break;
Switchcase break.
case 'G':
Switchcase for greenled.
case 'g':
Switchcase for greenled.
cur_LED = GREEN_LED;
Storesthe greenledincurrentledvariable.
UARTprintf("n> ");
Thisfunctionprintsa newline witha> on the console.
break;
Switchcase break.
case 'A':
Switchcase for analogsensor.
case 'a':
Switchcase for analogsensor.
ADCProcessorTrigger(ADC0_BASE, ADC0_SEQ_NUM);
Thisfunctionenablesthe processortotriggerthe ADC sequence capture.
while(!ADCIntStatus(ADC0_BASE, ADC0_SEQ_NUM, false)) {
Thisfunctionandwhile loopenablesthe ADCinterrupttocapture dataas longas data exists.
ADCIntClear(ADC0_BASE, ADC0_SEQ_NUM);
Thisfunctionclearsthe ADCinterruptfromoccurringagain.
ADCSequenceDataGet(ADC0_BASE, ADC0_SEQ_NUM, &analog_input);
Thisfunctionassignsthe captureddatato a variable.
UARTprintf("nAnalog Input = %dn> ", analog_input);
23. Thisfunctionprintsthe analoginputonthe putty console.
case 'D':
Switchcase for digital sensor.
case 'd':
Switchcase for digital sensor
TimerEnable(TIMER1_BASE, TIMER_A);
Thisfunctionenablesthe processortotriggerthe ADC sequence capture.
break;
Switchcase break.
void init_GPIO(void)
User-definedfunctiondefinitionforinitializingGPIO.The functionreturnsavalue of 0.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
The SystemControl APIfunctionenablesthe GPIODperipheral.
GPIOPinTypeADC(GPIO_PORTD_BASE, ADC_PIN);
Thisfunctionenablesthe pinof choice tosupportADCtype configurations.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
The SystemControl APIfunctionenablesthe GPIOEperipheral.
GPIOPinConfigure(GPIO_PE4_U5RX);
The GPIO APIfunctionconfiguresthe alternate functionof aGPIO pin.GPIOPort E's pinmux is
configuredforthe UART peripheral.Pin4is configuredforthe receivingbuffer.
GPIOPinTypeTimer(GPIO_PORTE_BASE, TIMER_PIN);
Thisfunctionenablesthe pinof choice tosupportTimertype configurations.
void init_timer1(void)
User-definedfunctiondefinitionforinitializingTimer.The functionreturnsavalue of 0.
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);
The SystemControl APIfunctionenablesthe TIMER1 peripheral.
TimerConfigure(TIMER1_BASE, TIMER_CFG_PERIODIC);
24. The TimerAPI functionconfiguresthe timerasa 32-bitfull-widthperiodictimer.
TimerLoadSet(TIMER1_BASE, TIMER_A, sys_clock/TIMER0_FREQ -1);
The TimerAPI functionspecifiesthe base addressforconfiguration,the correctname fora full-width
timer,andthe load value specifiedbyuser-definedconstants.
IntRegister(INT_TIMER1A, Timer1_ISR);
The NVICAPIfunctionregistersthe "TIMER1_ISR"functiontobe calledwhenthe "TIMER0A"interruptis
enabled.
IntEnable(INT_TIMER1A);
The NVICAPIfunctionenables"TIMER1A"asa full-widthtimer tobe usedforthe interruptfunction
process.
TimerIntEnable(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionenables the specifictimermodule(TIMER1_Base) forthe timerinterruptsource.
The bit maskof the interruptsource tobe enabledis"TIMER_TIMA_TIMEOUT".
void Timer0_ISR(void)
User-definedfunctiondefinitionforinterrupthandler.The functionreturnsavalue of 0.
TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionclearsthe timerinterruptsources.TIMER0 isthe base specifiedand
"TIMER_TIMA_TIMEOUT" isthe bitmaskfor the interruptsource cleared.
if(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3)) {
If the GPIOAPIfunctionreadspins1,2, or 3 fromport F, readline 209.
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0);
The GPIO APIfunctionwritesa0 to pins1,2, or 3.
else {
Else the GPIO APIfunction...
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, cur_LED);
Writesthe value of the variable "cur_LED" to the correct pin.
void init_timer(void)
User-definedfunctiondefinitionforinitializingTimer.The functionreturnsavalue of 0.
25. SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
The SystemControl APIfunctionenablesthe timer0peripheral.
TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);
The TimerAPI functionconfiguresthe timerasa 32-bitfull-widthperiodictimer.
TimerLoadSet(TIMER0_BASE, TIMER_A, sys_clock/TIMER0_FREQ -1);
The TimerAPI functionspecifiesthe base addressforconfiguration,the correctname fora full-width
timer,andthe load value specifiedbyuser-definedconstants.
IntRegister(INT_TIMER0A, Timer0_ISR);
The NVICAPIfunctionregistersthe "TIMER0_ISR"functiontobe calledwhenthe "TIMER0A"interruptis
enabled.
IntEnable(INT_TIMER0A);
The NVICAPIfunctionenables"TIMER0A"asa full-widthtimer tobe usedforthe interruptfunction
process.
TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionenablesthe specifictimermodule(TIMER0_Base) forthe timerinterruptsource.
The bit maskof the interruptsource tobe enabledis"TIMER_TIMA_TIMEOUT".
void Timer1_ISR(void)
User-definedfunctiondefinitionforinterrupthandler.The functionreturnsavalue of 0.
TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
The TimerAPI functionclearsthe timerinterruptsources.TIMER1 isthe base specifiedand
"TIMER_TIMA_TIMEOUT" isthe bit maskfor the interruptsource cleared.
GPIOPinRead(GPIO_PORTE_BASE, TIMER_PIN);
ThisGPIO APIfunctionreadspin4 from portE.
UARTprintf("nTimer Input = %dn> ", TIMER_PIN);
Thisfunctionprintsthe timerdatato the puttyconsole.
TimerDisable(TIMER1_BASE, TIMER_A);
Thisfunctiondisablesthe timerforotherinterruptstooccur fromuserinput.
Summary and Conclusions