COE 511Microprocessor System

ENGR. ANGELUS VINCENT P. GUILALAS
Experiment No. 1
Review on Development Board
OBJECTIVES
1. To be familiar with the Z86CCP00ZEM CCP Development Board
2. Look into importance of the basic skills and knowledge of learning the development board
and its function.
3. Use this development board to design microprocessor control software.
EQUIPMENTS
Quantity
1
PC with ZDS Software
1
Zilog Z86CCP00ZEM Development Board
1
Zilog Training Module (TM-123)
1
RS 232 Serial Cable
1
Emulation Cable
1
Power Supply
BASIC
Before we start programming we look at the basic circuit for the Z8 microcontroller. Figure 1
shows the basic circuit with crystal. Since we are going to use the Z86CCP00ZEM emulator for our
experiments, we will get the 5V from the emulator but for other modules a separate power supply is
needed. Also the crystal is not necessarily needed because our emulator contains the crystal
oscillator circuit. Make sure to set the jumpers on the emulator properly.

Figure 1.1: Basic Circuit

Laboratory Experiment

Page 1

This module is active low which means to activate a LED the MCU should output a logic 0 or we can use an 8-bit LED module connected to the MCU's PORT2. ANGELUS VINCENT P. we will be using the Zilog TM-1.2: 8-bit Led Module Active High SOFTWARE We will be writing a hello world program which blinks the LEDs connected to PORT2. GUILALAS HARDWARE In this lesson.3 Page 2 . Figure 2 shows the schematic. To do this we follow the program flow chart shown below: Figure Laboratory Experiment 1. This LED's are active high which means to activate a LED the MCU should output a logic 1.COE 511Microprocessor System ENGR. Figure 1.

you may play with these values loop2: djnz r1.load r0 and r1 with value to be used for loop1: ld r1. The delay subroutine will make us see the transition between turning on and turning off because without the delay the LEDs will turn on and off at a very fast rate that our human eye cannot see. #11111110b call delay ld p2. #00h p3m. Code: . #0ffh . Connect it to your target module. #11111111b call delay jr start . Connect the emulation cable to the target module which is the TM-1. write the following code below on the ZDS software then debug it and run the program. #01h rp.down counting. loop1 .word .decrement and loop until r0 is zero ret . -----------------------------------------------Delay subroutine-------------------------------------------------delay: ld r0. 4.go back to start .for active high led . Turn on the PC. ANGELUS VINCENT P. #10h . #05h p2m. 3.org . The turn on LED will require us to load a low logic level to Port2 in order to lit the LED and loading a high logic level will turn the LED off. #80h p01m.word . srp #10h . 6.turn on LED . Adjust your AC/DC adaptor power supply with the output voltage of 9Vdc/0.5A. spl. PROCEDURE 1. ---------------------------------------------------Main Loop-----------------------------------------------------start: ld p2. loop2 .call delay subroutine . GUILALAS The Init Ports is required to set the ports to inputs or outputs as well as other registers. decrement and loop until r1 is zero djnz r0.turn off LED .word .disable interrupts . Make sure that the Vcc pin (J1) on the emulator is not connected if your target module has its own power supply.call delay subroutine .port 0 is configured as input . ---------------------------------------------------Initialization----------------------------------------------------di ld ld ld ld ld module.org 00h 0 0 0 0 0 0 0ch . #0ffh .register pointer is initialized at 10h .word .word .word . then the emulator.port 3 is digital. After setting up the hardware. The inner conductor is the positive terminal. and finally the TM-1.port 2 is configured as output . 2. port2 in Push-Pull mode .return to main loop Laboratory Experiment Page 3 .COE 511Microprocessor System ENGR.stack pointer is initialized at 80h . 5.

9. Observe the running the code above. GUILALAS . Write your code below for procedure no. Using the concept of active low.end of program 7. change this routine to turn all led’s on and off. Write your code below.COE 511Microprocessor System ENGR. Try using different delay periods to vary the ON and OFF duration of the leds. which bit of MCU’s port2 will lit? __________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ____________________ 8. ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ Laboratory Experiment Page 4 .end . After debugging the following code above. connected on PORT 2. ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ____________________________________________________________________________________ Exercise 1. ANGELUS VINCENT P. 8.

ANGELUS VINCENT P.COE 511Microprocessor System ENGR. Exercise 3. in executing exercise 2 using active high concept. GUILALAS ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ___________________________________________________________________________________ Exercise 2. What will happen to the 8-bit active high led module shown in figure 1.2 if bit 1. 5 and 7 will lit on? Just shade the circle. 4. Write the code below. ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ________________________________________________________________________________ GENERALIZATION ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ______________________________________________________________________________________________________ ____________________________________________________________________________________ Laboratory Experiment Page 5 .

COE 511Microprocessor System ENGR. GUILALAS Laboratory Experiment Page 6 . ANGELUS VINCENT P.

Sign up to vote on this title
UsefulNot useful