Files
picovga-cmake/docs/connections.html
2025-08-26 20:47:11 -07:00

169 lines
11 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PicoVGA: Connections</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">PicoVGA
&#160;<span id="projectnumber">1.2-cmake</span>
</div>
<div id="projectbrief">VGA/TV display on Raspberry Pico</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('connections.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">Connections </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="md_pages_Connections"></a> </p>
<h1><a class="anchor" id="autotoc_md0"></a>
How to Connect to VGA display</h1>
<p>The following diagram shows how to connect the Pico to VGA:</p>
<p><img src="PicoVGA_diagram2.jpg" alt="" class="inline"/></p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Pico Pin </th><th class="markdownTableHeadNone">Output Wire </th><th class="markdownTableHeadNone">Notes </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">GP0 </td><td class="markdownTableBodyNone">VGA B0 </td><td class="markdownTableBodyNone">Resistor 1K0 to Blue output </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">GP1 </td><td class="markdownTableBodyNone">VGA B1 </td><td class="markdownTableBodyNone">Resistor 390 to Blue output </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">GP2 </td><td class="markdownTableBodyNone">VGA G0 </td><td class="markdownTableBodyNone">Resistor 2K2 to Green output </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">GP3 </td><td class="markdownTableBodyNone">VGA G1 </td><td class="markdownTableBodyNone">Resistor 1K0 to Green output </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">GP4 </td><td class="markdownTableBodyNone">VGA G2 </td><td class="markdownTableBodyNone">Resistor 470 to Green output </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">GP5 </td><td class="markdownTableBodyNone">VGA R0 </td><td class="markdownTableBodyNone">Resistor 2K2 to Red output </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">GP6 </td><td class="markdownTableBodyNone">VGA R1 </td><td class="markdownTableBodyNone">Resistor 1K0 to Red output </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">GP7 </td><td class="markdownTableBodyNone">VGA R2 </td><td class="markdownTableBodyNone">Resistor 470 to Red output </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">GP8 </td><td class="markdownTableBodyNone">VGA SYNC </td><td class="markdownTableBodyNone">Resistor 100 to HSYNC or CSYNC </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">GP9 </td><td class="markdownTableBodyNone">VGA VSYNC </td><td class="markdownTableBodyNone">Resistor 100 to VSYNC (if defined) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">GP19 </td><td class="markdownTableBodyNone">PWM sound </td><td class="markdownTableBodyNone">RC LOW filter 1K5 resistor + 10n capacitor </td></tr>
</table>
<p>See below for a more detailed wiring diagram</p>
<h1><a class="anchor" id="autotoc_md1"></a>
How to connect Pico to PC with serial port</h1>
<p>Most demo projects are prepared to control via USB serial port adapter. USB interface is selected in <code>CMakeLists.txt</code> with this command:</p>
<div class="fragment"><div class="line">pico_enable_stdio_usb(target_name 1)</div>
</div><!-- fragment --><p>Where *<code>target_name</code>* is the name of example target. If instead you want to use the Pico UART for the examples then change the line to the following:</p>
<div class="fragment"><div class="line">pico_enable_stdio_uart(target_name 1)</div>
</div><!-- fragment --><p>To connect Pico to PC via serial port, you need either convertor from RS232 COM port from 3.3V levels of Pico board, or you need convertor to USB port. Good choice is USB-serial adaptor PL2303TA.</p>
<p>How to connect UART to Pico:</p>
<div class="fragment"><div class="line"> +---USB---+</div>
<div class="line">&lt;-- UART0_TX GP0 |.1 40.|VBUS --- +5V power output to USB device</div>
<div class="line">--&gt; UART0_RX GP1 |.2 39.|VSYS ---|&lt;|--- +5V power input</div>
<div class="line">--- GND |.3 38.| GND K diode A</div>
<div class="line"> GP2 |.4 37.| 3V3_EN</div>
<div class="line"> GP3 |.5 36.| 3V3_OUT</div>
<div class="line"> ......</div>
</div><!-- fragment --><p>Note: in simple case, you need not diode, you can connect +5V directly on board.</p>
<p>Connect USB/UART adaptor PL2303TA: <br />
</p><table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Wire </th><th class="markdownTableHeadNone">Pico Pin </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">red </td><td class="markdownTableBodyNone">+5V VSYS (39) </td></tr>
</table>
<p>|black |GND (3)| | |white RxD |UART0_TX GP0 (1) | |green TxD |UART0_RX GP1 (2) |</p>
<p>You need serial program to see demo text. Setup port to 115200 Baud, 8 bits, 1 stop bit, no parity, flow control None.</p>
<p>In the Windows Device Manager, USB adaptor can be found under name: "Prolific USB-to-Serial Comm Port (COM10)".</p>
<h1><a class="anchor" id="autotoc_md2"></a>
Wiring diagram</h1>
<p>I don't present here the overall circuit I used, because the library was created as part of a retro gaming computer with Raspberry Pico and is still under development. Here is a simplified wiring diagram of the VGA monitor output (with added audio PWM output):</p>
<p><img src="PicoVGA_diagram.jpg" alt="" class="inline"/></p>
<p>The synchronization output is in the format of the CSYNC synchronization mix (composite synchro, HSYNC + VSYNC). Computer monitors support CSYNC mixed sync. The signal is fed to the HSYNC input (also referred to as CSYNC). An audio output is fed to the VSYNC pin of the VGA connector, for case of output to the TV. The VGA monitor has an input impedance of 75 ohms on this pin, this causes the audio signal to be attenuated and ignored by the VGA monitor and not considered as vertical sync. When the audio connector is inserted, the output to the VGA monitor is disconnected and the audio signal is output to the outside (e.g. to audio headphones).</p>
<p>The TV is connected to the VGA output via a reduction that simply connects the pins of the VGA connector to the corresponding pins of the SCART connector. In this case, the audio signal fed to the VGA connector is also used. Thus, it is not necessary for the device to include a special connector for the TV. The 5V voltage from pin 9 is used as the control voltage for the SCART connector - pin 16 of the SCART connector (Blanking) is connected via a 100 ohm resistor and pin 8 (Switch) is connected directly.</p>
<p>The keyboard connection is not draw here. All sample programs are set up so that program control can be used via the console on the USB virtual port. Simply connect the Pico to the PC via the USB cable used for programming, and run a console program that connects to the USB virtual COM port. For a more detailed description of the connection, see the SDK description. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>