Submit Search
Upload
00 let us get started.2016
•
0 likes
•
181 views
Mohamed Fawzy
Follow
Introduction to micro-controller world
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 50
Download now
Download to read offline
Recommended
04 Interfacing LCD Displays.2016
04 Interfacing LCD Displays.2016
Mohamed Fawzy
01 GPIO||General Purpose Input Output.2016
01 GPIO||General Purpose Input Output.2016
Mohamed Fawzy
06 Interfacing Keypad 4x4.2016
06 Interfacing Keypad 4x4.2016
Mohamed Fawzy
05 EEPROM memory.2016
05 EEPROM memory.2016
Mohamed Fawzy
02 Interfacing High Power Devices.2016
02 Interfacing High Power Devices.2016
Mohamed Fawzy
Ins and Outs of GPIO Programming
Ins and Outs of GPIO Programming
ICS
Presentation
Presentation
Abhijit Das
MCS51 Training board Model CATC2016A
MCS51 Training board Model CATC2016A
Arkhom Jodtang
Recommended
04 Interfacing LCD Displays.2016
04 Interfacing LCD Displays.2016
Mohamed Fawzy
01 GPIO||General Purpose Input Output.2016
01 GPIO||General Purpose Input Output.2016
Mohamed Fawzy
06 Interfacing Keypad 4x4.2016
06 Interfacing Keypad 4x4.2016
Mohamed Fawzy
05 EEPROM memory.2016
05 EEPROM memory.2016
Mohamed Fawzy
02 Interfacing High Power Devices.2016
02 Interfacing High Power Devices.2016
Mohamed Fawzy
Ins and Outs of GPIO Programming
Ins and Outs of GPIO Programming
ICS
Presentation
Presentation
Abhijit Das
MCS51 Training board Model CATC2016A
MCS51 Training board Model CATC2016A
Arkhom Jodtang
Microprocessor Week 10: Applications
Microprocessor Week 10: Applications
Arkhom Jodtang
L13 interrupts-in-atmega328 p
L13 interrupts-in-atmega328 p
rsamurti
Atmega16
Atmega16
Thrived Kumar
Introduction to Arduino
Introduction to Arduino
Karim El-Rayes
131080111003 mci
131080111003 mci
jokersclown57
8051 microcontroller training (2) (sahil gupta 9068557926)
8051 microcontroller training (2) (sahil gupta 9068557926)
Sahil Gupta
Embedded system (Chapter )
Embedded system (Chapter )
Ikhwan_Fakrudin
Microcontroller 8051
Microcontroller 8051
Denish Vaniyawala
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programming
Ikhwan_Fakrudin
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
Calculator design with lcd using fpga
Calculator design with lcd using fpga
Hossam Hassan
Micro c lab2(led patterns)
Micro c lab2(led patterns)
Mashood
한컴MDS_TRACE32 제품 소개
한컴MDS_TRACE32 제품 소개
HANCOM MDS
Microcontroller Programming Assignment
Microcontroller Programming Assignment
babak danyal
L11 assembly-language-programming-of-atmega328 p
L11 assembly-language-programming-of-atmega328 p
rsamurti
Coursera 7DFDB74V7TJD
Coursera 7DFDB74V7TJD
mohamed ahmed
Smart real time embedded arduino based data acquisition system
Smart real time embedded arduino based data acquisition system
eSAT Journals
basic of embedded system
basic of embedded system
Dinesh35833
ARDUINO EMBEDDED SYSTEM
ARDUINO EMBEDDED SYSTEM
Vishal GARG
Embedded basics For beginners
Embedded basics For beginners
MyEducationHub
Introduction to Avr Microcontrollers
Introduction to Avr Microcontrollers
Mohamed Tarek
Basics of embedded system design
Basics of embedded system design
K Senthil Kumar
More Related Content
What's hot
Microprocessor Week 10: Applications
Microprocessor Week 10: Applications
Arkhom Jodtang
L13 interrupts-in-atmega328 p
L13 interrupts-in-atmega328 p
rsamurti
Atmega16
Atmega16
Thrived Kumar
Introduction to Arduino
Introduction to Arduino
Karim El-Rayes
131080111003 mci
131080111003 mci
jokersclown57
8051 microcontroller training (2) (sahil gupta 9068557926)
8051 microcontroller training (2) (sahil gupta 9068557926)
Sahil Gupta
Embedded system (Chapter )
Embedded system (Chapter )
Ikhwan_Fakrudin
Microcontroller 8051
Microcontroller 8051
Denish Vaniyawala
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programming
Ikhwan_Fakrudin
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
Calculator design with lcd using fpga
Calculator design with lcd using fpga
Hossam Hassan
Micro c lab2(led patterns)
Micro c lab2(led patterns)
Mashood
한컴MDS_TRACE32 제품 소개
한컴MDS_TRACE32 제품 소개
HANCOM MDS
Microcontroller Programming Assignment
Microcontroller Programming Assignment
babak danyal
L11 assembly-language-programming-of-atmega328 p
L11 assembly-language-programming-of-atmega328 p
rsamurti
What's hot
(15)
Microprocessor Week 10: Applications
Microprocessor Week 10: Applications
L13 interrupts-in-atmega328 p
L13 interrupts-in-atmega328 p
Atmega16
Atmega16
Introduction to Arduino
Introduction to Arduino
131080111003 mci
131080111003 mci
8051 microcontroller training (2) (sahil gupta 9068557926)
8051 microcontroller training (2) (sahil gupta 9068557926)
Embedded system (Chapter )
Embedded system (Chapter )
Microcontroller 8051
Microcontroller 8051
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programming
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Calculator design with lcd using fpga
Calculator design with lcd using fpga
Micro c lab2(led patterns)
Micro c lab2(led patterns)
한컴MDS_TRACE32 제품 소개
한컴MDS_TRACE32 제품 소개
Microcontroller Programming Assignment
Microcontroller Programming Assignment
L11 assembly-language-programming-of-atmega328 p
L11 assembly-language-programming-of-atmega328 p
Viewers also liked
Coursera 7DFDB74V7TJD
Coursera 7DFDB74V7TJD
mohamed ahmed
Smart real time embedded arduino based data acquisition system
Smart real time embedded arduino based data acquisition system
eSAT Journals
basic of embedded system
basic of embedded system
Dinesh35833
ARDUINO EMBEDDED SYSTEM
ARDUINO EMBEDDED SYSTEM
Vishal GARG
Embedded basics For beginners
Embedded basics For beginners
MyEducationHub
Introduction to Avr Microcontrollers
Introduction to Avr Microcontrollers
Mohamed Tarek
Basics of embedded system design
Basics of embedded system design
K Senthil Kumar
Serial Communication & Embedded System Interface
Serial Communication & Embedded System Interface
KUET
Embedded system design using arduino
Embedded system design using arduino
Santosh Verma
Arduino embedded systems and advanced robotics
Arduino embedded systems and advanced robotics
Shubham Bhattacharya
Introduction to Embedded Systems
Introduction to Embedded Systems
Mohamed Tarek
Viewers also liked
(11)
Coursera 7DFDB74V7TJD
Coursera 7DFDB74V7TJD
Smart real time embedded arduino based data acquisition system
Smart real time embedded arduino based data acquisition system
basic of embedded system
basic of embedded system
ARDUINO EMBEDDED SYSTEM
ARDUINO EMBEDDED SYSTEM
Embedded basics For beginners
Embedded basics For beginners
Introduction to Avr Microcontrollers
Introduction to Avr Microcontrollers
Basics of embedded system design
Basics of embedded system design
Serial Communication & Embedded System Interface
Serial Communication & Embedded System Interface
Embedded system design using arduino
Embedded system design using arduino
Arduino embedded systems and advanced robotics
Arduino embedded systems and advanced robotics
Introduction to Embedded Systems
Introduction to Embedded Systems
Similar to 00 let us get started.2016
C programming session10
C programming session10
Keroles karam khalil
Embedded C programming session10
Embedded C programming session10
Keroles karam khalil
Loader and Its types
Loader and Its types
Parth Dodiya
C programming session9 -
C programming session9 -
Keroles karam khalil
Embedded c
Embedded c
Nandan Desai
Complete c programming presentation
Complete c programming presentation
nadim akber
1.Introduction to AVR.pdf
1.Introduction to AVR.pdf
MostafaKhaled78
2 8085 microprocessor
2 8085 microprocessor
aditidey19
Introduction to assembler_programming_boston_2
Introduction to assembler_programming_boston_2
satyabrataDash18
Embedded c program and programming structure for beginners
Embedded c program and programming structure for beginners
Kamesh Mtec
rom-140919103032-phpapp02.pptx
rom-140919103032-phpapp02.pptx
RAJCHATTERJEE24
UNIT I- CPLD & FPGA ARCHITECTURE & APPLICATIONS
UNIT I- CPLD & FPGA ARCHITECTURE & APPLICATIONS
Dr.YNM
ROM(Read Only Memory )
ROM(Read Only Memory )
rohitladdu
Rom (read only memory)
Rom (read only memory)
Hemin Patel
Memories in digital electronics
Memories in digital electronics
SijuGeorge10
Unit-2.pptx
Unit-2.pptx
sidhantkulkarni1
interview questions.docx
interview questions.docx
SeoTechnoscripts
Embedded C.pptx
Embedded C.pptx
MusthafaKadersha
Read Only Memory
Read Only Memory
rohitladdu
Compiler design notes phases of compiler
Compiler design notes phases of compiler
ovidlivi91
Similar to 00 let us get started.2016
(20)
C programming session10
C programming session10
Embedded C programming session10
Embedded C programming session10
Loader and Its types
Loader and Its types
C programming session9 -
C programming session9 -
Embedded c
Embedded c
Complete c programming presentation
Complete c programming presentation
1.Introduction to AVR.pdf
1.Introduction to AVR.pdf
2 8085 microprocessor
2 8085 microprocessor
Introduction to assembler_programming_boston_2
Introduction to assembler_programming_boston_2
Embedded c program and programming structure for beginners
Embedded c program and programming structure for beginners
rom-140919103032-phpapp02.pptx
rom-140919103032-phpapp02.pptx
UNIT I- CPLD & FPGA ARCHITECTURE & APPLICATIONS
UNIT I- CPLD & FPGA ARCHITECTURE & APPLICATIONS
ROM(Read Only Memory )
ROM(Read Only Memory )
Rom (read only memory)
Rom (read only memory)
Memories in digital electronics
Memories in digital electronics
Unit-2.pptx
Unit-2.pptx
interview questions.docx
interview questions.docx
Embedded C.pptx
Embedded C.pptx
Read Only Memory
Read Only Memory
Compiler design notes phases of compiler
Compiler design notes phases of compiler
More from Mohamed Fawzy
07 Analogue to Digital Converter(ADC).2016
07 Analogue to Digital Converter(ADC).2016
Mohamed Fawzy
أزاى تروح فى داهيه !!!
أزاى تروح فى داهيه !!!
Mohamed Fawzy
Ce from a to z
Ce from a to z
Mohamed Fawzy
Taqa
Taqa
Mohamed Fawzy
C programming day#2.
C programming day#2.
Mohamed Fawzy
C programming day#3.
C programming day#3.
Mohamed Fawzy
C programming day#1
C programming day#1
Mohamed Fawzy
More from Mohamed Fawzy
(7)
07 Analogue to Digital Converter(ADC).2016
07 Analogue to Digital Converter(ADC).2016
أزاى تروح فى داهيه !!!
أزاى تروح فى داهيه !!!
Ce from a to z
Ce from a to z
Taqa
Taqa
C programming day#2.
C programming day#2.
C programming day#3.
C programming day#3.
C programming day#1
C programming day#1
Recently uploaded
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
Tsuyoshi Horigome
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
Soham Mondal
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
purnimasatapathy1234
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
ranjana rawat
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
null - The Open Security Community
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
KurinjimalarL3
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur High Profile
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
humanexperienceaaa
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
slot gacor bisa pakai pulsa
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
upamatechverse
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Call Girls in Nagpur High Profile
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
AbhinavSharma374939
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
ranjana rawat
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
GDSCAESB
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
120cr0395
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
rakeshbaidya232001
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
RajkumarAkumalla
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Recently uploaded
(20)
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
00 let us get started.2016
1.
1 00-Let’s get started By
: Mohamed Fawzy Programming AVR Microcontrollers © Mohamed F.A.B 2015
2.
Lecture Notes: 2 o Set
Your Phone To Vibration Mode. o Ask any time. o During labs, Feel Free To Check Any Materials or Internet. o Slides are self content. o Feel Free To Share This Materials With Your Friends. o Work Hard For Achieving Most Benefits Of This Course. © Mohamed F.A.B 2015
3.
3 Don't Forget !!!! ©
Mohamed F.A.B 2015 Any Expert Was Once A Beginner
4.
4 Agenda. Lesson (1): Introduction to
micro-controller World. Lesson (2): Quick revision for C programming. Lesson (3): Installing Our Working Tools. © Mohamed F.A.B 2015
5.
5 Lesson#1 Lesson (1): Introduction to
micro-controller World. © Mohamed F.A.B 2015
6.
6 Microcontroller. o It is
a small computer which can control any thing around the world . o It basically consists of Microprocessor, Memory(RAM, ROM, EEPROM), I/O lines and some other peripherals ……….,etc. DIP Package SMD Package © Mohamed F.A.B 2015
7.
7 Microcontrollers Vendors. © Mohamed
F.A.B 2015
8.
8 Microcontroller Applications. © Mohamed
F.A.B 2015
9.
9 Microcontroller Vs. Microprocessor. ©
Mohamed F.A.B 2015 Microprocessor is a subsystem of Microcontroller system.
10.
10 Internal Components of
MC. © Mohamed F.A.B 2015
11.
11 CPU (Central Processing
Unit). © Mohamed F.A.B 2015 o Instruction Decoder :is a part of the electronics which recognizes program instructions and runs other circuits on the basis of that. o Arithmetical Logical Unit (ALU): performs all mathematical and logical operations upon data. o Accumulator: is a SFR closely related to the operation of the ALU. It is a kind of working desk used for storing all data upon which some operation should be performed (addition, shift/move etc.). o It is considered the brain of the microcontrollers. o It is responsible for executing arithmetic and logic operations.
12.
12 Memory. © Mohamed F.A.B
2015 o Memory is part of the microcontroller used for data storage. o Each memory address corresponds to one memory location. o Types of memory within the microcontroller: o SFR registers. o RAM (Random Access Memory). o ROM (Read Only Memory). o EEPROM (Electrical Erasable ROM).
13.
13 Memory. (cont'd) © Mohamed
F.A.B 2015 o Register: A register or a memory cell is an electronic circuit which can memorize the state of one byte. o Byte.
14.
14 SFR Registers. © Mohamed
F.A.B 2015 o Every microcontroller has a number of registers whose function is predetermined by the manufacturer.
15.
15 ROM. © Mohamed F.A.B
2015 o ROM (Read Only Memory) is used to permanently save the program being executed. o There are several types of ROM: o Masked ROM. Program is loaded into the chip by the manufacturer. In case of large scale manufacture, the price is very low. Forget it... o One Time Programmable ROM. you can download a program into this memory, but the process of program downloading is a “one-way ticket” meaning that it can be done only once. o UV Erasable Programmable ROM. It enables the surface of the silicon chip inside to be lit by an UV lamp, which effectively erases and program from the ROM.
16.
16 ROM. (cont'd) © Mohamed
F.A.B 2015 o Flash memory: Since the contents of this memory can be written and cleared practically an unlimited number of times, the microcontrollers with Flash ROM are ideal for learning, experimentation and small-scale manufacture.
17.
17 RAM. © Mohamed F.A.B
2015 o It is used for temporary storing data and intermediate results created and used during the operation of the microcontroller. o Once the power supply is off the contents of RAM (Random Access Memory) is cleared.
18.
18 EEPROM. © Mohamed F.A.B
2015 o The contents of the EEPROM may be changed during operation (similar to RAM), but remains permanently saved even upon the power supply goes off (similar to ROM).
19.
19 Internal Architecture. © Mohamed
F.A.B 2015 o All upgraded microcontrollers use one of two basic design models. o Briefly, they are two different ways of data exchange between CPU and memory. o von-Neumann Architecture. Only one bus for reading instructions and data at the same time. o Harvard Architecture. Two buses, one for Instructions and another for data.
20.
20 Input/output Ports. © Mohamed
F.A.B 2015 o In order to make the microcontroller useful, it has to be connected to additional electronics, i.e. peripherals. Each microcontroller has one or more registers (called a “port”) connected to the microcontroller pins.
21.
21 Programming MC. © Mohamed
F.A.B 2015 Machine Language. The microcontroller executes the program loaded in its Flash memory. This is the so called executable code comprised of seemingly meaningless sequence of zeros and ones.
22.
22 Programming MC. cont'd ©
Mohamed F.A.B 2015 Assembly Language.
23.
23 Programming MC. cont'd ©
Mohamed F.A.B 2015 C Language. o C Programming is considered a high level language.
24.
24 SW Tools. © Mohamed
F.A.B 2015 o Compiler: It Takes C-Code Then Convert It Into Machine code. o Assembler : It Takes Assembly Code Then Convert It To Machine Code. C-Code File.c Assembly-Code File.asm Machine-Code File.hex Dis-assembling Assembler CodeVisionAVR contains all previous tools and other useful tools.
25.
25 HW Tools. © Mohamed
F.A.B 2015 o PROGRAMMER or FLASHER : It is a hardware device used to burn or write code To MC flash memory.
26.
26 Summary. © Mohamed F.A.B
2015
27.
27 Break. © Mohamed F.A.B
2015
28.
28 Lesson#2 © Mohamed F.A.B
2015 Lesson (2): Quick revision in C-Programming language.
29.
29 C-Program Structure. © Mohamed
F.A.B 2015 Information about the project Main Function
30.
30 Comments In C
Programming. © Mohamed F.A.B 2015 o Comments is some texts which ignored by the compiler. o It used for documentation. There are two types of comments in C programming: o One-line comment. EX: //comment o Multi-line comment. EX: /* line1 line2 …….. */
31.
31 Variables. © Mohamed F.A.B
2015 o Any number changing its value during program operation is called a variable. Declaring Variables: o Variable name can include any of the alphabetical characters A- Z (a-z), the digits 0-9 and the underscore character '_'. o The compiler is case sensitive and differentiates between capital and small letters. o Function and variable names usually contain lower case characters, while constant names contain uppercase characters. (it is recommended not must). o Variable names must not start with a digit. o Some of the names cannot be used as variable names as already being used by the compiler itself.(key words).
32.
32 Data-Types. © Mohamed F.A.B
2015 o You should choose the best suitable data-type, since MC RAM is limited. o By adding prefix (qualificator) to any data type, the range of its possible values changes as well as the number of memory bytes needed. NOTES
33.
33 Data type Modifiers. ©
Mohamed F.A.B 2015 NOTE o By default any declared variable is signed.
34.
34 Operators. © Mohamed F.A.B
2015 o Arithmetic Operators: These are used to perform mathematical calculations like addition, subtraction, multiplication, division and modulus.
35.
35 Operators. cont’d © Mohamed
F.A.B 2015 o Relational Operators: These operators are used to compare the value of two variables. NOTE The result here will be true or false (0 or 1).
36.
36 Operators. cont’d © Mohamed
F.A.B 2015 o Logical Operators: These operators are used to perform logical operations on the given two variables. NOTE The result here will be true or false (0 or 1).
37.
37 Operators. cont’d © Mohamed
F.A.B 2015 o Bitwise Operators: These operators are used to perform bit operations on given two variables.
38.
38 Arrays. © Mohamed F.A.B
2015 o Array is the simplest and most commonly used structured type. o A variable of array type is actually an array of objects of the same type. o These objects represent elements of an array and are identified by their position in array (index). o An array consists of a contiguous region of storage exactly large enough to hold all of its elements. EX: char arr_1[5]; //declare array of 5 character variables. //here you must define array size. int arr_2[]={1,2,3,4,5}; //declare array of 5 integer variables and give initialization values. //here, you don't need to define array size. <data type> <array name> [array size] = {e1_val,e2_val,….};
39.
39 If-Statement. © Mohamed F.A.B
2015 if (condition) one statement; 0False!0True Condition if (condition) { Multiple statement; }if (condition) { statement; statement; ……………………… } else { statement; statement; ……………………… } if (condition) { statement; ……………………… } else if (condition) { statement; ……………………… } else { statement; …………………… }
40.
40 Switch-case. © Mohamed F.A.B
2015 Example:Syntax:
41.
41 For Loop. © Mohamed
F.A.B 2015 for (initial_value ; condition ; update_value) { statements; statements; ………………………… } ③ ① ② ④ True False Interactive Question: What is the output of this program? for (x=0;5;x++) { printf(“M n”); } Basic Syntax: o Step ① only executed one time. o Use {} for more than one statement. o for (;;) // infinite loop NOTE
42.
42 While Loop. © Mohamed
F.A.B 2015 while (condition) { statements; statements; ……………………… } Basic Syntax: o Use {} for more than one statement. o while (1) // infinite loop NOTE
43.
43 Do ….. While
Loop. © Mohamed F.A.B 2015 do { statements; statements; ……………………… } while (condition) Basic Syntax: o Execute at least one time. o Use {} for more than one statement. o Do …… while (1) // infinite loop NOTE
44.
44 Label Loop. © Mohamed
F.A.B 2015 Loop: //statement ... goto loop; Don't use this method in your code because it make your code like spaghetti. NOTE
45.
45 Control Loop. © Mohamed
F.A.B 2015 break Continue o Exit from the nearest loop. Interactive Question: What is the output of this program? for (i=0;i<5;i++) { if (i == 3) break; printf(“%d n”,i); } o Skip one or more iteration. Interactive Question: What is the output of this program? for (i=0;i<5;i++) { if (i == 3) continue; printf(“%d n”,i); }
46.
46 Lesson#3 © Mohamed F.A.B
2015 Lesson (3): Installing Our Working Tools.
47.
47 Codevision AVR. © Mohamed
F.A.B 2015
48.
48 Protuse. © Mohamed F.A.B
2015
49.
49 Questions: © Mohamed F.A.B
2015
50.
Thank You All
50 mo7amed.fawzy33@gmail.com 01006032792 fawzy.fab@gmail.com © Mohamed F.A.B 2015
Download now