Docsity

Timers and Counters in Digital Electronics, Summaries of Technology

Toggle sidebar
bg1
TIMERS
Timeris a clock that controls the sequence of an event while counting in fixed
intervals of time. A Timer is used for producing precise time delay. Secondly, it can be used
to repeat or initiate an action after/at a known period of time. This feature is very commonly
used in several applications. An example could be setting up an alarm which triggers at a
point of time or after a period of time.
Timersare used to measure specific time intervals. But in electrical engineering
terms, timers are also referred to as counters often. The timer is a component which is
extensively used in different embedded systems. They are used to keep a record of time for
different events occurring in the embedded systems. The timer is a simpler binary counter
which is configured in a circuit or a system as per the need to count the pulses in the system.
The value of the timer is automatically set to zero once it is at its maximum value. Once the
maximum value for the timer is reached, an interrupt is generated with an overflow flag. The
timer can be used to measure the time elapsed or the external events occurring for a specific
time interval. They are used to maintain the operation of the embedded system in sync with
the clock. The clock can be an external clock or the system clock. Timers are used for various
applications in circuits or embedded systems such as to generate baud rates, measuring time
generating delays and many more. The loop iterating methodologies are very difficult and
they can iterate the loops in the system for a specific range of cycles. For the iteration of
loops perfectly and systematically timer/counters are used. The timer is very easy to be
program instead of different programming practices for loop iterations. The timer counts the
peripheral clock cycles or it can count the clock cycles of the externally supplied clock. Clock
pulses can be also generated with the help of timers which is also called the Baud Rate of the
serial communication.
Types of Timers
There are two main categories in which timers are classified:
Analog Timers:
oThe analog timers are those timers that are set up by knobs and their output is
observed with an analog scale. The timing functionalities and scale of an
analog timer are easily adjusted with the help of switches mounted on the front
side of the timer.
Digital Timers:
oDigital timers are adjusted and controlled with the help of digital inputs and
their output is also observed with the digital scales. The different buttons are
used to set up the timing and set points of a timer. The output is displayed
through the LCD mounted on the timer.
Operating Mode
There are 4 basic operating modes for a timer which are:
ON-Delay Operation.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Timers and Counters in Digital Electronics and more Summaries Technology in PDF only on Docsity!

TIMERS

Timer is a clock that controls the sequence of an event while counting in fixed intervals of time. A Timer is used for producing precise time delay. Secondly, it can be used to repeat or initiate an action after/at a known period of time. This feature is very commonly used in several applications. An example could be setting up an alarm which triggers at a point of time or after a period of time. Timers are used to measure specific time intervals. But in electrical engineering terms, timers are also referred to as counters often. The timer is a component which is extensively used in different embedded systems. They are used to keep a record of time for different events occurring in the embedded systems. The timer is a simpler binary counter which is configured in a circuit or a system as per the need to count the pulses in the system. The value of the timer is automatically set to zero once it is at its maximum value. Once the maximum value for the timer is reached, an interrupt is generated with an overflow flag. The timer can be used to measure the time elapsed or the external events occurring for a specific time interval. They are used to maintain the operation of the embedded system in sync with the clock. The clock can be an external clock or the system clock. Timers are used for various applications in circuits or embedded systems such as to generate baud rates, measuring time generating delays and many more. The loop iterating methodologies are very difficult and they can iterate the loops in the system for a specific range of cycles. For the iteration of loops perfectly and systematically timer/counters are used. The timer is very easy to be program instead of different programming practices for loop iterations. The timer counts the peripheral clock cycles or it can count the clock cycles of the externally supplied clock. Clock pulses can be also generated with the help of timers which is also called the Baud Rate of the serial communication. Types of Timers There are two main categories in which timers are classified:  Analog Timers: o The analog timers are those timers that are set up by knobs and their output is observed with an analog scale. The timing functionalities and scale of an analog timer are easily adjusted with the help of switches mounted on the front side of the timer.  Digital Timers: o Digital timers are adjusted and controlled with the help of digital inputs and their output is also observed with the digital scales. The different buttons are used to set up the timing and set points of a timer. The output is displayed through the LCD mounted on the timer. Operating Mode There are 4 basic operating modes for a timer which are:  ON-Delay Operation.

 OFF-Delay Operation.  Flicker Operation.  Interval Operation. ON-Delay Operation: In this mode of operation, the timer counts the output of the system after a specific interval of the specified delay. The timer is named an ON delay timer as there is some delay before the input signal is turned ON. ON delay timer mode of operation is used with the automated machines. OFF-Delay Operation: In OFF delay operation, the timer starts its operation as soon as the input starts, and the output is also started but the output of the timer is stopped once the set time of the timer has expired. The set time of the timer is calculated once the input is turned OFF. The basic example of an OFF delay timer is the gate indicator light in cars. Applications of Timers Timer’s circuits have different applications in different systems. Timers are used for various purposes in the circuit. In a counter circuit, the major part of the circuit is a timer. The speed of the circuit can be changed by changing the timer’s time period. Timers are used to generate the desired delays, baud rates are also generated with the help of timers. Timers are also used as reference signal generators. Different reference pulses are generated with the help of timers. A number of flip flop circuits are triggered by different timers. The event sequence is easily controlled with the help of timers. A timer has various applications which are extensively used in daily life practical devices from the basic household level to a large industrial level. Each timer has its own applications and characteristics.

The timing diagram clearly shows that Q0 changes as soon as the rising edge of the clock pulse is encountered, Q1 changes when the rising edge of Q0 is encountered (because Q0 is like the clock pulse for the second flip-flop), and so on. Because ripples are generated in this manner by Q0, Q1, Q2, and Q3, it is also known as a RIPPLE counter and a serial counter. A ripple counter is a cascaded configuration of flip-flops in which the output of one flip-flop drives the clock input of the flip-flop after it. 2) Synchronous Counters The synchronous counter is a counter also known as the parallel counter, operation is fast if we compare it with asynchronous counters. The synchronous counter has a single global clock that drives each flip-flop, allowing output to change in parallel. The synchronous counter can operate at higher frequencies, In the synchronous counter, all of the flip flops clock inputs use the same source and produce the output at the same time. The synchronous counter produces fewer errors than the asynchronous counter.

From the circuit diagram, we see that the Q0 bit gives a response to each falling edge of the clock while Q1 is dependent on Q0, Q2 is dependent on Q1 and Q0, and Q3 is dependent on Q2, Q1, and Q0. Application of Counters in Digital Electronics Here are the applications of the counters in digital electronics:  Frequency Measurement and Division The counter is used to measure the frequency of a signal, simply by counting the no of cycles in a particular given time period and the counter is also used to divide the input clock frequency by a fixed integer value.  Timing The counter is also used to generate timing signals like pulse-width modulated (PWM) signals. These signals are commonly used in power electronics to control the speed of motors and regulate the brightness of LEDs.

PLCs often make a distinction between Digital (or Discrete) and Analog I/O. Digital I/O acts like a standard light switch where the state is either on or off, with no states between. Analog I/O acts like a dimmer switch, where the state can be anywhere between on and off. It is easy to think of there being two sources of input data for PLCs: Device input data, automatically generated by a machine or sensor, or User input data, generated by a human operator using an HMI or SCADA system. The Device input data comes from sensors and machines that send information to the PLC. This can include:  On/Off states for things like mechanical switches and buttons  Analog readings for things like speed, pressure, and temperature  Opened/Closed states for things like pumps and valves Human-facilitated inputs can include button pushes, switches, sensors from devices like keyboards, touch screens, remotes, or card readers. PLC outputs are very similar to inputs, but can also include audible or visual indicators for the user, such as turning on a warning light, or sounding an alarm beacon. Other outputs can include:  Opening or closing a valve  Adjusting the speed on a motor  Turning a heater On or Off PLC programs operate in cycles. First, the PLC detects the state of all input devices that are connected to it. The PLC executes the user-created program, using the state of the inputs to determine the state that the outputs should be changed to. The PLC then changes the output signals to each corresponding device. After completing all these steps, the PLC then does a housekeeping step, which includes an internal diagnostic safety check to ensure that everything is within normal operating conditions. The PLC restarts the cycle each time the process is completed, starting again by checking inputs. Using PLCs With Ignition With a wide range of available Ignition device drivers, you can connect Ignition with just about any modern or legacy PLC. Once the device driver is installed, data can be viewed or sent to the PLC. With PLC data now available to Ignition’s tag system, you can do so much more with Ignition’s robust core modules. With Ignition, it is possible to create a comprehensive SCADA and MES system, HMI system, Alarming and Reporting solution, or an enterprise-wide solution to view and control data on a PLC at any level of an organization.

MCU

(MICRO CONTROLLER UNIT)

What is an MCU? An MCU is an intelligent semiconductor IC that consists of a processor unit, memory modules, communication interfaces and peripherals. The MCU is used across a broad range of applications, including washing machines, robots, drones, radio and game controllers. The history of MCU can be traced back to the invention of MOSFET technology. In the early days, the MCU was a primitive semiconductor IC with a processor unit and memory module. Generally, MCUs are based on the Harvard architecture. Throughout the decades, popular manufacturers such as Intel, Motorola, Microchip and Atmel took the innovation further. Most of the MCUs developed by these manufacturers are 8-bit MCUs with proprietary architecture. The exception is ARM-based MCU, where the ARM architecture is licensed to the manufacturers. The ARM architecture currently dominates the market for 32-bit MCUs. How Does An MCU Work? While an MCU has a processor unit, it is more than performing arithmetic operations on binary values. The true value of an MCU is its ability to interface with the physical world with its built-in communication and peripherals. Technically, an MCU functions by executing the program instructions stored in its non- volatile memory module. MCUs used to be ROM-based, so erasing the program data used to be difficult, if not impossible. When the flash technology is revolutionizing the semiconductor technologies, MCUs start storing program instructions in built-in flash memory. Most modern MCUs use the RISC (Reduced Instruction Set Computer) instruction architecture for its fundamental instruction processing. The RISC offers a shorter instruction execution cycle compared to its predecessor, CISC. To develop the program for an MCU, embedded system developers use the assembler or C programming language. The finished program is then loaded to the MCU with a programming tool.

The simplest microcontrollers facilitate the operation of electromechanical systems found in everyday convenience items, such as ovens, refrigerators, toasters, mobile devices, key fobs, video game systems, televisions and lawn-watering systems. They are also common in office machines such as photocopiers, scanners, fax machines and printers, as well as Smart meters, ATMs and security systems. More sophisticated microcontrollers perform critical functions in aircraft, spacecraft, ocean- going vessels, vehicles, medical and life-support systems as well as in robots. In medical scenarios, microcontrollers can regulate the operations of an artificial heart, kidney or other organs. They can also be instrumental in the functioning of prosthetic devices. Microcontrollers vs. microprocessors The distinction between microcontrollers and microprocessors has gotten less clear as chip density and complexity has become relatively cheap to manufacture and microcontrollers have thus integrated more "general computer" types of functionality. On the whole, though, microcontrollers can be said to function usefully on their own, with a direct connection to sensors and actuators, where microprocessors are designed to maximize compute power on the chip, with internal bus connections (rather than direct I/O) to supporting hardware such as RAM and serial ports. Simply put, coffee makers use microcontrollers; desktop computers use microprocessors.