Go Down

Topic: Ch-11 Peripheral Controllers and Devices (Read 838 times) previous topic - next topic


Jul 09, 2020, 06:33 pm Last Edit: Jul 11, 2020, 05:57 pm by GolamMostafa
11.1  Introduction
In microcontroller applications, the MCU drives peripheral devices (the IO devices) like 7-segment display unit, LCD, Servo Motor, LM35 Temp Sensor, Water Pump, Fluid Injection System in the hospital, and the like for various purposes. These IO devices are always connected with the MCU through some kind of "interface controllers/peripheral controllers/programmable peripheral interface controllers (PPI)". These interface controllers could be embedded within the MCU or be lying outside the MCU. A peripheral controller solves the incompatibility problem (between MCU and IO device) which exists due to mismatch in logic level, protocol level, and power ratings (voltage/current).

MCU like ATmega328P of the Arduino UNO Board is a low voltage (5v) and low power (an IO pin can deliver only 20 mA current) device; but in the industrial field, it might drive/control high power device like a 3-phase 3 kW induction motor (415 V/ line-to-line voltage and about 9 A line current at 0.8 pf). This example tells us how important it is (particularly for the EE Engineering students) to study the interfacing issues.  

1.  Peripheral Device (CC7SD Display Unit)  and Embedded Peripheral Controller

Figure-11.1: Interfacing of multiplexed type "CC7SD display  unit"  

(1)  In the diagram of Fig-11.1, the "LM35 Temp Sensor" is an "input device/peripheral device" and the 4-digit "cc-type multiplexed 7-segment display unit (CC7SD)" is an "output device/peripheral device".

(2)  In Fig-11.1, the peripheral controllers are embedded within the MCU and these are:
The CC7SD unit is connected with MCU via these PPIs. The IO lines of these PPIs drive/control the ON/OFF conditions of the segments of the display unit.

(b)  ADC.
The LM35 Temp Sensor is connected with MCU with the help of this PPI. This PPI helps the MCU to acquire the analog value of the temperature sensor and then convert it into digital form.    

(3)  Limitations of the CC7SD Unit of Fig-11.1.
(a)  Because it is a multiplexed type display unit, the MCU must refresh it frequently; otherwise, the display will freeze to a single-digit. Here, the MCU is spending huge amount time which could be used in some other useful tasks.  

(b)  because the port pins have limited current source/sink capability, the brightness of the display unit is usually below standard.

(c)  Because the display unit is being driven directly by the IO lines of the internal peripheral controllers, there are about 12 IO lines engaged with the display unit which is not affordable in the practical case as the MCU has to handle other peripheral devices using IO lines.

2.  Peripheral Device (CC7SD Display Unit)  and External Peripheral Controller

Figure-11.2:  External peripheral controller MAX7219 based multiplexed display unit

(1)  It is possible to overcome the limitations of the display system of Fig-11.1 with the help of the display system of Fig-11.2; where, an external peripheral controller (M2 : MAX7219) drives the "4-digit multiplexed CC7SD Unit".

(2)  Now, the MAX7219 chip (U2 in Fig-11.2) has taken over the "display refreshing" job from the MCU. The MCU is free and it can do some other useful tasks. Whenever needed, the MCU just writes new data into the registers of the MAX7219 chip for the digits of the display unit. The MAX7219 has its own scanning circuit by virtue of which it refreshes the multiplexed display unit.    

3.  Peripheral Device (Parallel IO driven LCD)  and Embedded Peripheral Controller

Figure-11.3:  Embedded (internal) parallel IO (peripheral controller) driven LCD (PIOLCD)

4.  Peripheral Device (I2C Bus driven LCD)  and Embedded Peripheral Controller

Figure-11.4:  External I2C based  peripheral controller driven LCD (I2CLCD)

5.  Peripheral Device (Bluetooth/Mobile Phone) and Embedded Peripheral Controller

Figure-11.5: Interfacing Mobile phone with UNO using "HC-05 Bluetooth" external controller

... to be continued




Jul 09, 2020, 06:35 pm Last Edit: Jul 11, 2020, 05:58 pm by GolamMostafa
11.4  Questions and Answers

...to be continued

Go Up