10 program example for 8-bit serial i/o, 10 "p – FUJITSU Semiconductor Controller MB89950/950A User Manual

Page 204

Advertising
background image

190

CHAPTER 9 8-BIT SERIAL I/O

9.10

Program Example for 8-bit Serial I/O

This section gives program example for 8-bit serial I/O.

■ Program example for serial output

●

Processing description

•

Outputs 8-bit serial data (55

H

) from the SO pin of serial I/O, then generates an interrupt when transfer is

completed.

•

The interrupt processing routine resets the transfer data and continues output.

•

Operates as an internal shift clock and outputs the shift clock from the SCK pin.

•

With a main clock oscillation frequency F

CH

of 5 MHz, the highest speed clock selected by the speed-

shift function (1 instruction cycle = 4/F

CH

), and a 32 t

inst

shift clock, the data transfer rate will be as

follows.

Transfer speed = 5 MHz/4/32 = 39 kbps

Interrupt cycle = 8 x 32 x 4/5 MHz = 204.8

µs

Advertising