top of page
Writer's pictureSubir Biswas

A beginner’s guide to Microcontroller Peripheral

Updated: Dec 29, 2020

In this module, I'll cover the microcontroller Peripherals and describe the very basic information about those. I'll create separate articles on the working of each peripheral separately where I'll describe the operation details with an example. See below for the basic updates.


I/O Ports

Input-output ports which sometimes termed as General purpose Input/Output Ports (GPIO). One major feature of a microcontroller is the versatility built into the input/output circuits that connect the microcontroller to the outside world. A microprocessor design must add additional chips to interface with external circuitry; this ability is built into the microcontroller. The number of I/Os depends on the number of pins available on the selected chip. A microcontroller pin varies from 8 to 100 to more.


Timer

As all microcontrollers are performing some real-life tasks, so time dependency is very much important. Sometimes it termed as counter as well. The Timer/Counter is designed to count cycles of the peripheral clock or an externally-supplied clock, and can optionally generate interrupts or perform other actions at specified timer values, based on four match registers. It also includes four capture inputs to trap the timer value when an input signal transitions, optionally generating an interrupt. Some microcontrollers have more than one dedicated timer function which can work independently but based on priority settings.


UART

The Universal Asynchronous Receiver Transmitter (UART) is one of two serial I/O communication basic. The UART can be configured as a full-duplex to communicate with peripheral devices, such as CRT terminals and personal computers. It can also be configured as a half-duplex synchronous system that can communicate with peripheral devices, such as A/D or D/A integrated circuits, serial EEPROMs, and so on. Sometimes, the UART peripheral implements additional features, including automatic baud rate detection and calibration, automatic wake-up on Sync Break reception and 12-bit Break character transmit. These make it ideally suited for use in Local.


I2C

Inter IC Communication (I2C) is a type of Master Synchronous Serial Port (MSSP) which is is a half-duplex serial interface. This is useful for communicating with other peripheral or microcontroller devices. These peripheral devices include serial EEPROMs, shift registers, display drivers, and A/D Converters. Sometimes this port used for The I2C-bus may be used for test and diagnostic purposes. Standard I2C compliant bus interfaces that may be configured as Master/Slave.


SPI

Serial Peripheral Interface (SPI) is a type of MSSP but a Full-Duplex serial Communication. It can handle multiple masters and slaves being connected to a given bus. Only a single master and a single slave can communicate on the interface during a given data transfer. During a data transfer, the master always sends 8 to 16 bits of data to the slave, and the slave always sends a byte of data to the master.


USB

The Universal Serial Bus (USB) is a 4 wire bus that supports communication between a host and a number of peripherals. The host controller allocates the USB bandwidth to attached devices through a token-based protocol. The bus supports hot plugging, un-plugging, and dynamic configuration of the devices. All transactions are initiated by the host microcontroller.


ADC

The Analog-to-Digital Converter (ADC) peripheral has different numbers of input based on the feature or number of pins of the microcontroller used. Additionally, two internal channels are available for sampling the Core supply voltage and VBG absolute reference voltage. This module allows the conversion of an analog input signal to a corresponding digital number. Basic clocking for the A/D converters is provided by the peripheral clock. A programmable

the divider is included in each converter, to scale this clock to the 4.5 MHz (depends on microcontroller used) clock needed by the successive approximation process.


DAC

This does the opposite of ADC. Digital-to-Analog Converter (DAC) change the digital value to analog. This read/write register includes the digital value to be converted to analog, and a bit that trades off performance vs. power.


RTC

The Real Time Clock (RTC) is a set of counters for measuring time when system power is

on, and optionally when it is off. It uses little power in Power-down mode. The RTC module is intended for applications where accurate time must be maintained for an extended period with minimum to no intervention from the CPU. The module is optimised for low-power usage in order to provide extended battery life while keeping track of time while the main power supply is switched off.


611 views0 comments

Related Posts

See All

Comments


Post: Blog2 Post
bottom of page