beautypg.com

Zilog ZUSBOPTS User Manual

Page 49

background image

UM025603-0814

ZDS II Developer Studio for the ZNEO CPU

Zilog Educational Shields

User Manual

42

Example.

The code segment below displays the letters ZILOG on a 5x5 matrix. The letter

Z is shown in Figure10.

/*******************************************************

*

* File: main.c

*

* Description: This file contains the main function that writes

* the string ZILOG on a 5x5 matrix and blinks the LEDs in the

* circular pattern on the Test Shield that is mounted on the Zilog

* Educational Platform.

*

*****************************************************/

#include

#include "zneo.h"

void delay()

{

long y;

y = 110000;

while(y--);

}

void delay2()

{

long z;

z = 20000;

while(z--);

}

void delay3()

{

long t;

t = 5000;

while(t--);

}

void click()

{

long w;

w= 10000;

while(w--)

PFOUT = 0x20;

PFOUT = 0x00;

}

void LetterZ(void)

{

delay2();