The data is stored in on chip rom org 250h mydata db

This preview shows page 6 - 11 out of 11 pages.

The data is stored in on –chip ROM.ORG 250HMYDATA:DB53,94,56,92,74,65,43,23,83
4. Modify the problem 3 to make the result in BCD.11Write a program to add BCD 197795H to 344548H and save the result inRAM memory locations starting at 40H.13 Show how to perform 77÷3 in 8051.15Write a program with three subroutines to (a) transfer the following datafrom on-chip ROM to RAM locations starting at 30H, (b) add them and savethe result in 70H, and (c) find the average of the data and store it in R7.
Chap 7 8051 Programming in C1.Indicate what data type you would use for each of the following variables:(a) the temperature(b) the number of days in a week( c) the number of days in a year(d) the number of months in a year(e) the counter to keep the number of people getting on a bus(f) the counter to keep the number of people going t a class(g) an address of 64K byte RAM space(h) the voltage(i) a string for a message to welcome people to a building7What is the difference between sbit and bit data types?8Write an 8051 C program to toggle all bits of P1 every 200ms.( a 12 MHz clock is assumed).12. Write an 8051 C program to count up P1 from 0-99 continuously.17. Write a C program that finds the number of zeros in an 8-bit data item.19 Write a program to convert the following series of packed BCD numbers toASCII. Assume that the packed BCD is located in data RAM.76H, 87H, 98H,43H20 Write a program to convert the following series of packed ASCII numbers topacked BCD. Assume that the packed ASCII is located in data RAM.“8767”22. Indicate what memory (embedded, data RAM, or code ROM space) youwould use for the following variables:(a) the temperature(b) the number of days in a week( c) the number of days in a year(d) the number of months in a year(e) the counter to keep the number of people getting on a bus(f) the counter to keep the number of people going t a class(g) an address of 64K byte RAM space(h) the voltage(i) a string for a message to welcome people to a building23. Discuss why the total size of your 8051 C variables should not exceed 100bytes.24. Why do we use the ROM code space for video game characters and shapes?25What is the drawback of using RAM data space for 8051 C variables?26What is the drawback of using ROM code space for 8051 C data?27 Write an 8051 C program to send your first and last names to P2. Use ROM
code space.
Chap 8 Single-bit Instructions and Programming24Which port of the 8051 does not have any alternate functionand can be used solely for I/O?25Write a program to get 8-bit data from P1 and send it to portsP0,P2, and P3.41 Analyze the six parts of line 1 of Figure 8-9.44. Verify the checksum byte for line 1 of Figure 8-9 and alsoverify that the information is not corrupted.
Chap 9 Counter/Timer Programming in the 80519Find the TMOD value for both Timer 0 and Timer 1, mode 2,software start/stop (gate=0), with the clock coming from the8051’s crystal.

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 11 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
cheung
Tags
address bus, Machine code, ASCII, Byte

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture