Lab 1
OBJECTIVE:
➢ BCD and ASCII Conversion using C program.
REFERENCE:
➢ Mazidi and McKinlay, “The 8051 Microcontroller ……,” Chapter 7
MATERIALS:
➢ MDE 8051 Trainer
➢ 8051 Keil C Compiler
ACTIVITY 1
Write a program to get a byte of packed BCD from DIP switches connected to P1 and display the result on LEDs of P2 with 4-second delay in between each ASCII showing. Run the program to verify it works.
ACTIVITY 2
Modify the program in Activity 1 to sound the buzzer if the input value on DIP switches are not packed BCD ($00-$99). That means, it will convert only the BCD data and displays ASCII numbers on LEDs and if the input data is not packed BCD (e.g. 10011111 binary) it will sound the buzzer and LEDs will have all zeros.
ACTIVITY 3
Write a program to convert two ASCII numbers to a packed BCD and display the BCD result on LEDs of PORTB. Run the program to verify it works.
unsigned char ascii_1= 0x39;
unsigned char ascii_2=0x37;
Name: Date: Class:
1. Find the value z after the following code.
unsigned char z=0x89;
z=z>>3;
z = in hex
2. Find the value z after the following code.
unsigned char z=0x89;
z=z ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- 8051 tutorial sharif
- portland community college
- homework 1 information technology services
- the binary decimal and hexadecimal number systems
- lab 1 micro digital ed
- 1 university of alabama in huntsville
- raja mahendra college of engineering home
- shifting microsoft azure
- digital signal input and output sjsu
- course id number coahoma cc
Related searches
- escience lab 1 answers
- 1 200 dilution lab chart
- a p 1 lab final exam
- lab exercise and homeostasis lab report
- 1 or 2 374 374 1 0 0 0 1 168 1 1 default username and password
- 1 or 3 374 374 1 0 0 0 1 168 1 1 default username and password
- 1 or 2 711 711 1 0 0 0 1 168 1 1 default username and password
- 1 or 3 711 711 1 0 0 0 1 168 1 1 default username and password
- 1 or 2 693 693 1 0 0 0 1 168 1 1 default username and password
- 1 or 3 693 693 1 0 0 0 1 168 1 1 default username and password
- 1 or 2 593 593 1 0 0 0 1 or 2dvchrbu 168 1 1 default username and password
- 1 or 3 593 593 1 0 0 0 1 or 2dvchrbu 168 1 1 default username and password