CRO

ashray

Aug 25, 2005
34
Joined
Aug 25, 2005
Messages
34
Guys... How do we interface  a PIC to a 30 - MHz CRO ?? Plz .. plz.. help

 

ante1

Jan 24, 2004
4,138
Joined
Jan 24, 2004
Messages
4,138
Maybe nobody has a clue what you are talking about!

 

ashray

Aug 25, 2005
34
Joined
Aug 25, 2005
Messages
34
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 !!!

 

ashray

Aug 25, 2005
34
Joined
Aug 25, 2005
Messages
34
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)..

 

Theatronics

Jul 12, 2006
158
Joined
Jul 12, 2006
Messages
158
OH!
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.

Humm.
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
0,0
1,0
2,0
2,1
2,2
1,2
0,2
0,1
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?

-Mike

 

ashray

Aug 25, 2005
34
Joined
Aug 25, 2005
Messages
34
;D
Yup thanx a lot mike.. i really appreciate it !!!
Thats exactly what i'm looking for..

Thanks again..

I'll have to read about sprites and all.. though you gave a very good overview.. Atleast got a lead from where to start..

Thanks a lot ...

 
Top