circuitsascode.displays.vga module¶
- circuitsascode.displays.vga.vga(rgb=None, e_series='E12', logic_lvl=3.3 * units.volts)[source]¶
Analog-RGB VGA port driven by red, grn, blu digital color buses.
Takes list of red, green and blue bus widths and creates a resistor network to convert the digital color buses to analog RGB signals that are output through a DB-15 connector.
- Parameters
rgb (list, optional) – List of integer widths for the red, green and blue buses. Defaults to (3, 3, 3).
e_series (str, optional) – E-series of resistor values (E3, E6, E12, E24, E48, E96, E192). Defaults to “E12” (10%).
logic_lvl (float, optional) – V_hi voltage for digital signals. Defaults to 3.3V.
- Returns
- An Interface object containing the following I/O
red: Input bus for red component.
grn: Input bus for green component.
blu: Input bus for blue component.
hsync: Output net for horizontal sync.
vsync: Output net for vertical sync.
gnd: Ground net.
- Return type
Interface
Example
>>> from circuitsascode.displays.vga import vga >>> red, grn, blu = Bus(5), Bus(4), Bus(3) >>> hsync, vsync, gnd = Net(), Net(), Net() >>> vga1 = vga(rgb=(len(red), len(grn), len(blu))) >>> vga1.red += red >>> vga1.grn += grn >>> vga1.blu += blu >>> vga1.hsync += hsync >>> vga1.vsync += vsync >>> vga1.gnd += gnd