05 Handout 1 Interfaces and Mechanisms PDF
Document Details
Uploaded by MemorableNonagon
STI
Tags
Summary
This document outlines interfaces and mechanisms in embedded systems. It covers various I/O interfaces like Pulse Width Modulation (PWM), General-Purpose Digital I/O, and Serial Interfaces. The document also describes parallel interfaces and different types of I/O modules and includes references.
Full Transcript
IT2102 Interfaces and Mechanisms Today’s embedded systems integrate computing and physical dynamics. Dynamics refers to the capability to do actions required in a computing system. It supports all interaction with the outside world in which it passes through so called interfaces. Interfaces...
IT2102 Interfaces and Mechanisms Today’s embedded systems integrate computing and physical dynamics. Dynamics refers to the capability to do actions required in a computing system. It supports all interaction with the outside world in which it passes through so called interfaces. Interfaces establish connection between humans, environment, phenomena, and machines, thus providing input, process, or output. Physical I/O Interfaces (Lee & Seshia, 2017) All embedded systems include some form of input and output (I/O) operations. I/O operations are interpreted differently depending on the viewpoint taken and place different requirements on the level of understanding of the hardware details such as: I/O operations imply communicating with the device. Programming the device to initiate an I/O request. Performing actual data transfer between the device and the system. Common I/O Interfaces Pulse Width Modulation - is a technique for delivering a variable amount of power efficiently to external hardware devices. A PWM signal rapidly switches between high and low at some fixed frequency, varying the amount of time that it holds the signal high. General-Purpose Digital I/O - enables the software to either read or write voltage levels representing a logical zero or one. o If the processor supply voltage is in active-high logic, a voltage close to VDD represents a logical one, while a voltage near zero represents a logical zero. ▪ As output, this enables software to then write to a memory-mapped register to set the output voltage to be either high or low. ▪ As inputs, in which case software will be able to react to provided voltage levels. ▪ Having a tristate logic, it produces an output high or low voltage which the I/O pin may be adjusted into the off state. Serial Interfaces - sends or receives a sequence of bits sequentially over a single line. One way to use pins and wires efficiently is to send information over them serially as sequences of bits. o RS-232 was standardized by the Electronics Industries Association (EIA) and introduced to connect teletypes to modems. ▪ Interface mechanism: The sender and receiver first must agree on a transmission rate (which is slow by modern standards). The sender initiates transmission of a byte with a start bit, which alerts the receiver that a byte is coming. The sender then clocks out the sequence of bits at the agreed-upon rate, following them by one or two stop bits. The receiver’s clock resets upon receiving the start bit and is expected to track the sender’s clock closely enough to be able to sample the incoming signal sequentially and recover the sequence of bits. o The USB standard defines more on the transport of bytes and more complicated control logic. It is intended to enhance plug-and-play and allow hot swapping. ▪ Plug-and-play enables the operating system (OS) to spontaneously configure and discover a new peripheral device without having to restart the computer. o Joint Test Action Group (JTAG) or IEEE 1149.1 standard test access port and boundary-scan architecture. This interface solves the problem of testing circuits that need to be accessed and inaccessible to electrical probes. The notion of a boundary scan allows the state of a logical boundary of a circuit) to be read or written serially through pins that are made accessible. 05 Handout 1 *Property of STI [email protected] Page 1 of 4 IT2102 Parallel Interfaces - uses multiple lines to simultaneously send bits. Each line of a parallel interface is also a serial interface, but the logical grouping and coordinated action of these lines are what makes the interface a parallel interface. o IEEE-1284 printer port defines a parallel printer bus specification with speeds above 1MBps which uses a point-to-point asynchronous bi-directional interface. ▪ This printer port protocol uses a simple 2-wire handshake in which the PC asserts a strobe signal until the printer asserts an acknowledge signal. This repeats for each byte transferred. o With careful programming, a group of GPIO pins can be used together to realize a parallel interface. Bus - is an interface shared among multiple devices, in contrast to a point-to-point interconnection linking exactly two devices. Buses can be serial interfaces or parallel interfaces. o SCSI (Small Computer System Interface) is an example of peripheral bus architecture, used to connect computers to peripherals such as sound cards, disk drives, and tape drives. o IEEE-488 was originally developed to connect automated test equipment to controlling computers. This interface was designed at Hewlett Packard and is also widely known as HP-IB (Hewlett Packard interface bus) and GPIB (general-purpose interface bus). I/O Modules A module comprises a bunch of electrical components compiled together to form a part of a system that caters to a particular function. It varies depending on how it deals with I/O interfaces, how it is used as requirements, and how it responds to certain exceptions. Examples of Wireless I/O Modules Nowadays, wireless communication is in motion since it has a capability to remove clutter from tons and tons of physical wirings in a system. Infrared Transmitter and Receiver Module o An infrared (IR) transmitter consists of an infrared LED array, which functions as a luminophore, and a PN junction made of a special material with high infrared radiation efficiency, which is usually GaAs. o The infrared receiver is a semiconductor device used for translating infrared light signals into electrical signals. The core component of it is a PN junction made of a special material. o One downfall of using infrared for data transmission is the presence of infrared sources other than that of the data transmitter. The receiver is simply “tuned” to react to that frequency. It will ignore any infrared signals that are outside of that carrier frequency. Bluetooth® wireless technology is convenient to use and has the bandwidth to meet most of today’s demands for mobile and personal communications (using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz). o It handles the wireless part of the communication channel; it transmits and receives data wirelessly between these devices. o It delivers the received data and receives the data to be transmitted to and from a host system through a host controller interface (HCI). o Bluetooth is a packet-based protocol with a master-slave structure. One master may communicate with up to seven slaves in a piconet. All devices share the master’s clock. GSM/GPRS Module o The GSM (Global System for Mobile Communication) is a digital cellular technology used for transmitting mobile voice and data services. It is also sometimes referred to as 2G, as it is a second- generation cellular network. GSM supports outgoing and incoming voice calls, SMS or text messaging, and data communication (via GPRS). o The GPRS (General Packet Radio Service) is a wireless packet data service that is an extension of the GSM network. The GPRS radio resources allocator allows the provision of multiple radio channels to a single user in order to ensure a high data user rate. GPRS offers direct Internet Protocol (IP) connectivity in a point-to-point or a point-to-multipoint mode and provides packet radio access to external packet data networks (PDN). 05 Handout 1 *Property of STI [email protected] Page 2 of 4 IT2102 o It requires a SIM (Subscriber Identity Module) card just like mobile phones to activate communication with the network. The power supply circuit is also built in the module that can be activated by using a suitable adaptor. A GSM/GPRS module can perform the following operations: ▪ Receive, send, or delete SMS messages in a SIM. ▪ Make, receive, or reject a voice call. ▪ Receive/send data from/to a remote location through GPRS. Wi-Fi, or Wireless Fidelity, is a term that is used generically to refer to any product or service using any type of 802.11 technology. Wi-Fi networks operate in the unlicensed 2.4–2.5 GHz radio bands, with an 11 Mbps (802.11b) or 54 Mbps (802.11a) data rate, respectively. o Wireless Ethernet. Wi-Fi is an Ethernet replacement. Wi-Fi and Ethernet, both IEEE 802 networks, share some core elements. o Extended Access. The absence of wires and cables extends access to places where wires and cables cannot go or where it is too expensive for them to go. o Cost Reduction. The absence of wires and cables brings down cost. o Mobility. Wires tie you down to one location. Going wireless means you have the freedom to change your location without losing your connection. o Flexibility. Extended access, cost reductions, and mobility create opportunities for new applications as well as the possibility of creating new solutions for legacy applications. I/O Interface Mechanisms (Lee & Seshia, 2017) Interrupts and Exceptions o An interrupt is a mechanism for pausing execution of whatever a processor is currently doing and executing a pre-defined code sequence such as interrupt service routine (ISR) or interrupt handler. ▪ Hardware interrupt - external hardware changes the voltage level on an interrupt request line. ▪ Software interrupt - the program that triggers the interrupt by executing a special instruction or by writing to a memory-mapped register. ▪ Exception - where the interrupt is triggered by internal hardware that detects a fault, such as a segmentation fault. o A programmable interval timer (PIT) counts down from some value to zero. ▪ The initial value is set by writing to a memory-mapped register. ▪ When the value hits zero, the PIT raises an interrupt request. ▪ By writing to a memory-mapped control register, a timer might be set up to trigger repeatedly without having to be reset by the software. Atomicity o An interrupt service routine (ISR) can be invoked between any two instructions of the main program. ▪ The term “atomic” comes from the Greek word “indivisible” which implies that the operation may happen or not, due to some instructional events or sharing of hardware resources. ▪ If the programmer is writing assembly code, then it may be safe to assume that each assembly language instruction is atomic. Interrupt Controllers o It is the logic in the processor that handles interrupts. It supports some interrupts and priority levels. Each interrupt has an interrupt vector, which is the address of an ISR or an index into an array called the interrupt vector table that contains the addresses of all the ISRs. References: Barkalov, A., Titarenko L. & Mazurkiewicz, M. (2019). Foundations of embedded systems. Springer International. Lee, E., Seshia, S. (2017). Introduction to embedded systems: A cyber-physical systems approach [2nd ed.]. MIT Press. Lee, E. & Ha, S. (1989). Scheduling strategies for multiprocessor real-time DSP. In Global Telecommunications Conference (GLOBECOM). doi:10.1109/GLOCOM.1989.64160. 05 Handout 1 *Property of STI [email protected] Page 3 of 4 IT2102 Li, Q., & Yao, C. (2012). Real-Time Concepts for Embedded Systems: Chapter 12 - I/O Subsystem [Lecture Slides]. Retrieved on August 9, 2021, from http://osnet.cs.nchu.edu.tw/powpoint/Embedded/Chapter%2012.pdf Marwedel, P. (2018). Embedded system design: Embedded systems, foundations of cyber-physical systems, and the Internet of Things (3rd ed.). Springer International. Pan, T., Zhu, Y. (2018). Designing embedded systems with Arduino: A fundamental technology for makers. Springer. Peckol, J. (2019). Embedded systems: A contemporary design tool (2nd ed.). Wiley. 05 Handout 1 *Property of STI [email protected] Page 4 of 4