Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

VI XỬ LÝ Homework 6 new 2012 04 28
MIỄN PHÍ
Số trang
1
Kích thước
29.1 KB
Định dạng
PDF
Lượt xem
1538

VI XỬ LÝ Homework 6 new 2012 04 28

Nội dung xem thử

Mô tả chi tiết

Microprocessing Systems

Homework 6 (updated on April 28, 2012)

1. Problem 20 Chapter 3 Textbook MacKenzie

2. There are two 16-bit numbers x and y: x is stored at location 2000H and 2001H of

external RAM, y is stored at location 2002H and 2003H of external RAM (using little

endian). Write a program that compare x and y. if x > y then create F0 = 1, otherwise F0

= 0

3. Write a subroutine named ABSOLUTE that checks data stored in location 32H of

internal RAM, if they are negative numbers, change to positive numbers.

4. Write a program that receives continuously data from Port 1. If data are ASCII codes

of numbers then writes data to external RAM at address starting from 3300H. Hint:

ASCII codes of ‘0’, ‘1’, …, ‘9’ are 30H, 31H, …, 39H, respectively.

5. A string of signed 8-bit numbers is in internal RAM at address starting from 20H. The

last number of this string is -1. Write a program that sends this string to Port 0.

6. Use only Timer to create two square waves on P1.0 and P1.1 which are given in the

following diagram. Write the program in Keil and build the hex file, and then use Proteus

ISIS (use the file Blinky.dsn) to simulate the result (use the oscilloscope to see the

waveforms).

7. One square wave f = 10 Hz is connected to pin T1 of the 8051. Write a program using

Counter 1 to increment the content of location 40H of internal RAM after every 1 minute.

At the beginning, the content of location 40H is zero. Hint: count the number of pulses at

pin T1 in order to determine the duration of 1 minute.

25ms 100 ms 100 ms

100 ms 100 ms

P1.0

P1.1

Tải ngay đi em, còn do dự, trời tối mất!