Square Wave Forms-Control of Embedded Systems-Assignment, Exercises of Embedded Control Systems

This assignment s for Embedded Control Systems course. It was assigned by Prof. Mahavir Gupta at Jaypee University of Engineering and Technology. It includes: Microprocessor, Embadded, Design, Generate, Square, Prescaler, Delay, System, Program, Value, Swtic, Monitor

Typology: Exercises

2011/2012

Uploaded on 08/03/2012

gauravv
gauravv 🇮🇳

3.8

(4)

42 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Assignment No.2 (Fall 2010)
Microprocessor Based Embedded System Design
Section A and B
Due Date: 24/10/2010 Student’s Name: _____________
Max Marks: 100 Roll No. : _____________
Question#1: Write a C program to generate a square wave form with the time period of
2.5secs on pin PORTA.0 with the XTAL = 10MHz.
Question#2: Assume that XTAL = 16MHz. Find the TMR3H and TMR3L value needed to
generate a time delay of 5msec. Use the highest prescaler available.
Question#3: A switch is connected to pin PORTB.0. Write a C program to monitor SW
and create the following frequencies on PORTB.1.
SW = 0: 1KHz
SW = 1: 1.2KHz
Use timer 0 for both. FOSC = 10MHz.
Question#4: Program Timer1 in C to be an event counter. Use 16-bit mode and display
the binary count on PORTB and PORTC continuously. Set the initial count
to 10,000.
Question#5: Write a C program to generate a square wave form with the time delay of
30msec on pin PORTB.7. Assume that XTAL = 18MHz.
docsity.com

Partial preview of the text

Download Square Wave Forms-Control of Embedded Systems-Assignment and more Exercises Embedded Control Systems in PDF only on Docsity!

Assignment No.2 (Fall 2010)

Microprocessor Based Embedded System Design

Section A and B

Due Date: 24/10/2010 Student’s Name: _____________ Max Marks: 100 Roll No. : _____________

Question#1: Write a C program to generate a square wave form with the time period of 2.5secs on pin PORTA.0 with the XTAL = 10MHz.

Question#2: Assume that XTAL = 16MHz. Find the TMR3H and TMR3L value needed to generate a time delay of 5msec. Use the highest prescaler available.

Question#3: A switch is connected to pin PORTB.0. Write a C program to monitor SW and create the following frequencies on PORTB.1. SW = 0: 1KHz SW = 1: 1.2KHz Use timer 0 for both. FOSC = 10MHz.

Question#4: Program Timer1 in C to be an event counter. Use 16-bit mode and display the binary count on PORTB and PORTC continuously. Set the initial count to 10,000.

Question#5: Write a C program to generate a square wave form with the time delay of 30msec on pin PORTB.7. Assume that XTAL = 18MHz.

docsity.com