You are on page 1of 3

MPI LAB

LAB 1
Introduction to Proteus, Atmel Studio & Atmega 32

Name : Burhan Ahmed Satti


Enrollment No. : 01-134172-065
Class : BSCS 4-A
Subject : MPI Lab
Lab Assistant : Muhammad Atif

Objectives
•Learning basics of Proteus
•Introduction to Atmega 32 processor
•Learning basics of Atmel studio

Tools Used
•Proteus 8.0
•Atmel Studio 7.0
BSCS 4-A Burhan Ahmed Satti 01-134172-065

Task No. 1.1


Program the Atmega 32 processor on Proteus, such that it takes input from port a and gives the
same output on port b, without any modification.
Solution
/**
* \file
*
* \brief Empty user application template
*
*/

/**
* \mainpage User Application template doxygen documentation
*
* \par Empty user application template
*
* Bare minimum empty user application template
*
* \par Content
*
* -# Include the ASF header files (through asf.h)
* -# "Insert system clock initialization code here" comment
* -# Minimal main function that starts with a call to board_init()
* -# "Insert application code here" comment
*
*/

/*
* Include header files for all drivers that have been imported from
* Atmel Software Framework (ASF).
*/
/*
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
*/
#include <asf.h>

int main (void)


{
/* Insert system clock initialization code here (sysclk_init()). */

board_init();

/* Insert application code here, after the board has been initialized. */

char a;
DDRA = 0x00;
DDRB = 0xff;
PORTB = 0x00;

while(1)
{
a = PINA;
PORTB = a;
}
return 1;
}

HCI Lab Page 2 of 3


BSCS 4-A Burhan Ahmed Satti 01-134172-065

Result

Conclusion
This processor shows the input on port A to port B.

HCI Lab Page 3 of 3

You might also like