Timer 2 - It is also an 8-bit timer and pin no 21 (OC2) is used for this. Timer 1 - It is 16 bit timer, It has two types OC1A(8-bit) at pin no 19 and OC1B(8-bit) at pin no 18. Timers in Atmega16Atmega 16 has following timers:- Timer 0 - It is an 8-bit timer and for this pin no. In this situation timercan issue an interrupt and we must write an InterruptService Routine (ISR) to handle the event. ithas counted up to its maximum value (255 for 8 BITtimers) and rolled back to 0. As we know a timer is an 8 bit register that keeps onincreasing its value, so one of the basic conditions isthe situation when timer register OVERFLOWS i.e. Since Timer works independently of CPU it can beused to measure time accurately. I/O functions RegisterInput Output functions are set by Three Registers foreach PORT.DDRX > Sets whether a pin is Input or Output ofPort X.PORTX > Sets the Output Value of Port X.PINX > Reads the Value of Port X.
It works on computers with Windows platform that isWindows XP & Vista.
We used CVAVR (Code VisionAVR) It has limitation of code size. First of all we need an easy IDE(IntegratedDevelopmentEnvironment)fordeveloping code. Code Vision AVR (CVAVR) Atmel Microcontrollers are very famous as they arevery easy to use.
Serial Programmers Circuit (Hardware) 11.
hex file on your computer) Hardware (to connect microcontroller Hardware depends on the communication port you are using onthe computer (Serial, Parallel or USB).There are 2 good software which support this hardware and cancommunicate with micro controller using this circuit. ProgrammingProgrammer basically consists of two parts: Software (to open. Features of ATMEGA16 It is a 40 pin Ic Advanced RISC Architecture 16K Bytes of InSystem SelfProgrammable Flash512 Bytes EEPROM1K Byte Internal SRAM32 Programmable I/O LinesInSystem Programming by Onchip Boot Program 9. Features of Modern Microcontrollers Builtin Monitor Program Builtin Program Memory Interrupts Analog I/O Serial I/O Facility to Interface External Memory Timers 7. Sometimesanalog input/output interface makes a part of microcontrollercircuit of mixed mode (both analog and digital nature).Types: (a) RISC microcontroller (b) CISC microcontroller we have used ATmega16 in training 6. Microcontroller A Microcontroller is a programmable digital processor withnecessaryperipherals.Both microcontrollers andmicroprocessors are complex sequential digital circuits meant tocarry out job according to the program / instructions. Applications of embedded system Pen drives Hard disk Mouse Calculators, electronics welding machine Cell phones Security system Alarm system Digital camera Environment monitoring systems 5.
Real time embedded system(a) Soft real time embedded system(b) Hard real time embedded system2. Embedded SystemsA embedded system is a microprocessoror microcontroller based electronic deviceused for specific task.It is designed to perform operationswhich minimize (or even completelyavoid) need of human control. Seema Sharma (co-guide) Subhash choudharyVivek kr. Embedded Systems & Robotics BasicsSubmitted to :Submitted by:Mr. #*/ #include #include "remote.h" #include "lcd. Copyright Avinash Gupta 2008 Web: Please give credit or reference to if you use this in your projects and find it useful. Sample Code /*# Demo program for testing the IR Remote control libraries. Will just wait for keypress and then display its code. To make every thing more clear I am giving the complete sample program which If you pass 0 the function returns immediately if no key is pressed it returnsĪ special constant RC_NONE which is defined as 255 in the header file. Only if a key is pressed and return its keycode. Then it wait till a key is pressed on the remote control. When you pass 1 the function checks the queue for command and if there none The GetRemoteCmd takes one argument which can be either 0 or 1. Simply run this example on MCU and press keys the key code will be displayed You canĬall the function GetRemoteCmd() to read from the buffer. Remote and store them in a circular FIFO(first in first out queue). Once initialized the remote subsystem automatically receives command sent by In your main() function initialize Remote Subsystem by callingĪnd your done with initialization. In your main C source file include the following files Names in the source section of the makefile along with your main cįile (which has same name as your project and has the main function). If instead of AVR Studio you use Makefiles then add all the source files