SlideShare ist ein Scribd-Unternehmen logo
1 von 38
RIG-NITC
WORKSHOP ON BASIC ROBOTICS
AND
EMBEDDED SYSTEMS SIMULATION
Doubts?
 You are free to ask your doubts!!
Microcontrollers
 abbreviated µC, uC or MCU
 single integrated circuit
◦ processor core
◦ memory
◦ programmable input/output peripherals.
 A computer system optimized for
hardware control in a single piece of
silicon..
See what a uC can do.!!
Microcontrollers
 Most popular microcontrollers.
◦ AVR
◦ ARM
◦ PIC
◦ 8051
E.g. AVR ATmega8,ATmega16,Cortex
A8,A10
Atmega 16
 8-bit high performance uC
 1 MIPS speed at 1 MHz
 16 Kb FLASH Memory
 Static RAM of 1 Kb
 0.5 Kb EEPROM
 40 PIN design
 32 I/O ports.
 3 timers
 SPI, TWI, serial interfacing
 ADC converters
 Internal 1 MHz oscillator
Extra Information:
• General purpose register :
 Stores local variables
 I/O registers:
 Configures the I/O peripherals
 FLASH:
 Stores our program code and bootloader
 Starts with memory address 0x00
 EEPROM:
 It can be used to store those values to be stored
even when switched off
 Slow to access
I/O ports
• 4 i/o ports namely PORT A, PORT B,
PORT C and PORT D
• PORT A has ADC
• Any PIN can be configured both for
input or output.
• BUT how to configure??
AVR REGISTERS
 Stores some important values
 Windows registry..?
 Contains address of pins in
hexadecimal values
 Stores the configuration settings
Registers 
 Data Direction Register(DDR)
◦ 0 means INPUT PIN
◦ 1 means OUTPUT PIN
 PORT Register
◦ Configures output
 0 means 0v
 1 means 5v
 PIN register
◦ Stores the input at any PIN
 1if input is a 5v signal
 0 if input is 0v
Binary to HexaDecimal
Conversion
 Easy to express.
 Binary contains 0 and 1
 Hexadecimal s/m contain 0 to 9 and A
to F
 Binary to hex
 Hex to binary
Use of TTL logic.?
 What is TTL logic
 0’s and 1’s  what is its meaning??
 0GND….but what is GND
 1VCC…what is VCC
DDR
 DDRx where x=A,B,C,D
 8-BIT binary/hexadecimal value
 Example:
◦ DDRA=0B01110101;
PORT
 To configure the output settings
 8-BIT binary/hexadecimal value
PULL UP RESISTOR
 Reduce noise..what is noise??
 PORTx bits set 1…ut DDRx is set 0
 Resistor comes in series.
Input monitoring??
 Have you ever thought.?
 How?
PIN
 Stores the input that the
microcontroller detects…
 Example of input s/m
 8-bit binary/hexadecimal value
 Example:
◦ If PINA==0b00101111do something
But how to write the code??
Embedded C
• Most powerful programming Language
• Fast execution
• Reduced Instructions
• Similar to simple C coding
Essential Software and
Hardware
 Softwares:(will be provided: open source)
◦ Winavr
◦ HIDbootFlash
◦ Proteus ISIS
 Hardwares:(will be provided)
◦ RigDev Board
 Low cost than corporate development boards
 Based on Atmega 16
 In built USB interfacing
Getting Started
 Install Winavr
 Install HIDbootFlash
 Check the RigDev Board
◦ Programmers notepad
◦ mfile
General Structure of a code
#include<avr/io.h>
int main()
{
}
This is the general format of any embedded C code that we write
for ATmega uCs.
#include<avr/io.h> includes the details about the PIN
configurations of ATmega series of uCs.
Our code is written inside the main() function.
Programmers Notepad
Programmers Notepad
 Save code as main.c
 Create “ makefile ”
 Tools  make all
Makefile
 Written in mfile
 Change mcu name
 Change frequency
Lets do something 
 LED Lighting
 CathodeGND
 ANODE5v
More about it
 Made up mostly using GaAs.
 Light emitted due to electrical
excitation
 How to identify cathode
◦ Leg method
◦ Edge method
 NEVER CONNECT LED DIRECTLY
TO SUPPLY
 Resistor in series.
Lets Do Something 
 LED Blinking
◦ #include<util/delay.h>
 _delay_ms();
 _delay_us();
 #include<avr/io.h>
#include<util/delay.h>
main()
{
DDRA=0X01;
While(1)
{
PORTA=0X01;
_delay_ms(1000);
PORTA=0X00;
_delay_ms(1000);
}
}
Pulse Width
Modulation(PWM)
 What is a PWM signal.
 DAC
Duty Cycle
How is it usefull.??
DAC examples
 LED contrast control
 RMS voltage is exploited
LED Contrast Control
 #include “pwm.h” includes the header
file for speed control
 pwminit(int freq) initializes pwm at
required frequency
 pwm(int a,int b) sets pwm on PD4 and
PD5
 a and b are duty cycles
 a controls PD4 and b controls PD5
coding
 #include <avr/io.h>
 #include<util/delay.h>
 #include “pwm.h”
 int main()
◦ {
◦ While(1)
◦ {
◦ DDRB=0x30;
◦ pwminit(50);
◦ pwm(0,50);
◦ _delay_ms(2000);
◦ pwm(50,0);
◦ _delay_ms(2000);
◦ pwm(100,100);
◦ _delay_ms(2000);
◦ }
◦ }
Motor Speed Control
 #include “pwm.h” includes the header
file for speed control
 pwminit(int freq) initializes pwm at
required frequency
 pwm(int a,int b) sets pwm on PD4 and
PD5
 a and b are duty cycles
 a controls PD4 and b controls PD5
Motor speed control
 #include <avr/io.h>
 #include<util/delay.h>
 #include “pwm.h”
 int main()
◦ {
◦ While(1)
◦ {
◦ DDRB=0x30;
◦ pwminit(50);
◦ pwm(0,50);
◦ _delay_ms(2000);
◦ pwm(50,0);
◦ _delay_ms(2000);
◦ pwm(100,100);
◦ _delay_ms(2000);
◦ }
◦ }
Have fun..!!

Weitere ähnliche Inhalte

Was ist angesagt?

Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseElaf A.Saeed
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Tony Olsson.
 
Using Ready-for-PIC and SDR Libraries
Using Ready-for-PIC and SDR LibrariesUsing Ready-for-PIC and SDR Libraries
Using Ready-for-PIC and SDR LibrariesCorrado Santoro
 
Arduino Nodebots (Hackster CascadiaJS Workshop)
Arduino Nodebots (Hackster CascadiaJS Workshop)Arduino Nodebots (Hackster CascadiaJS Workshop)
Arduino Nodebots (Hackster CascadiaJS Workshop)Monica Houston
 
Embedded &amp; pcb design
Embedded &amp; pcb designEmbedded &amp; pcb design
Embedded &amp; pcb designTanveer Behl
 
arduino-ppt
 arduino-ppt arduino-ppt
arduino-pptjhcid
 
Embedded systems الانظمة المدمجة
Embedded systems  الانظمة المدمجة Embedded systems  الانظمة المدمجة
Embedded systems الانظمة المدمجة salih mahmod
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 prsamurti
 
Physical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialPhysical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialTony Olsson.
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino unoRahat Sood
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينوsalih mahmod
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming FamiliarizationAmit Kumer Podder
 
Developing an avr microcontroller system
Developing an avr microcontroller systemDeveloping an avr microcontroller system
Developing an avr microcontroller systemnugnugmacmac
 
برمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولبرمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولAhmed Sakr
 

Was ist angesagt? (20)

Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino Course
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)
 
Using Ready-for-PIC and SDR Libraries
Using Ready-for-PIC and SDR LibrariesUsing Ready-for-PIC and SDR Libraries
Using Ready-for-PIC and SDR Libraries
 
131080111003 mci
131080111003 mci131080111003 mci
131080111003 mci
 
Arduino Nodebots (Hackster CascadiaJS Workshop)
Arduino Nodebots (Hackster CascadiaJS Workshop)Arduino Nodebots (Hackster CascadiaJS Workshop)
Arduino Nodebots (Hackster CascadiaJS Workshop)
 
Embedded &amp; pcb design
Embedded &amp; pcb designEmbedded &amp; pcb design
Embedded &amp; pcb design
 
Arduino - Peripherals and interface
Arduino - Peripherals and interfaceArduino - Peripherals and interface
Arduino - Peripherals and interface
 
arduino-ppt
 arduino-ppt arduino-ppt
arduino-ppt
 
Ii avr-basics(1)
Ii avr-basics(1)Ii avr-basics(1)
Ii avr-basics(1)
 
Embedded systems الانظمة المدمجة
Embedded systems  الانظمة المدمجة Embedded systems  الانظمة المدمجة
Embedded systems الانظمة المدمجة
 
AT mega8 basics
AT mega8 basicsAT mega8 basics
AT mega8 basics
 
Avr microcontroller
Avr microcontrollerAvr microcontroller
Avr microcontroller
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 p
 
Physical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialPhysical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serial
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
 
Developing an avr microcontroller system
Developing an avr microcontroller systemDeveloping an avr microcontroller system
Developing an avr microcontroller system
 
Avr and arm
Avr and armAvr and arm
Avr and arm
 
برمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولبرمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأول
 

Andere mochten auch

Programming ATmega microcontroller using Embedded C
Programming ATmega microcontroller using Embedded CProgramming ATmega microcontroller using Embedded C
Programming ATmega microcontroller using Embedded CVarun A M
 
AVR programming - BASICS
AVR programming - BASICSAVR programming - BASICS
AVR programming - BASICSRobotix 2011
 
How to think like a startup
How to think like a startupHow to think like a startup
How to think like a startupLoic Le Meur
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakShelly Sanchez Terrell
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

Andere mochten auch (6)

Programming ATmega microcontroller using Embedded C
Programming ATmega microcontroller using Embedded CProgramming ATmega microcontroller using Embedded C
Programming ATmega microcontroller using Embedded C
 
AVR programming - BASICS
AVR programming - BASICSAVR programming - BASICS
AVR programming - BASICS
 
Inaugural Addresses
Inaugural AddressesInaugural Addresses
Inaugural Addresses
 
How to think like a startup
How to think like a startupHow to think like a startup
How to think like a startup
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & Textspeak
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Ähnlich wie RIG-NITC Workshop on Basic Robotics and Embedded Systems Simulation

Microcontroller
MicrocontrollerMicrocontroller
MicrocontrollerSpitiq
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'tsyogesh46
 
Introduction2_PIC.ppt
Introduction2_PIC.pptIntroduction2_PIC.ppt
Introduction2_PIC.pptAakashRawat35
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basicssagar Ramdev
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advancedImran Sheikh
 
how to generate sms
how to generate smshow to generate sms
how to generate smssumant reddy
 
PIC introduction + mapping
PIC introduction + mappingPIC introduction + mapping
PIC introduction + mappingOsaMa Hasan
 
Automatic room light controller with visible counter
Automatic room light controller with visible counterAutomatic room light controller with visible counter
Automatic room light controller with visible counterMafaz Ahmed
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the ArduinoWingston
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerRup Chowdhury
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and RoboticsNIT Raipur
 
Micro Controller 8051 of Speedo Meter using KEIL Code
Micro Controller 8051 of Speedo Meter using KEIL CodeMicro Controller 8051 of Speedo Meter using KEIL Code
Micro Controller 8051 of Speedo Meter using KEIL CodeSunil Kumar R
 

Ähnlich wie RIG-NITC Workshop on Basic Robotics and Embedded Systems Simulation (20)

Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
 
Introduction2_PIC.ppt
Introduction2_PIC.pptIntroduction2_PIC.ppt
Introduction2_PIC.ppt
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advanced
 
Presentation
PresentationPresentation
Presentation
 
Badal sharma
Badal sharmaBadal sharma
Badal sharma
 
how to generate sms
how to generate smshow to generate sms
how to generate sms
 
arduinoedit.pptx
arduinoedit.pptxarduinoedit.pptx
arduinoedit.pptx
 
Embedded system
Embedded  systemEmbedded  system
Embedded system
 
PIC introduction + mapping
PIC introduction + mappingPIC introduction + mapping
PIC introduction + mapping
 
Automatic room light controller with visible counter
Automatic room light controller with visible counterAutomatic room light controller with visible counter
Automatic room light controller with visible counter
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontroller
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 
Micro Controller 8051 of Speedo Meter using KEIL Code
Micro Controller 8051 of Speedo Meter using KEIL CodeMicro Controller 8051 of Speedo Meter using KEIL Code
Micro Controller 8051 of Speedo Meter using KEIL Code
 
Picmico
PicmicoPicmico
Picmico
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 

Kürzlich hochgeladen

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

RIG-NITC Workshop on Basic Robotics and Embedded Systems Simulation

  • 1. RIG-NITC WORKSHOP ON BASIC ROBOTICS AND EMBEDDED SYSTEMS SIMULATION
  • 2. Doubts?  You are free to ask your doubts!!
  • 3. Microcontrollers  abbreviated µC, uC or MCU  single integrated circuit ◦ processor core ◦ memory ◦ programmable input/output peripherals.  A computer system optimized for hardware control in a single piece of silicon..
  • 4. See what a uC can do.!!
  • 5. Microcontrollers  Most popular microcontrollers. ◦ AVR ◦ ARM ◦ PIC ◦ 8051 E.g. AVR ATmega8,ATmega16,Cortex A8,A10
  • 7.  8-bit high performance uC  1 MIPS speed at 1 MHz  16 Kb FLASH Memory  Static RAM of 1 Kb  0.5 Kb EEPROM  40 PIN design  32 I/O ports.  3 timers  SPI, TWI, serial interfacing  ADC converters  Internal 1 MHz oscillator
  • 8. Extra Information: • General purpose register :  Stores local variables  I/O registers:  Configures the I/O peripherals  FLASH:  Stores our program code and bootloader  Starts with memory address 0x00  EEPROM:  It can be used to store those values to be stored even when switched off  Slow to access
  • 9. I/O ports • 4 i/o ports namely PORT A, PORT B, PORT C and PORT D • PORT A has ADC • Any PIN can be configured both for input or output. • BUT how to configure??
  • 10. AVR REGISTERS  Stores some important values  Windows registry..?  Contains address of pins in hexadecimal values  Stores the configuration settings
  • 11. Registers   Data Direction Register(DDR) ◦ 0 means INPUT PIN ◦ 1 means OUTPUT PIN  PORT Register ◦ Configures output  0 means 0v  1 means 5v  PIN register ◦ Stores the input at any PIN  1if input is a 5v signal  0 if input is 0v
  • 12. Binary to HexaDecimal Conversion  Easy to express.  Binary contains 0 and 1  Hexadecimal s/m contain 0 to 9 and A to F  Binary to hex  Hex to binary
  • 13. Use of TTL logic.?  What is TTL logic  0’s and 1’s  what is its meaning??  0GND….but what is GND  1VCC…what is VCC
  • 14. DDR  DDRx where x=A,B,C,D  8-BIT binary/hexadecimal value  Example: ◦ DDRA=0B01110101;
  • 15. PORT  To configure the output settings  8-BIT binary/hexadecimal value
  • 16. PULL UP RESISTOR  Reduce noise..what is noise??  PORTx bits set 1…ut DDRx is set 0  Resistor comes in series.
  • 17. Input monitoring??  Have you ever thought.?  How?
  • 18. PIN  Stores the input that the microcontroller detects…  Example of input s/m  8-bit binary/hexadecimal value  Example: ◦ If PINA==0b00101111do something
  • 19. But how to write the code??
  • 20. Embedded C • Most powerful programming Language • Fast execution • Reduced Instructions • Similar to simple C coding
  • 21. Essential Software and Hardware  Softwares:(will be provided: open source) ◦ Winavr ◦ HIDbootFlash ◦ Proteus ISIS  Hardwares:(will be provided) ◦ RigDev Board  Low cost than corporate development boards  Based on Atmega 16  In built USB interfacing
  • 22. Getting Started  Install Winavr  Install HIDbootFlash  Check the RigDev Board ◦ Programmers notepad ◦ mfile
  • 23. General Structure of a code #include<avr/io.h> int main() { } This is the general format of any embedded C code that we write for ATmega uCs. #include<avr/io.h> includes the details about the PIN configurations of ATmega series of uCs. Our code is written inside the main() function.
  • 25. Programmers Notepad  Save code as main.c  Create “ makefile ”  Tools  make all
  • 26. Makefile  Written in mfile  Change mcu name  Change frequency
  • 27. Lets do something   LED Lighting  CathodeGND  ANODE5v
  • 28. More about it  Made up mostly using GaAs.  Light emitted due to electrical excitation  How to identify cathode ◦ Leg method ◦ Edge method  NEVER CONNECT LED DIRECTLY TO SUPPLY  Resistor in series.
  • 29. Lets Do Something   LED Blinking ◦ #include<util/delay.h>  _delay_ms();  _delay_us();  #include<avr/io.h> #include<util/delay.h> main() { DDRA=0X01; While(1) { PORTA=0X01; _delay_ms(1000); PORTA=0X00; _delay_ms(1000); } }
  • 30. Pulse Width Modulation(PWM)  What is a PWM signal.  DAC
  • 31. Duty Cycle How is it usefull.??
  • 32. DAC examples  LED contrast control  RMS voltage is exploited
  • 33. LED Contrast Control  #include “pwm.h” includes the header file for speed control  pwminit(int freq) initializes pwm at required frequency  pwm(int a,int b) sets pwm on PD4 and PD5  a and b are duty cycles  a controls PD4 and b controls PD5
  • 34. coding  #include <avr/io.h>  #include<util/delay.h>  #include “pwm.h”  int main() ◦ { ◦ While(1) ◦ { ◦ DDRB=0x30; ◦ pwminit(50); ◦ pwm(0,50); ◦ _delay_ms(2000); ◦ pwm(50,0); ◦ _delay_ms(2000); ◦ pwm(100,100); ◦ _delay_ms(2000); ◦ } ◦ }
  • 35.
  • 36. Motor Speed Control  #include “pwm.h” includes the header file for speed control  pwminit(int freq) initializes pwm at required frequency  pwm(int a,int b) sets pwm on PD4 and PD5  a and b are duty cycles  a controls PD4 and b controls PD5
  • 37. Motor speed control  #include <avr/io.h>  #include<util/delay.h>  #include “pwm.h”  int main() ◦ { ◦ While(1) ◦ { ◦ DDRB=0x30; ◦ pwminit(50); ◦ pwm(0,50); ◦ _delay_ms(2000); ◦ pwm(50,0); ◦ _delay_ms(2000); ◦ pwm(100,100); ◦ _delay_ms(2000); ◦ } ◦ }