86:Ports:02

From WikiTI
Revision as of 03:15, 20 September 2021 by Zeroko (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Port Number: 02h

Function: LCD Contrast

This port controls the LCD contrast.

Read Values

Because this port is write-only, its read behavior is the same as Unused Banks.

Write Values

  • Bit 0-4: Contrast level. 00h is lightest & 1Fh is darkest.
  • Bit 5-7: Unused.

Comments

  • In addition to writing to this port, the OS saves the current contrast at address C008h so that it is able to read it back later. If the value written to this port is different from the value at C008h, the value at C008h will be used the next time the user changes the contrast using the OS.
  • If the value at C008h is greater than 1Fh, it is impossible to increase the contrast until it falls below 1Fh. Because the upper 3 bits are ignored by the hardware, this can result in having to cycle through all apparent contrast levels multiple times.