Jump to content
Electronics-Lab.com Community



Recommended Posts

oops.. sorry guys.. let me elaborate..

My problem statement is to display a game on our commom lab CRO (30 MHz) using a microcontroller... I'm plannin to use PIC.. though i' haven't yet decided which one.. I read somewhere on the net that i can use a composite video signal similar to the ones which is used in TV..

So.. can ya guys throw some light !!!

Link to comment
Share on other sites

Sorry again !!  :P

I've to display the game on the CRO.. I'm sorry if i confused it with interfacing.. thought it to be the same thing.. but i guess its different..  :'(

So.. know i've to display the game on the CRO.. and as you might have already guessed i'm totally new in this field..

The specification of the CRO is:
30 MHz Dual Trace Oscilloscope, Model No. 3706 C, Aplab

I found some literature on the net, which gave me some clue that i can display the game on the CRO as a composite video signal (like in TVs)..

Link to comment
Share on other sites

I think I get it.  He wants to put the scope into the X-Y mode (Ch1 on X ch2 onY)
and use the PIC to control the signals to DRAW a game on the screen.
If it's a 30Mhz it must be a fair machine so I am guessing it also has a Z input on the back that can be used to control the intensity of the beam.

I have seen people build driver circuits and display NTSC signals on a scope screen before. It wasn't easy but they were trying to comply with a broadcast signal.  This may be easier because he can control the whole thing.

I’d suggest ‘Vector’ graphics rather than trying to scan the whole screen.
These are very similar to an etch a sketch with an on off button.
You will need a pair of fast D-A converters.
If you load a specific X,Y value into the converters and the send that to the scope and wait just a moment for the screen to settle you will illuminate a DOT on the screen
BY sending a series of locations to the system you can draw anything. 
So rather than keeping track of thousands of pixels, just keep track of the actual dots you are using.  In the game world they are called sprites.
A sprite is made up of a collection of pixels relative to a single origin.  Usually the upper left corner.

A sprite might look like this for a square
If I pick a point,  (25,10) for instance, and plot my sprite there it would be
(25 + 0 , 10 + 0)
(25 + 1 , 10 + 0)
(25 + 2 , 10 + 0)
(25 + 2 , 10 + 1)
(25 + 2 , 10 + 2)
(25 + 1 , 10 + 2)
(25 + 0 , 10 + 2)
(25 + 0 , 10 + 1)

So you would need to create a sub for each sprite If we create one for “SQUARE”
We would pass it the X,Y location of the square and it would plot a square where ever
We tell it too.

You might need some subs like (Tank1,Tank2,Bullet1,Bullet2,Tree,Rock,House)

Then by allowing game play to determine the location of each item you simply call the subs with the correct X,Y locations to draw each item.

(* Note Drawing an item would be sending the voltages of Vx + sp and Vy + sp to the scope while the beam is on and then turning it off when done)

If the subs are called at a regular interval there should not be too much flickering with a 20mhz PIC.  I’d set the subs up with an interrupt to refresh the sprites every 1/20th of a second. (About the speed of the human eye)

You might want to tear apart a joystick and see how to wire one or 2 into the Pic.
You will need 5 pins for each one (Left, Right, Forward, Backward, Fire)

Is that what you are looking for?


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...