Type the program and save it.to compile the files first you need to add files in your source for doing that right click on the source file and then Page 10 12 click on add existing source file 11.LCD,KEYPAD 2. ADC,I2C,SERIAL,PWM ATMEGA DEVELOPMENT BOARD 2 ATMEGA 1632 MICROCONTROLLER Page 1 3 Table of Contents OVERVIEW:.PORTS:. 3 PIN DESCRIPTION:.WRITING THE CODE AVR STUDIO.
Atmega16 is based on enhanced RISC architecture with 131 powerful instructions. PA0 - PA7 (PORTA) PB0 - PB7 (PORTB) PC0 - PC7 (PORTC) PD0 - PD7 (PORTD) These are additional function that pin can perform other than IO. Some of them are. ADC (ADC0 - ADC7 on PORTA) UART (Rx,Tx on PORTD) TIMERS (OC0 - OC2) SPI (MISO, MOSI, SCK on PORTB) External Interrupts (INT0 - INT2) Page 3 5 Page 4 6 PIN DESCRIPTION: VCC: Digital supply voltage. V) GND: Ground. (0 V) Note there are 2 ground Pins. Port A (PA7 - PA0) Port A serves as the analog inputs to the AD Converter. Port A also serves as an 8-bit bi-directional IO port, if the AD Converter is not used. When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port B (PB7 - PB0) Port B is an 8-bit bi-directional IO port with internal pull-up resistors (selected for each bit). Port B also serves the functions of various special features of the ATmega16 as listed on page 58 of datasheet. Port C (PC7 - PC0) Port C is an 8-bit bi-directional IO port with internal pull-up resistors (selected for each bit). Port C also serves the functions of the JTAG interface and other special features of the ATmega16 as listed on page 61 of datasheet. If the JTAG interface is enabled, the pull-up resistors on pins PC5 (TDI), PC3 (TMS) and PC2 (TCK) will be activated even if a reset occurs. Port D (PD7 - PD0) Port D is an 8-bit bi-directional IO port with internal pull-up resistors (selected for each bit). Port D also serves the functions of various special features of the ATmega16 as listed on page 63 of datasheet. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running. XTAL1: External oscillator pin 1 XTAL2: External oscillator pin 2 AVCC: AVCC is the supply voltage pin for Port A and the AD Converter. If the ADC is used, it should be connected to VCC through a low-pass filter. Select AVR GCC as we would be doing program in c and enter the project name. Page 7 9 4. Add your project name. Avr Osp Ii Software Serial And ItHere I have given my project name as serial and it will automatically create your initial file name in.c format 5. Page 8 10 6. Avr Osp Ii Software Simulator In DebugSelect AVR simulator in debug platform and in the Device select the Device your using as here I am using ATmega 16 i have selected that.(for Atmega 32 select Atmega 32). Page 9 11 8. This is the default window you will see after you click on finish and project name called serial will get open 9.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |