element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum cga to vga converter uPython
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 46 replies
  • Subscribers 272 subscribers
  • Views 4894 views
  • Users 0 members are here
  • python
  • raspberry pico
  • ask_an_expert
  • microcontrollers
  • teensy
  • vga
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

cga to vga converter uPython

rlaci
rlaci over 1 year ago

Hi

im new to uPython and needing some help with fast interrupts, port handling, reading into controller, handling the big amount of data and speed

my main aim is to get it working on raspberry pico, as colors 1bit resolution is enought as its an industrial equiment with RGBHV 15.6khz input(output from the machine) need to transfer it to 31khz VGA standard output for an lcd monitor

any help welcome

thanks!

  • Sign in to reply
  • Cancel

Top Replies

  • shabaz
    shabaz over 1 year ago +3
    There's a website listing monitors that support your resolution: http://15khz.wikidot.com/ I think it's far more likely that you'll be able to source a monitor if you search long enough on eBay, than…
  • beacon_dave
    beacon_dave over 1 year ago in reply to shabaz +3
    There is a PIO based implementation of a VGA driver discussed here if anyone is interested: https://www.youtube.com/watch?v=ZXMdZGQzrWg
  • michaelkellett
    michaelkellett over 1 year ago in reply to rlaci +3
    It's very, very difficult. You need to delve quite deeply into the data sheets. The things to look for are the IO toggle rate, maximum clock rate of internal RAM, and maybe some benchmarks of complete…
  • shabaz
    0 shabaz over 1 year ago

    There's a website listing monitors that support your resolution: http://15khz.wikidot.com/

    I think it's far more likely that you'll be able to source a monitor if you search long enough on eBay, than to convert the sync rate with a Pico.

    If you were to use a Pico, you'd need to figure out how to convert the analog signal in to digital for the Pico to read in, and then figure out out how to send out an analog signal (that latter part is slightly easier, it's been done before I expect). But none of that will work with native microPython (if I assume you've already searched for a library for it, and not found it), and will likely require assembler coding (for the internal units known as PIO). It's a steep learning curve if you need help with everything you've listed above. 

    There may be other ready-made converters out there.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • kmikemoo
    0 kmikemoo over 1 year ago

    Sounds like an interesting project.  It would be interesting to see the finished product. Thumbsup

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dougw
    0 dougw over 1 year ago

    Are you looking for something like this RGB to VGA adapter? They cost about $1.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 1 year ago in reply to dougw

    I think they mean the old IBMPC Color Graphics Array RGBI TTL output

    https://en.wikipedia.org/wiki/Color_Graphics_Adapter#DE-9_connector_for_RGBI_monitor

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rlaci
    0 rlaci over 1 year ago in reply to beacon_dave

    RGB + Hsync Vsync. the adapter should contain 5inputs the one youl listed looks like 3 inputs

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rlaci
    0 rlaci over 1 year ago in reply to shabaz

    - its an industrial equipment so no analog signal needed just low or high

    -  one color as it only shows text is acceptable

    - its showing text i think the 320x200(my predicted resolution) could be shrinked down to like 120x80 or something

    - as of my own im thinking about leaving the Vsync and leaving the Hsync also, but one interrupt driven pico input could make in half period a second trigger so in this way the Hsync is doubled. with signal generator i was able to sync up the vga monitor, but the left part of the original screen is also written on the original right part of the screen so its messy but at least i can see the source equipment is working, but line doubling like that isnt really a solution i need to part it so if i could make a fast enought program to read one line and write two with the information from the one but double freq/half period

    - my second idea is to read a whole image then visualise with a resolution as i want as driving a vga display is not that hard, but im not sure what kind of variable library could hold up the whole image data as im new to python, i dont even know which way is proper for one line bit transforming

    one color possibly reduced resolution is my first goal

    - im also thinking about making a trigger driving a flipflop at half sync period then drive 2 monitors with half part of the original signal but its a pretty messy solution

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rlaci
    0 rlaci over 1 year ago in reply to beacon_dave

    sorry the other reply was for the original comment.

    i looked up your link and hsync is pretty similiar, but vsync is 63hz not 59.xxx

    the sync is ttl level

    rgb also ttl level

    mine has no intensity output and rgb signals look like low high

    possibly you are right and my machine was derived from this standard, its a cnc mill sinumerik controlled operators panel

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 1 year ago in reply to rlaci

    You might be able to pick up an Extron VS 304 for next to nothing. They could handle 15kHz RGBHV and scale to VGA.

    https://www.extron.com/product/dvs304

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dougw
    0 dougw over 1 year ago in reply to rlaci

    RGBHV2VGA is a bit more expensive $7-$8

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 1 year ago in reply to rlaci

    If it's just 1-bit data (i.e. R/G/B are all the same, and only two values) then that's a lot easier.

    However, I'm not sure why you think microPython will work here. It's too slow for this. If you wish to do it with a Pico, then you'd ideally need to read up on the Pico's PIO (Programmable Input/Output) feature, and learn how to use that. With that, it could be fairly straightforward to do what you want, perhaps translating each raster line to two, for CGA->VGA, or writing to frame buffers, you have the memory for that option too. You'll be in a better position to decide that once you've use the PIO capabilities a bit. Note that there are two PIOs, so you can use both if it simplifies things. I suspect you may need to use two since each one can only have a limited amount of instructions.

    So, the language to read up on and experiment with is PIO assembler, plus a bit of C (other languages are possible, but C would be easiest) for any setup code as required. You could even drive a LCD screen. If you're completely new to all this, all I can suggest is do some simpler experiments first, and get used to using an oscilloscope to help monitor and debug your PIO code.

    As mentioned before, picking up an off-the-shelf 15kHz compatible monitor would be the simplest option though.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube