Programmable clock output, Irda clock output – Maxim Integrated High-Speed Microcontroller Users Guide: Network Microcontroller Supplement User Manual
Page 123

High-Speed Microcontroller User’s
Guide: Network Microcontroller
Supplement
123
ference but allows the use of a crystal frequency that is acceptable for serial port and CAN operation. Using this feature, standard ser-
ial rates of up to 38.4k baud are available with a 16MHz crystal. A 24MHz crystal allows serial rates up to 115.2k baud.
Programmable Clock Output
When enabled, the DS80C400 can output a 50% duty cycle square wave on external pin P3.5. This signal is free running and not syn-
chronized to the external clock source. To enable this feature, three conditions must be met:
1.)
Select the output frequency of the system clock divided by 2, 4, 6, or 8 through the clock output divide select bits (COR.2-1).
2.)
The external clock output enable bit, CLKOE, must be set (COR.0). Steps 1 and 2 can be combined and must use the timed-acc-
ess procedure.
3.)
The P3.5 latch bit (P3.5) must be set.
IrDA Clock Output
The Infrared Data Association (IrDA) communication protocol is a popular way to connect physically separated devices up to a dis-
tance of 1m. The physical layer of the protocol is very easy to implement: configure the DS80C400’s serial port 0 by selecting crystal
speed, baud rate, etc. The microcontroller is then connected to an external IR encoder/decoder (ENDEC), which modulates the out-
put of the serial port and communicates with an infrared transceiver.
The DS80C400 incorporates special circuitry that makes it simple to add IR capability to your design. Most IR encoders require the
controlling microprocessor to supply a 16x clock to perform the modulation. The DS80C400 can provide this special 16x clock to the
encoder without requiring the use of a timer. After the serial port is configured, set the IRDACK (COR.7) and CLKOE (COR.0) bits using
the timed-access procedure. The P3.5 latch bit (P3.5) must also be set. At this point, a clock signal with a frequency of 16 times the
serial port 0 baud rate is presented on P3.5.
Figure 11-10 illustrates how to add IrDA capability to a DS80C400-based system. The receive and transmit signals of serial port 0 are
connected directly to an ENDEC chip that, in turn, interfaces to an infrared transceiver. The external clock output pin (P3.5) is con-
nected to the 16XCLK pin of the ENDEC to provide the modulation clock.
Figure 11-10. Sample IrDA Implementation
P3.5
P3.1
P3.0
RXD
TXD
16x clock
Ir RXD
Ir TXD
HSDL-7000
encoder/
decoder
HSDL-3610
transceiver
DS80C400
Maxim Integrated