MICROCONTROLLER AND ITS APPLICATIONS
COURSE OBJECTIVES
COURSE OUTCOME
COURSE OUTCOME
COURSE OUTCOME
Hands on!!!
COURSE PLAN
CIAT 1
ASSIGN 1
CIAT 2
ASSIGN 2
Hands on!!!
COURSE PLAN
CIAT 1
ASSIGN 1
CIAT 2
ASSIGN 2
Unit 1,2 and Half in Unit 3
Half in Unit 3, Unit 4 and 5
Simulation and Study
Project and product
COURSE MATERIALS
CIAT 1
ASSIGN 1
CIAT 2
ASSIGN 2
Unit 1,2 and Half in Unit 3
Half in Unit 3, Unit 4 and 5
Simulation and Study
Project and product
Raspberry Pi PICO
Input
Microprocessors
Output
Memory
Microcontroller
Let’s get our basics brushed
What is inside a microprocessor?
Millions of ICs?
What kinda ICs?
Analog IC | Digital IC
What is inside these ICs?
Let’s get our basics brushed
What is inside a microprocessor?
Millions of ICs?
What kinda ICs?
Analog IC | Digital IC
What is inside these ICs?
Transistors
What is inside these transistors?
Diodes? FETs?
What is inside a microprocessor?
Millions of ICs?
What kinda ICs?
Analog IC | Digital IC
What is inside these ICs?
Transistors
What is inside these transistors?
Diodes? FETs?
Let’s get our basics brushed
Let’s get our basics brushed
What is inside a microprocessor?
Millions of ICs?
What kinda ICs?
Analog IC | Digital IC
What is inside these ICs?
Transistors
What is inside these transistors?
Diodes? FETs?
Let’s get our basics brushed
Transistors
Let’s get our basics brushed
Transistors
Are transistors analog or Digital?
Let’s get our basics brushed
Transistors
| RTL (Resistor-Transistor Logic) | TTL (Transistor-Transistor Logic) | DTL (Diode-Transistor Logic) |
Components | Resistors and BJTs | BJTs for logic functions and amplification | Diodes for input logic, transistors for output amplification |
Speed | Relatively slow | Faster than RTL and DTL | Slower than TTL but faster than RTL |
| | | |
| | | |
| | | |
| | | |
Differences in the above two is, one is RTL, another is TTL and then there is also another formation DTL
Analyze
And find the GATE configuration
Analyze
Introduction
Introduction
4
0
Summary
Introduction
16MHz
160MHz
240MHz
I2C vs SPI vs UART
Was ist das?
Und warum brauchen wir das?
How these registers are used in program?
| 1 | 2 | 3 | 4 | 5 |
A | | | | | |
B | | | | | |
C | | XXXX | | | |
D | | | | | |
E | | | | | |
How these registers are used in program?
| 1 | 2 | 3 | 4 | 5 |
A | | | | | |
B | | | | | |
C | | XXXX | | | |
D | | | | | |
E | | | | | |
| 00 | 04 | 08 | 10 | 14 |
A | | | | | |
B | | | | | |
0xd000000 | | GPIO IN | | | |
D | | | | | |
E | | | | | |
How these registers are used in program?
| 04 | |||||||||||||||||||||||||||||||
0xd000000 | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 | 0 |
https://docs.micropython.org/en/latest/rp2/quickref.html
A system overview of the RP2040 chip
RP2040
IO
CLOCK
PERIPHERALS
BUS FABRIC
PROCESSOR
MEMORY
PIO
DMA
IO
CLOCK
PERIPHERALS
BUS FABRIC
PROCESSOR
MEMORY
PIO
DMA
Architecture of RP2040
IO
CLOCK
PERIPHERALS
BUS FABRIC
PROCESSOR
MEMORY
PIO
DMA
RP2040
Crystal is used to generate the clock pulse for the system.
In addition there is clock generation to enable the different clock values. Further PLL is provided to support the operation
RP2040
Access to the internal Serial Wire Debug multi-drop bus. Provides debug access to both processors, and can be used to download code
RP2040
General-purpose digital input and output. RP2040 can connect one of a number of internal peripherals to each GPIO, or control GPIOs directly from software.
26-29 - ADC
RP2040
QSPI is a high-speed serial interface that uses four data lines to transfer data between a microcontroller and external flash memory.�It enables faster read/write operations than standard SPI, often supporting execute-in-place (XIP) so code can run directly from external flash.
This is the structure which controls the bus over the regions of the system.
RP2040
There are 2 processors which can be interrupted and has connection to SIO
Programmable input and output.
Memories in RP2040
RP2040
Pin Descriptions
Classify and detail the functions of various pins
Pin Descriptions
Pin Descriptions
Pin Descriptions
Name | Description |
USB_VDD | Power supply for internal USB Full Speed PHY, nominal voltage 3.3V |
ADC_AVDD | Power supply for analogue-to-digital converter, nominal voltage 3.3V |
VREG_VIN | Power input for the internal core voltage regulator, nominal voltage 1.8V to 3.3V |
VREG_VOUT | Power output for the internal core voltage regulator, nominal voltage 1.1V, 100mA max current |
DVDD | Digital core power supply, nominal voltage 1.1V. Can be connected to VREG_VOUT, or to some other board-level power supply. |
GPIO Functions
To select the functions, watch this video from 44th minute onwards.
://www.youtube.com/whttpsatch?v=Duel_Oaases&t=745s
https://docs.micropython.org/en/latest/rp2/quickref.html
GPIO Functions
Each individual GPIO pin can be connected to an internal peripheral via the GPIO functions defined below. Some internal peripheral connections appear in multiple places to allow some system level flexibility. SIO, PIO0 and PIO1 can connect to all GPIO pins and are controlled by software (or software controlled state machines) so can be used to implement many functions.
To select the function use func_sel register, see in page236 of the datasheet
Differentiate the General-Purpose Input Output pins in RP2040
#define LED 1
unsigned int * gpioOut = (unsigned int*)0xd0000010;
�void setup() {
// put your setup code here, to run once:
pinMode(LED, OUTPUT);
pinMode(3,OUTPUT);
pinMode(1,OUTPUT);
pinMode(0,OUTPUT);
pinMode(6,OUTPUT);
pinMode(2,OUTPUT);
pinMode(5,OUTPUT);
pinMode(4,OUTPUT);
pinMode(7,OUTPUT);
}
�void loop() {
*gpioOut = 0b11111111;
delay(1000); // this speeds up the simulation
*gpioOut = 0;
delay(1000);
}
�
const int numLEDs = 8; // Number of LEDs
const int ledPins[numLEDs] = {0, 1, 2, 3, 4, 5, 6, 7}; // GPIO pins connected to LEDs
�void setup() {
for (int i = 0; i < numLEDs; i++) {
pinMode(ledPins[i], OUTPUT); // Set LED pins as OUTPUT
}
}
�void loop() {
for (int i = 0; i < numLEDs; i++) {
digitalWrite(ledPins[i], HIGH); // Turn on all LEDs simultaneously
}
delay(500); // Wait for 500ms
for (int i = 0; i < numLEDs; i++) {
digitalWrite(ledPins[i], LOW); // Turn off all LEDs simultaneously
}
delay(500); // Wait for 500ms
}
https://wokwi.com/projects/372647917103864833
Register based programming to toggle LEDs
https://www.youtube.com/watch?v=Duel_Oaases&t=745s
https://docs.micropython.org/en/latest/rp2/quickref.html