SlideShare a Scribd company logo
PROGRAMMING A ROBOT USING ICC AVR Ver 7.5
ICC AVR ver 7.5ICC AVR is a tool used to program Atmel microcontrollers.It uses a C compiler to compile the high level code into a low level code.ICC AVR then converts this low level code into HEX code.It also has built in tools to program the flash memory of the microcontroller.
HOW TO INSTALL ICC AVR ver 7.5
ICC AVR ver 7.5 is not a freeware and thus you have to purchase it.But 45 days trial versions are available on the net and they give almost the same features.Thus download the setup of the trial version from the site : http://www.imagecraft.com/Run the setup and install ICC AVR ver 7.5
HOW TO USE ICC AVR ver 7.5
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
H BRIDGE PIN-OUT
L293DIN1IN2EN1PC2PC3PC4PC5PC6PC7OUT1OUT2OUT3OUT4ATMEGA 16IN3IN 4EN2
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
IMPORTANT STUFF….
Input Output PORTS• Four, 8 bit I/O ports- PORT A,B,C,D• All I/O ports pins are bidirectional and can beconfigured individually• Input pins can be configured to utilizeinternal pullups.• Data Direction Register , DDRn• Port Driver Register, PORTn• Port Pin Register, PINn
Data Direction Register, DDRn• Determines the direction of individual pins ofports• If the bit of the DDR is set the corresponding pinof the port is configured as output pin• If the bit of the DDR is cleared thecorresponding pin of the port is configured asinput pin• DDRA = 0xF0;• 4 MSB pins of PORTA are output pins• 4 LSB pins of PORTA are input pins
Port Pin Register, PINn• Reading the input pins of port is done byreading PIN register• Temp = PINA;• Read the PORTA input and store in temp variable
Port Drive Register, PORTn• For pins configured as input(DDRn[x] = 0) microcontroller connects ainternal pull up register if thecorresponding bit of PORTn is set• If the PORTn bit is cleared, pin is Tristated• DDRA = 0x00;• PORTA = 0xF0
Buzzer On / OFF• PORT B pin 7• Pin is configured as output• DDRB= 0x80;• To turn on the buzzer output high• PORTB = 0x80;• To turn off the buzzer output low• PORTB = 0x00;
Buzzer Functionvoid Buzzer_ON(void){PORTB = 0x80;}void Buzzer_OFF(void){PORTB = PORTB & 0x7F;}
LED DISPLAY8 bit LED display is connected to PORTD.To display any bit combination on the LED display, we use…   PORTD=0xXX;
CODE FOR LED DISPLAYvoid main(void){init_devices(); while(1) {  PORTD=0xFF; }}
Analog To Digital Converter• 10 bit resolution• 8 channels• PORTA(0 – 7)• Disable internal pull up• ADCH & ADCL – Data       Register• ADMUX- Channel Select Register• ADCSR – Control & Status Register
Programming A Robot Using
unsigned char ADC_conversion (unsigned char ADC_channel_number) {	 			 unsigned inti = 0; ADCH = 0x00;i = ADC_channel_number & 0x0F; // keeping the loweatnibbel ADMUX = i | 0x20; //upper nibbel of 0x20 indicates the result is left adjusted (8 bit ADC conversion) ADCSR |= 0x40; for (i = 1; i < 255; i++); //delay of 93.2 uSi = ADCH; return (i);}void main(void){   unsigned char I, value[3];;   for(i=0;i<3;i++)   {       value[i]=ADC_conversion(i);   }}
HOW TO COMPILE AND BUILD YOUR CODE
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
Programming A Robot Using
After you program your robot, it is ready to run the code written onto the microcontroller.So just power on the microcontroller and it will start the execution of the code.
MOTION CONTROL AND LINE FOLLOWING
PORT CONFIGURATIONPORTA is ADC port.3 white line sensors are connected to pin1, pin2, pin 3 of PORTA.PORTC is connected to the H-bridge.
CODE FOR MOTION           void delay(int time)           {inti,j;  for(i=0;i<time;i++)  for(j=0;j<500;j++);}void backward(void)  // subroutine for backward motion{ PORTC=0xB4; delay(100);}void right(void)    // subroutine for right motion{ PORTC=0xB8; delay(100);}void left(void)    // subroutine for left motion{ PORTC=0xD4; delay(100);}void forward(void)   // subroutine for forward motion{ PORTC=0xD8; delay(100);}   void stop(void)      // subroutine for stop motion{ PORTC=0xFF; delay(100);}//void main(void){init_devices(); //insert your functional code here... forward(); delay(1000); left(); delay(100); forward(); delay(1000); right(); delay(100); backward(); delay(1000); stop(); delay(100);}
CODE FOR LINE FOLLOWERunsigned intADC_conversion (unsigned intADC_channel_number) {	 									 unsigned inti = 0; ADCH = 0x00;i = ADC_channel_number & 0x0F; // keeping the loweatnibbel ADMUX = i | 0x20;  ADCSR |= 0x40; for (i = 1; i < 255; i++); //delay of 93.2 uSi = ADCH; return (i);}void forward(void){ PORTC=0xD8;}void left(void){ PORTC=0xB8;}void right(void){ PORTC=0xD4;}void backward(void){ PORTC=0xB4;}   //void main(void){unsigned char value[3];unsigned char i;init_devices(); while(1) { for(i=0;i<3;i++)  {   value[i]=ADC_conversion(i);  } if (value[1] < 50) {   forward(); } else {   if(value[2] > 90)   {left();   }   else   {   if (value[0] > 90)  {right();  }else   {   backward();}} } } }
THANK YOU…
Ad

More Related Content

What's hot (20)

Input Output programming in AVR microcontroller
Input  Output  programming in AVR microcontrollerInput  Output  programming in AVR microcontroller
Input Output programming in AVR microcontroller
Robo India
 
Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2
Ikhwan_Fakrudin
 
Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16
Robo India
 
Introduction to MPLAB IDE
Introduction to MPLAB IDEIntroduction to MPLAB IDE
Introduction to MPLAB IDE
Karim El-Rayes
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
sandip das
 
Lec13
Lec13Lec13
Lec13
siddu kadiwal
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontroller
Corrado Santoro
 
AT mega8 basics
AT mega8 basicsAT mega8 basics
AT mega8 basics
thetechnicalzone
 
Class7
Class7Class7
Class7
Sai Santosh Praveen
 
Code2
Code2Code2
Code2
helalyrabiy
 
Ch2 microcontroller architecture
Ch2 microcontroller architectureCh2 microcontroller architecture
Ch2 microcontroller architecture
Ahmad Sidik
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
Jeni Shah
 
PIC and LCD
PIC and LCDPIC and LCD
PIC and LCD
hairilfaiz86
 
Embedded system (Chapter )
Embedded system (Chapter )Embedded system (Chapter )
Embedded system (Chapter )
Ikhwan_Fakrudin
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
jokersclown57
 
Soc
SocSoc
Soc
Corrado Santoro
 
8155 GPPI
8155 GPPI8155 GPPI
8155 GPPI
deval patel
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
Srikrishna Thota
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
Suraj Bora
 
Handling Asynchronous Events in MCUs
Handling Asynchronous Events in MCUsHandling Asynchronous Events in MCUs
Handling Asynchronous Events in MCUs
Corrado Santoro
 
Input Output programming in AVR microcontroller
Input  Output  programming in AVR microcontrollerInput  Output  programming in AVR microcontroller
Input Output programming in AVR microcontroller
Robo India
 
Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2
Ikhwan_Fakrudin
 
Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16
Robo India
 
Introduction to MPLAB IDE
Introduction to MPLAB IDEIntroduction to MPLAB IDE
Introduction to MPLAB IDE
Karim El-Rayes
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
sandip das
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontroller
Corrado Santoro
 
Ch2 microcontroller architecture
Ch2 microcontroller architectureCh2 microcontroller architecture
Ch2 microcontroller architecture
Ahmad Sidik
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
Jeni Shah
 
Embedded system (Chapter )
Embedded system (Chapter )Embedded system (Chapter )
Embedded system (Chapter )
Ikhwan_Fakrudin
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
jokersclown57
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
Srikrishna Thota
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
Suraj Bora
 
Handling Asynchronous Events in MCUs
Handling Asynchronous Events in MCUsHandling Asynchronous Events in MCUs
Handling Asynchronous Events in MCUs
Corrado Santoro
 

Viewers also liked (11)

Robot operating systems (ros) overview &
Robot operating systems (ros) overview &Robot operating systems (ros) overview &
Robot operating systems (ros) overview &
Piyush Chand
 
Robotics Technology By communication
Robotics Technology By communicationRobotics Technology By communication
Robotics Technology By communication
Vignesh VCS
 
Seminar On Kalman Filter And Its Applications
Seminar On  Kalman  Filter And Its ApplicationsSeminar On  Kalman  Filter And Its Applications
Seminar On Kalman Filter And Its Applications
Barnali Dey
 
Introduction to ROS (Robot Operating System)
Introduction to ROS (Robot Operating System) Introduction to ROS (Robot Operating System)
Introduction to ROS (Robot Operating System)
hvcoup
 
Kalman filter for object tracking
Kalman filter for object trackingKalman filter for object tracking
Kalman filter for object tracking
Mohit Yadav
 
Traffic signal controller using at89 c52 microcontroller
Traffic signal controller using at89 c52 microcontrollerTraffic signal controller using at89 c52 microcontroller
Traffic signal controller using at89 c52 microcontroller
rock_007
 
Textual Robot programming
Textual Robot programmingTextual Robot programming
Textual Robot programming
CHEMGLOBE
 
Industrial robots
Industrial robotsIndustrial robots
Industrial robots
Ohgoma
 
Industrial robotics
Industrial roboticsIndustrial robotics
Industrial robotics
Prasanth Kumar RAGUPATHY
 
Robot programming
Robot programmingRobot programming
Robot programming
Gopal Saini
 
Robot operating systems (ros) overview & (1)
Robot operating systems (ros) overview & (1)Robot operating systems (ros) overview & (1)
Robot operating systems (ros) overview & (1)
Piyush Chand
 
Robot operating systems (ros) overview &
Robot operating systems (ros) overview &Robot operating systems (ros) overview &
Robot operating systems (ros) overview &
Piyush Chand
 
Robotics Technology By communication
Robotics Technology By communicationRobotics Technology By communication
Robotics Technology By communication
Vignesh VCS
 
Seminar On Kalman Filter And Its Applications
Seminar On  Kalman  Filter And Its ApplicationsSeminar On  Kalman  Filter And Its Applications
Seminar On Kalman Filter And Its Applications
Barnali Dey
 
Introduction to ROS (Robot Operating System)
Introduction to ROS (Robot Operating System) Introduction to ROS (Robot Operating System)
Introduction to ROS (Robot Operating System)
hvcoup
 
Kalman filter for object tracking
Kalman filter for object trackingKalman filter for object tracking
Kalman filter for object tracking
Mohit Yadav
 
Traffic signal controller using at89 c52 microcontroller
Traffic signal controller using at89 c52 microcontrollerTraffic signal controller using at89 c52 microcontroller
Traffic signal controller using at89 c52 microcontroller
rock_007
 
Textual Robot programming
Textual Robot programmingTextual Robot programming
Textual Robot programming
CHEMGLOBE
 
Industrial robots
Industrial robotsIndustrial robots
Industrial robots
Ohgoma
 
Robot programming
Robot programmingRobot programming
Robot programming
Gopal Saini
 
Robot operating systems (ros) overview & (1)
Robot operating systems (ros) overview & (1)Robot operating systems (ros) overview & (1)
Robot operating systems (ros) overview & (1)
Piyush Chand
 
Ad

Similar to Programming A Robot Using (20)

Presentation
PresentationPresentation
Presentation
Abhijit Das
 
knowledge in daily life.ppt
knowledge in daily life.pptknowledge in daily life.ppt
knowledge in daily life.ppt
SunilSharma941036
 
DEF CON 23 - Rodringo Almeida - embedded system design from electronics
DEF CON 23 - Rodringo Almeida - embedded system design from electronics DEF CON 23 - Rodringo Almeida - embedded system design from electronics
DEF CON 23 - Rodringo Almeida - embedded system design from electronics
Felipe Prado
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
SIGMATAX1
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
Spitiq
 
Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015
Rodrigo Almeida
 
Hardware interfacing basics using AVR
Hardware interfacing basics using AVRHardware interfacing basics using AVR
Hardware interfacing basics using AVR
Mohamed Abdallah
 
Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148
Omkar Rane
 
MICROCONTROLLER.pptx
MICROCONTROLLER.pptxMICROCONTROLLER.pptx
MICROCONTROLLER.pptx
fiqrie mohd
 
01 Intro to the Arduino and it's basics.ppt
01 Intro to the Arduino and it's basics.ppt01 Intro to the Arduino and it's basics.ppt
01 Intro to the Arduino and it's basics.ppt
pindi2197
 
Sensors and Actuators in Arduino, Introduction
Sensors and Actuators in Arduino, IntroductionSensors and Actuators in Arduino, Introduction
Sensors and Actuators in Arduino, Introduction
BibekPokhrel13
 
8255
82558255
8255
INTERNATIONAL SCHOOL OF TECHNOLOGY & SCIENCES (FOR WOMEN)
 
Arduino . .
Arduino             .                             .Arduino             .                             .
Arduino . .
dryazhinians
 
Atmega16
Atmega16Atmega16
Atmega16
Thrived Kumar
 
Avr report
Avr reportAvr report
Avr report
NITISH KUMAR
 
Lec03
Lec03Lec03
Lec03
siddu kadiwal
 
AVR arduino dasar
AVR arduino dasarAVR arduino dasar
AVR arduino dasar
Oktaf Kharisma
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
Mujahid Hussain
 
Basics Of Embedded Systems
Basics Of Embedded SystemsBasics Of Embedded Systems
Basics Of Embedded Systems
arlabstech
 
Lecture7
Lecture7Lecture7
Lecture7
Mahmut Yildiz
 
Presentation
PresentationPresentation
Presentation
Abhijit Das
 
knowledge in daily life.ppt
knowledge in daily life.pptknowledge in daily life.ppt
knowledge in daily life.ppt
SunilSharma941036
 
DEF CON 23 - Rodringo Almeida - embedded system design from electronics
DEF CON 23 - Rodringo Almeida - embedded system design from electronics DEF CON 23 - Rodringo Almeida - embedded system design from electronics
DEF CON 23 - Rodringo Almeida - embedded system design from electronics
Felipe Prado
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
SIGMATAX1
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
Spitiq
 
Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015
Rodrigo Almeida
 
Hardware interfacing basics using AVR
Hardware interfacing basics using AVRHardware interfacing basics using AVR
Hardware interfacing basics using AVR
Mohamed Abdallah
 
Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148
Omkar Rane
 
MICROCONTROLLER.pptx
MICROCONTROLLER.pptxMICROCONTROLLER.pptx
MICROCONTROLLER.pptx
fiqrie mohd
 
01 Intro to the Arduino and it's basics.ppt
01 Intro to the Arduino and it's basics.ppt01 Intro to the Arduino and it's basics.ppt
01 Intro to the Arduino and it's basics.ppt
pindi2197
 
Sensors and Actuators in Arduino, Introduction
Sensors and Actuators in Arduino, IntroductionSensors and Actuators in Arduino, Introduction
Sensors and Actuators in Arduino, Introduction
BibekPokhrel13
 
AVR arduino dasar
AVR arduino dasarAVR arduino dasar
AVR arduino dasar
Oktaf Kharisma
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
Mujahid Hussain
 
Basics Of Embedded Systems
Basics Of Embedded SystemsBasics Of Embedded Systems
Basics Of Embedded Systems
arlabstech
 
Ad

Recently uploaded (20)

UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Social Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTechSocial Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTech
Steve Jonas
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Social Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTechSocial Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTech
Steve Jonas
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 

Programming A Robot Using

  • 1. PROGRAMMING A ROBOT USING ICC AVR Ver 7.5
  • 2. ICC AVR ver 7.5ICC AVR is a tool used to program Atmel microcontrollers.It uses a C compiler to compile the high level code into a low level code.ICC AVR then converts this low level code into HEX code.It also has built in tools to program the flash memory of the microcontroller.
  • 3. HOW TO INSTALL ICC AVR ver 7.5
  • 4. ICC AVR ver 7.5 is not a freeware and thus you have to purchase it.But 45 days trial versions are available on the net and they give almost the same features.Thus download the setup of the trial version from the site : http://www.imagecraft.com/Run the setup and install ICC AVR ver 7.5
  • 5. HOW TO USE ICC AVR ver 7.5
  • 25. Input Output PORTS• Four, 8 bit I/O ports- PORT A,B,C,D• All I/O ports pins are bidirectional and can beconfigured individually• Input pins can be configured to utilizeinternal pullups.• Data Direction Register , DDRn• Port Driver Register, PORTn• Port Pin Register, PINn
  • 26. Data Direction Register, DDRn• Determines the direction of individual pins ofports• If the bit of the DDR is set the corresponding pinof the port is configured as output pin• If the bit of the DDR is cleared thecorresponding pin of the port is configured asinput pin• DDRA = 0xF0;• 4 MSB pins of PORTA are output pins• 4 LSB pins of PORTA are input pins
  • 27. Port Pin Register, PINn• Reading the input pins of port is done byreading PIN register• Temp = PINA;• Read the PORTA input and store in temp variable
  • 28. Port Drive Register, PORTn• For pins configured as input(DDRn[x] = 0) microcontroller connects ainternal pull up register if thecorresponding bit of PORTn is set• If the PORTn bit is cleared, pin is Tristated• DDRA = 0x00;• PORTA = 0xF0
  • 29. Buzzer On / OFF• PORT B pin 7• Pin is configured as output• DDRB= 0x80;• To turn on the buzzer output high• PORTB = 0x80;• To turn off the buzzer output low• PORTB = 0x00;
  • 30. Buzzer Functionvoid Buzzer_ON(void){PORTB = 0x80;}void Buzzer_OFF(void){PORTB = PORTB & 0x7F;}
  • 31. LED DISPLAY8 bit LED display is connected to PORTD.To display any bit combination on the LED display, we use… PORTD=0xXX;
  • 32. CODE FOR LED DISPLAYvoid main(void){init_devices(); while(1) { PORTD=0xFF; }}
  • 33. Analog To Digital Converter• 10 bit resolution• 8 channels• PORTA(0 – 7)• Disable internal pull up• ADCH & ADCL – Data Register• ADMUX- Channel Select Register• ADCSR – Control & Status Register
  • 35. unsigned char ADC_conversion (unsigned char ADC_channel_number) { unsigned inti = 0; ADCH = 0x00;i = ADC_channel_number & 0x0F; // keeping the loweatnibbel ADMUX = i | 0x20; //upper nibbel of 0x20 indicates the result is left adjusted (8 bit ADC conversion) ADCSR |= 0x40; for (i = 1; i < 255; i++); //delay of 93.2 uSi = ADCH; return (i);}void main(void){ unsigned char I, value[3];; for(i=0;i<3;i++) { value[i]=ADC_conversion(i); }}
  • 36. HOW TO COMPILE AND BUILD YOUR CODE
  • 53. After you program your robot, it is ready to run the code written onto the microcontroller.So just power on the microcontroller and it will start the execution of the code.
  • 54. MOTION CONTROL AND LINE FOLLOWING
  • 55. PORT CONFIGURATIONPORTA is ADC port.3 white line sensors are connected to pin1, pin2, pin 3 of PORTA.PORTC is connected to the H-bridge.
  • 56. CODE FOR MOTION void delay(int time) {inti,j; for(i=0;i<time;i++) for(j=0;j<500;j++);}void backward(void) // subroutine for backward motion{ PORTC=0xB4; delay(100);}void right(void) // subroutine for right motion{ PORTC=0xB8; delay(100);}void left(void) // subroutine for left motion{ PORTC=0xD4; delay(100);}void forward(void) // subroutine for forward motion{ PORTC=0xD8; delay(100);} void stop(void) // subroutine for stop motion{ PORTC=0xFF; delay(100);}//void main(void){init_devices(); //insert your functional code here... forward(); delay(1000); left(); delay(100); forward(); delay(1000); right(); delay(100); backward(); delay(1000); stop(); delay(100);}
  • 57. CODE FOR LINE FOLLOWERunsigned intADC_conversion (unsigned intADC_channel_number) { unsigned inti = 0; ADCH = 0x00;i = ADC_channel_number & 0x0F; // keeping the loweatnibbel ADMUX = i | 0x20; ADCSR |= 0x40; for (i = 1; i < 255; i++); //delay of 93.2 uSi = ADCH; return (i);}void forward(void){ PORTC=0xD8;}void left(void){ PORTC=0xB8;}void right(void){ PORTC=0xD4;}void backward(void){ PORTC=0xB4;} //void main(void){unsigned char value[3];unsigned char i;init_devices(); while(1) { for(i=0;i<3;i++) { value[i]=ADC_conversion(i); } if (value[1] < 50) { forward(); } else { if(value[2] > 90) {left(); } else { if (value[0] > 90) {right(); }else { backward();}} } } }