Nintendo GAME BOY Programming Manual page 37

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

2.6.3 Infrared Communication
2.6.3.1 Port Register
The CGB system is equipped with an infrared communication function. An infrared signal
can be output by writing data to bit 0 of RP register. A received infrared signal is latched
internally in the CPU by positive edge of the system clock. (System clock goes to HIGH
from LOW.) The latched data can be read beginning from bit 1 of RP register by setting
bits 6 and 7 to 1.
Note: When data is not sent or received, always set the values of RP register to
00h. This register cannot be written to in DMG mode.
2.6.3.2 Controlling Infrared Communication
Sender:
Setting bit 0 of the RP register to 1 causes the LED to emit light; setting it to 0 turns off the
LED.
Receiver:
If the photo transistor detects infrared light, bit 1 of the RP register is set to 0; if no infrared
light is detected, this bit is set to 1.
2.6.3.3 Basic Format
When the receiver recognizes the unmodified signal from the sender as a logical value of
1 or 0, the receiver actually cannot distinguish between the continuous transmission of 1s
and the absence of received infrared light. The status of the receiver is identical under
these conditions. Consequently, to ensure proper data transmission from sender to
receiver in Game Boy Color infrared communication, signals are distinguished by the size
of the interval between the rising edge of the pulse of one received signal to the rising
edge of the subsequent received signal.
37
Chapter 1: System

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents