beautypg.com

Individual gpio control, Demonstrate the zed test shield, Figure 11. zed test shield initialization – Zilog ZUSBOPTS User Manual

Page 19

background image

UM025603-0814

Individual GPIO Control

Zilog Educational Shields

User Manual

12

The following two examples demonstrate usage of this

setpins

command.

Example 1.

The

setpins PB FF ON

command turns on all Port B bits

Example 2.

The

setpins PB FF OFF

command turns these bits off

Individual GPIO Control

The

setpins

command that controls individual port bits is not available after the ZED

Test Shield has been initialized. Instead the ZED Test Shield, as controlled by the com-
mand shell, is primarily used to display text strings with the

LEDString

command. Char-

acters will display on a 4x7 matrix instead of the more common 5x7 matrix because the
PA4 and PA5 bits are reserved for use by the UART. If the UART is not in use (i.e., the
USB console cable is not connected), the full 5x8 matrix will be available. Besides its
graphics capabilities, the shield can also be used to teach basic binary math.

Demonstrate the ZED Test Shield

Observe the following procedure to view a basic demonstration of the ZED Test Shield.

1. In Tera Term, enter the

startshield leds

command to initialize the ZED Test

Shield. An

LEDS Shield started!

message will appear, as shown in Figure 11.

Figure 11. ZED Test Shield initialization