Download presentation
Presentation is loading. Please wait.
Published byJeremy Burns Modified over 9 years ago
1
ROBONICS’ 15 Powered By:
2
An embedded system is some combination of computer hardware and software, either fixed in capability or programmable, that is specifically designed for a particular function. EMBEDDED SYSTEM
3
APPLICATIONS Aerospace Navigation systems, automatic landing systems, flight attitude controls, engine controls, space exploration (e.g.. The mars pathfinder)
4
APPLICATIONS Automotive Fuel injection control, passenger environmental controls, anti-locking braking systems, air bag controls, GPS mapping.
5
APPLICATIONS Communications Satellites, network routers, switches, hubs
6
APPLICATIONS Medical CT, One touch glucose meter, almost all medical facility.
7
APPLICATIONS Personal Pagers, cell phones, video games, I-pod, MP3 players
8
APPLICATIONS Home Dishwashers, microwave ovens, VCR’s, DVD, televisions, stereos, fire/security alarm systems, lawn sprinkler controls, thermostats, digital cameras, clock radios, cell phones
9
Features/Components Central Processing Unit and Software Memory: ROM, RAM, EEPROM, Flash Input: Buttons, knobs, probes, sensors. Output: LCD Display, SSD, Matrix Display
10
MICROCONTROLLER A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications. What Wikipedia says……
11
Microcontrollers are programmable single chip computers specifically designed to: Read input devices, such as buttons and sensors Process data or information Control devices, such as lights, displays, motors and speakers Have on-chip Peripherals Formal Definition
12
Different Microcontrollers Intel Motorolla Microchip Atmel STMicroelectronics Texas Instruments NXP Toshiba Freecscale
13
ATmega Atmel Microcontrollers ATtiny ATxmega o Atmega 8 o Atmega 16 o Atmega 32 o Atmega 328 o Atmega 644 etc
14
ATMEGA 16 : AN OVERVIEW 8-bit Micro-controller 40-pin DIP 32 Programmable I/O Lines Operating Voltages 2.7 - 5.5V Speed Grades 0 - 8 MHz 16K Bytes of In-System Self-programmable Flash program memory 512 Bytes EEPROM Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and 8- channel, 10-bit ADC Programmable Serial USART Master/Slave SPI Serial Interface I2C interface
15
Pin Diagram
16
Architecture
17
Simplified Diagram
18
Personal Computer Microcontroller uP RAM HDD Clock Ports (Serial/USB) Ports (Parallel) Mic /Headphone Jack (ADC/ DAC) Power Supply Unit (SMPS) Reset Button Mother-board uP SRAM EEPROM & Flash Memory Clock Unit SPI / UART Controllers Digital I/O Ports ADC Power Supply Unit Reset Pin IC
19
MICROCONTROLLER PROGRAMMING Machine Language Programming Assembly Language Programming High Level Language
20
Machine Language Programming Code in binary instructions form that is directly executed by the device.
21
Assembly Language Programming Assembler Code using keywords that are easy to understand, use a software to convert keywords into binary instructions.
22
High Level Programming Compiler & Linker OS Code in symbolic form, use a software to break symbolic instructions into actual instructions of uC
23
We will use the High Level programming language for driving and exploiting the capabilities of our microcontroller.
24
WinAVR Cross-Compiler & linker PC / Laptop Target System (Atmega R&D Board) OUR PROGRAMMING ENVIRONMENT
25
PORT PROGRAMMIMG Normal C program int x; float y; x= 10; y= 8.97; Program for Ports DDRA = 0b11111111 or 0xFF // o/p DDRC = 0b11111111 or 0xFF // o/p PORTA = 27; // decimal PORTC= 0b11010110; // binary DDRx defines whether the port will act as input port or o/p port. Just as ‘int’ declares a variable as integer type. It does not assign any value to it. PORTx assigns the value to be output. If DDRx=0 i.e port is defined as input port, PORTx will store the value but will not o/p it.
26
More Examples PORTA=0x5A ; PORTA=0b01011010; PORTA=5; DDRA=0xFF; DDRA=0b11110000; // pins A7-A4 as o/p & A3-A0 as i/p You can even address individual pins of any Port DDRA.3= 1 ; // Only Pin 3 of Port A (A4) is configured as o/p pin, rest untouched PORTA.0=1; // pin 0 of Port A outputs 1, rest retain there previous values
27
Taking Input To take Digital i/p from external world first configure the port as i/p port using DDRx=0 Use PINx to read the digital value. x = PINA // read 8 bit integer value from Port A. 0 < x < 255 y= PINB x, y must be defined as unsigned integers in ur C program. Individual pins can be read in the same way. x= PINA.2 // as the individual pins are read n the value is digital, therefore x can either be 0 or 1 y= PINC.6
28
CHOCOLATE QUESTION Write a program to o/p 33 (hex) on PortD and read pins 2 and 7 of Port A
29
#include void main( ) { unsigned int x,y; DDRD=0xFF; // all pins o/p DDRA=0b01111011; // pin 7 & 2 i/p rest immaterial PORTD=0x33; x=PINA.2; y=PINA.7; } Solution
30
Creating the programming environment in WinAVR
31
Create a folder ‘Demo’ on desktop
32
Go to start Menu. Select WinAVR and click on Mfile
33
Mfile window will appear Go to ‘File’ and click on ‘Save As’
34
Save the mfile in the folder ‘Demo’ created on desktop. Name of the file should be ‘Makefile’.
35
Go to start Menu again. Select WinAVR and click on ‘Programmers notepad ‘
36
Programmers notepad window will appear
37
Go to File menu and click on ‘Save As’.
38
Save the file naming it as ‘main.c’ in the Demo folder created on desktop.
39
Go to ‘Programmers Notepad’ again and click on ‘Open’
40
Select the ‘Makefile’ and open it.
41
We have to make certain changes in the Makefile. MCU= atmega16
42
We have to make certain changes in the Makefile. F_CPU=8000000 TARGET= main
43
We have to make certain changes in the Makefile. AVRDUDE_PROGRAMMER = usbasp AVRDUDE_PORT =usb001
44
Include the basic header files and create the main function.
45
Go to ‘Tools’ menu and click on ‘Make All’. Check if there is any error or not at output window
46
Go to ‘Tools’ menu and click on ‘Program’ in order to burn your code in the microcontroller
47
RESEARCH & DEVELOPMENT (R&D) BOARDS R & D Boards are used for the rapid prototyping of the Embedded Systems
48
Serial Port ADC Port LCD Port +5V GND Motor Port Motor Driver Supply IC 7805 Reset Button
49
LCD Port ADC Port Motor Port Power Button IC 7805 Reset Button Adapter Buzzer
50
LED BLINKING HELLO! TO EMBEDDED WORLD
51
+ - GND + V Longer leg is positive Terminal Light Emitting Diode A light emitting diode is essentially a PN junction that emits a monochromatic light when operated in forward bias
52
LED connection to Atmega
53
A program to make a blinking pattern #include void main( ) { DDRB=0xFF; // all pins o/p While (1) { PORTB=0xFF; // all LEDs ON delay_ms(500); PORTB=0x00; // all LEDs OFF delay_ms(500); } Complete Code!!
54
LIQUID CRYSTAL DISPLAY LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits.
55
PIN DIAGRAM
56
PIN DESCRIPTION
57
Two modes are there in LCD. 8 BIT MODE: In this mode of operation of LCD, data flows on 8 bit data bus. 4BIT MODE: In this mode of operation of LCD, data flows on 4 bit data bus. MODES OF LCD
58
LCD DEMO PRINT YOUR NAME ON LCD!!
59
Contact Us: www.amuroboclub.in www.amu.ac.in/rclub.jsp amuroboclub@gmail.com fb.com/amuroboculb
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.