Topics: Interrupt, Microcontroller, Embedded system Pages: 3 (772 words) Published: November 26, 2010
Paper II - Section : II Embedded Systems INDEX No 1 2 3 4 5 6 7 8 9 10 Toggle Port LED Simulate Binary Counter at Port Generate delay using TIMER_0 Stepper Motor (clockwise/Anticlockwise) Generating square wave at port pin Generating Triangular wave at port pin Sine wave generation using look-up table Microcontrollers communicating over a serial link Read switch-status from i/p port and display at o/p port Using Input Capture Pin (ICP), measure pulse width & display at o/p port Topic Date 6-9-2010 9-9-2010 17-9-2010 24-9-2010 8-10-2010 15-10-2010 15-10-2010 29-10-2010 22-11-2010 24-11-2010 Page 02 03 04 06 07 09 10 11 13 15 Sign

Practical – 01 Toggle Port LED Aim : Write a program in embedded C programming language to alternately ON/OFF LEDs connected to 2 different ports. Components Used: i)AT90S8535 Micro controller ii)LED‟S iii)Ground Code: #include #include void main(void) { DDRA = 0xff; PORTA = 0x00; DDRB = 0xff; PORTB = 0x00; while(1) { delay_ms(100); PORTA = 0x01; PORTB = 0x00; delay_ms(100); PORTA = 0x00; PORTB = 0x01; }; } Output:


Practical – 02 Simulate Binary Counter at Port Aim : Write a program using embedded C to simulate a binary counter. Components Used: i)AT90S8535 Micro controller ii)LED‟S iii)Ground Code: #include #include void main() { DDRA = 0xff; PORTA=0x00; while(1) { delay_ms(100); if(PORTA == 0x80) PORTA = 0x01; else PORTA += 1; } } Description: First statement a unsigned char variable (unsigned integers are used to increase the range of numbers the variable can hold) is initialized to 0x01 . port A has been set to this variable . „+‟ operator stands for bit increment operation . we are incrimenting the bit of led_status to one position of binary number when the one at lsb reaches to the msb (0x80) of the variable we reinitialize the variable to 0x01.The Delay given is of one milli second so the bit shifts after every one second(1000ms) . Output:

Mithibai College:-MSC...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Embedded System Design Essay
  • Definition of Embedded System Essay
  • Embedded Processor Market Size, Challenges & Trends Covered for 2018 Essay
  • Global Embedded Systems Industry 2014 to 2020 Market Estimate Essay
  • Intelligent Embedded Systems Essay
  • embedded system synopsis Essay
  • embedded web technology Essay
  • Essay on embedded market study

Become a StudyMode Member

Sign Up - It's Free