Difference between revisions of "RA8875 Parallel VGA Card"

From Nuclear's Documentation Wiki
Jump to navigation Jump to search
(smaller images)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The RA8875 Parallel VGA Card is a small card which provides 800x480 pixel VGA output, using an 8-bit, 5v-compatible 8080-style data bus. It uses the RA8875, which comes with many useful features for drawing, and includes built-in fonts, hardware scrolling, multiple layers, etc.
 
The RA8875 Parallel VGA Card is a small card which provides 800x480 pixel VGA output, using an 8-bit, 5v-compatible 8080-style data bus. It uses the RA8875, which comes with many useful features for drawing, and includes built-in fonts, hardware scrolling, multiple layers, etc.
  +
  +
See the hackaday project for schematics and updates: https://hackaday.io/project/197178-ra8875-vga
   
 
== Detailed Specifications ==
 
== Detailed Specifications ==
Line 18: Line 20:
 
This board is designed to work with the [[Teensy_4.1_Computer]], and is a convenient way of adding video output to the Teensy computer.
 
This board is designed to work with the [[Teensy_4.1_Computer]], and is a convenient way of adding video output to the Teensy computer.
   
== Overall Design ==
+
== External Connection ==
  +
  +
[[File:RA8875_VGA_Card_Pinouts.png|thumb|Board pinout|600px]]
  +
  +
[[File:Expansion_port_pinout_on_RA8875_card_(any_variant).png|thumb|Expansion port pinout|600px]]
  +
[[File:Teensy4.1_computer_external_headers_1.png|thumb|Teensy 4.1 Computer connector schematics, excluding the card connector, for comparison|400px]]
  +
  +
If you are on the Teensy 4.1 Computer board or any 5v microcontroller, you probably want to use the card connector. Otherwise, I recommend soldering your connections to the large side expansion port. You can read more on each in the sections below.
  +
The rest of this section will be devoted to more nitty-gritty technical details.
  +
  +
There are two main connectors for interfacing to the RA8875, both share most of their pins and both are compatible with a respective connector on the [[Teensy 4.1 computer]].
  +
The card connector is a simpler, smaller header with pre-soldered headers, while the larger expansion port comes unsoldered and has more pins.
  +
  +
Both ports share the parallel pins WR, RD, and WAIT, as well as the busses ADDR and DATA. WR, RD, and WAIT are all active low, and it is expected that all select lines also be active low. The address bus (ADDR, shown on the board as A0, A1, and A2) has three pins, allowing for three addresses per device, but the RA8875 only uses addresses 0 and 1.
  +
  +
=== Card Connector ===
  +
  +
This connector has all the needed lines to communicate with the RA8875, as well as level-shifting logic to make it completely 5v-compatible. A pinout is provided above.
  +
  +
The card connector was originally designed to interface with cards for the Z80 computer I previously built, and has a compatible pinout, as well as a compatible electrical specification.
  +
  +
=== Side expansion port ===
  +
  +
This is a larger 3.3v-compatible port.
  +
  +
== Software and Programming ==
  +
  +
An Arduino library is available on my gitlab: https://git.nuclaer-servers.com/Nuclaer/ra8875-parallel-vga-library
  +
  +
The library has example code to reference. Currently it supports:
  +
* Multiple resolutions, including changing display resolution while in use
  +
* Basic shapes, like rectangles, circles, lines
  +
* Text
  +
** Color, background color, or background transparency
  +
** Size, both vertically and horizontally
  +
* Bitmaps
  +
** Extremely fast draw times
  +
* Multiple parallel bus interface options
  +
** Dedicated memory interface
  +
** Raw IO pins (Arduino digitalRead/digitalWrite)
  +
** Teensy 4.1 direct port manipulation
  +
  +
For code optimized for more complex and demanding video games, my Teensy Minecraft is a good reference: https://git.nuclaer-servers.com/Nuclaer/teensy-minecraft
   
  +
NTIOS also has a driver for this card, and may be fun to play with or reference. The OS drivers and such are in this repo: https://git.nuclaer-servers.com/Nuclaer/ntios-2020 And here is an Arduino sketch that uses the driver, running on Teensy 4.1: https://git.nuclaer-servers.com/Nuclaer/teensy-ntios
[[File:Teensy41_Computer_Audio_circuit.png|thumb|Teensy 4.1 Computer audio circuit|600px]]
 

Latest revision as of 17:56, 3 September 2024

The RA8875 Parallel VGA Card is a small card which provides 800x480 pixel VGA output, using an 8-bit, 5v-compatible 8080-style data bus. It uses the RA8875, which comes with many useful features for drawing, and includes built-in fonts, hardware scrolling, multiple layers, etc.

See the hackaday project for schematics and updates: https://hackaday.io/project/197178-ra8875-vga

Detailed Specifications

  • Up to 480x800 pixel display
  • 16-bit color (RGB565)
    • Optionally, 8-bit color can be selected to use two drawing layers, and to improve bitmap draw time
  • Video modes can be selected or designed
    • RA8875 allows configuring of all VGA regions, as well as hsync and vsync polarity. Multiple resolutions and pixel clocks may be selected
    • Recommended settings use a 40Mhz pixel clock
  • 8-bit parallel data bus for fast writing
    • Overclocked to over 167.9Mbps with stable writing in tests
    • Minimum cycle time of 55ns (see RA8875 datasheet)
    • 5v compatible
    • 8080-style control signals: nWAIT, nWR, nRD, nSEL
    • Z80 and 8080 compatible design

This board is designed to work with the Teensy_4.1_Computer, and is a convenient way of adding video output to the Teensy computer.

External Connection

Board pinout
Expansion port pinout
Teensy 4.1 Computer connector schematics, excluding the card connector, for comparison

If you are on the Teensy 4.1 Computer board or any 5v microcontroller, you probably want to use the card connector. Otherwise, I recommend soldering your connections to the large side expansion port. You can read more on each in the sections below. The rest of this section will be devoted to more nitty-gritty technical details.

There are two main connectors for interfacing to the RA8875, both share most of their pins and both are compatible with a respective connector on the Teensy 4.1 computer. The card connector is a simpler, smaller header with pre-soldered headers, while the larger expansion port comes unsoldered and has more pins.

Both ports share the parallel pins WR, RD, and WAIT, as well as the busses ADDR and DATA. WR, RD, and WAIT are all active low, and it is expected that all select lines also be active low. The address bus (ADDR, shown on the board as A0, A1, and A2) has three pins, allowing for three addresses per device, but the RA8875 only uses addresses 0 and 1.

Card Connector

This connector has all the needed lines to communicate with the RA8875, as well as level-shifting logic to make it completely 5v-compatible. A pinout is provided above.

The card connector was originally designed to interface with cards for the Z80 computer I previously built, and has a compatible pinout, as well as a compatible electrical specification.

Side expansion port

This is a larger 3.3v-compatible port.

Software and Programming

An Arduino library is available on my gitlab: https://git.nuclaer-servers.com/Nuclaer/ra8875-parallel-vga-library

The library has example code to reference. Currently it supports:

  • Multiple resolutions, including changing display resolution while in use
  • Basic shapes, like rectangles, circles, lines
  • Text
    • Color, background color, or background transparency
    • Size, both vertically and horizontally
  • Bitmaps
    • Extremely fast draw times
  • Multiple parallel bus interface options
    • Dedicated memory interface
    • Raw IO pins (Arduino digitalRead/digitalWrite)
    • Teensy 4.1 direct port manipulation

For code optimized for more complex and demanding video games, my Teensy Minecraft is a good reference: https://git.nuclaer-servers.com/Nuclaer/teensy-minecraft

NTIOS also has a driver for this card, and may be fun to play with or reference. The OS drivers and such are in this repo: https://git.nuclaer-servers.com/Nuclaer/ntios-2020 And here is an Arduino sketch that uses the driver, running on Teensy 4.1: https://git.nuclaer-servers.com/Nuclaer/teensy-ntios