Help with simple VGA display
RobertW
Posts: 66
Hello,
I am having a little difficulity finding what I am looking for in the forum search bar. Maybe someone out there can help. I am working on a M&M candy sorter. The code is loosly based on Jon Williams Nuts & Volts article, "Color Me Tickled". To test the TCS230 scanner and my Propeller I have been using the Parallax Serial Terminal which seems to work well. The next step I would like to accomplish is to convert the output to a VGA monitor connected to my PPDB. I am looking to create a 'simple' VGA display that might show a colored circle for each color of M&M's and a number representing the number of that particular color counted next to each circle. There are 6 different colors in my bag of M&M's (red, orange, yellow, green, blue, brown). Attached is a sample view I made in MS Paint of what I have in mind. Where I am a little puzzled is how do I go about defining colors and then creating the circles? I'll be honest, I am pretty simple minded when it comes to this stuff and understanding how the colors are defined in the demos is a little over my head. For the circles will I need to use the Graphics object? I would like to keep it as simple and compact as possible but I guess I don't know exactly where to start. Any help would be appreciated. Thank you.
- Rob
I am having a little difficulity finding what I am looking for in the forum search bar. Maybe someone out there can help. I am working on a M&M candy sorter. The code is loosly based on Jon Williams Nuts & Volts article, "Color Me Tickled". To test the TCS230 scanner and my Propeller I have been using the Parallax Serial Terminal which seems to work well. The next step I would like to accomplish is to convert the output to a VGA monitor connected to my PPDB. I am looking to create a 'simple' VGA display that might show a colored circle for each color of M&M's and a number representing the number of that particular color counted next to each circle. There are 6 different colors in my bag of M&M's (red, orange, yellow, green, blue, brown). Attached is a sample view I made in MS Paint of what I have in mind. Where I am a little puzzled is how do I go about defining colors and then creating the circles? I'll be honest, I am pretty simple minded when it comes to this stuff and understanding how the colors are defined in the demos is a little over my head. For the circles will I need to use the Graphics object? I would like to keep it as simple and compact as possible but I guess I don't know exactly where to start. Any help would be appreciated. Thank you.
- Rob
Comments
Yes, you use the graphics object to draw the circles and text. VGA.spin operates on the concept of tiles. Each tile gets 4 colors. Easiest path is to get VGA.spin and graphics.spin running on your PPDB. Then work on getting all your text and circles drawn without worrying about colors. Then you can work on tile color assignments to get everything working well. Memory might be at issue. If it is, when you get there, some of us can help you define the display with fewer tiles so that it only uses some of the RAM.
Search on graphics_demo.spin to work with VGA. If you can't find it, post up and some of us can help, or maybe somebody has it handy.
Thanks for the suggestion. I was not thinking about working on Graphics + VGA first, before colors. I will work on that and post something if I still have questions. Thanks.
-Rob
In the Propeller Tool IDE you can select the Folder Propeller Library - Demos
There you will find Garaphics_Demo.spin.
This will show you how to use the graphics object with the TV-driver.
To use the VGA instead you can somehow replace the TV object agains the VGA object and adjust the parameter.
Since I never used it with VGA I can not provide a example. But it is supposed to work like this.
Maybe someone else can chime in here...
Enjoy!
Mike
Enjoy!
Rob,
the forum search bar sucks. It's a lot better to use Google, and enter site:parallax.com and then whatever other search terms you want after that. Google will then search only the parallax.com website for you. Hope that helps for finding stuff in the future.
"site:forums.parallax.com vga.spin with graphics_demo.spin" and this was the second page found:
http://forums.parallax.com/showthread.php?114646-Alert-All-Propellerheads-without-TV-ports-Graphics.spin-with-a-VGA-monitor!
That's a thread on how to make the graphics demo work with VGA. Get that sorted and start exploring the commands! You can look in graphics.spin for all the different commands and their arguments. If you have trouble, just ask. One of us can fire that up and figure it out.
In my signature, I've got some color and tile info that can shrink that display down once you've gotten what you want to see on the screen. Focus on that and we can refine it later on.
Thanks for the replies.
@msrobots - for as long a the Propeller has been out, I imagined someone had combined the graphics and VGA objects but I could not find it.
@ElectricAye - thanks for the Google suggestion.
@ Potatohead - thanks for the link. I have it up and running on my screen. I will play around it that for a while and check out the links at the bottom of your post.
I should be on the right track now. A while back I played around with the graphics demo on a TV but wanted to start working with a computer monitor as an output. Thanks again.
-Rob
EDIT: wow, old thread...