Panasonic F77G, MN101C77C user manual Uart Serial Interface Transfer Rate Setup Register

Models: F77G MN101C77C

1 544
Download 544 pages 59.61 Kb
Page 377
Image 377

Chapter 11 Serial Interface 0, 1

„Transfer Rate

Baud rate timer (timer 2 and timer 4) can set any transfer rate.

Tables 11-3-22, 23 show the setup example of the transfer rate. For detail of the baud rate timer setup, refer to chapter 6. 8-bit Timer.

Table 11-3-22 UART Serial Interface Transfer Rate Setup Register

Setup

Register

Page

 

 

 

Serial 0 clock source (timer output)

SC0CKS

XI - 13

 

 

 

Timer clock source selection

TM5MD

VI - 13

 

 

 

Timer compare register selection

TM5OC

VI - 8

 

 

 

Table 11-3-23 UART Serial Interface Transfer Rate Setup Register

Setup

Register

Page

 

 

 

Serial 1 clock source (timer output)

SC1CKS

XI - 20

 

 

 

Timer clock source selection

TM4MD

VI - 12

 

 

 

Timer compare register selection

TM4OC

VI - 8

 

 

 

Timer 4 compare register is set as follows ;

overflow cycle = (set value of compare register + 1) x timer clock cycle

baud rate = 1 / (overflow cycle x 2 x 8) ("8" means that clock source is divided by 8) therefore,

set value of compare register = timer clock frequency / (baud rate x 2 x 8) - 1

For example, if baud rate should be 300 bps at timer clock source fs/4 (fosc = 8 MHz, fs = fosc/2), set value should be as follows ;

Set value of comapre register = (8 x 106 / 2 / 4) / (300 x 2 x 8) - 1 = 207

= x'CF'

Timer clock source and the set values of timer compare register at the standard rate are shown on the following page.

Transfer rate should be selected under 300 kbps.

Operation XI - 51

Page 377
Image 377
Panasonic F77G, MN101C77C user manual Uart Serial Interface Transfer Rate Setup Register