Chapter 1 Hardware Structure
UART Sample Program
The following application program shows how the UART can be used for the transmission and re-
ception of external data:
t_uart_TX:
clr intc0
clr intc1
mov a,80h
mov ucr1,a
mov brg,a
mov ucr2,a
mov a,055h
mov txr,a
:
:
jmp t_uart_TX
; disable INTC0
; disable INTC1
; enable UARTEN
; set BRG=80H
; enable TXEN
; set TXR=55H
t_uart_RX:
clr intc0
clr intc1
mov a,80h
mov ucr1,a
mov brg,a
mov a,40h
mov ucr2,a
mov a,rxr
mov pa,a
:
:
jmp t_uart_RX
; disable INTC0
; disable INTC1
; enable UARTEN
; set BRG=80H
; enable RXEN
; pa=RXR
Oscillator
Various oscillator options offer the user a wide range of functions according to their various applica-
tion requirements. The LCD Type MCU series, in addition to the system oscillator also contains a
Watchdog Oscillator. Three types of system clock sources can be selected while various clock
source options for the Watchdog Timer are provided for maximum flexibility. Additional internal cir-
cuitry, connected to these oscillators, provide various other timing and interrupt functions, the fre-
quency and operation of which is determined through configuration options and internal registers.
System Clock Configurations
There are three methods of generating the system clock, using an external crystal/ceramic oscilla-
tor, an external RC network or using an external RTC 32768Hz crystal to form a Real Time Clock.
The chosen method is selected through the configuration options.
S y s te m
C lo c k
C o n fig u r a tio n
O p tio n
R C O s c illa to r
C r y s ta l O s c illa to r
3 2 7 6 8 H z R T C O s c illa to r
O S C S e le c t
C o n fig u r a tio n
O p tio n
f
S
Y S
System Clock Configuration
101
Home Index Bookmark Pages Text
Previous Next
Pages: Home Index