Nintendo DMG-01 Manual - Page 31
Serial I/O - gameboy serial
View all Nintendo DMG-01 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 31 highlights
Game BoyTM CPU Manual 2.11. Serial I/O 2.11. Serial I/O The serial I/O port on the Gameboy is a very simple setup and is crude compared to standard RS-232 (IBMPC) or RS-485 (Macintosh) serial ports. There are no start or stop bits so the programmer must be more creative when using this port. During a transfer, a byte is shifted in at the same time that a byte is shifted out. The rate of the shift is deter- mined by whether the clock source is internal or external. If internal, the bits are shifted out at a rate of 8192Hz (122 microseconds) per bit. The most significant bit is shifted in and out first. When the internal clock is selected, it drives the clock pin on the game link port and it stays high when not used. During a transfer it will go low eight times to clock in/out each bit. A programmer initates a serial transfer by setting bit 7 of $FF02. This bit may be read and is automatically set to 0 at the completion of transfer. After this bit is set, an interrupt will then occur eight bit clocks later if the serial interrupt is enabled. If internal clock is selected and serial interrupt is enabled, this interrupt occurs 122*8 microseconds later. If external clock is selected and serial interrupt is enabled, an interrupt will occur eight bit clocks later. Initiating a serial transfer with external clock will wait forever if no external clock is present. This by DP Page 31