ashray Posted September 11, 2006 Report Posted September 11, 2006 Guys... How do we interface a PIC to a 30 - MHz CRO ?? Plz .. plz.. help Quote
ante Posted September 12, 2006 Report Posted September 12, 2006 Maybe nobody has a clue what you are talking about! Quote
mugsby Posted September 13, 2006 Report Posted September 13, 2006 it's a scope that use a television tube. Quote
ashray Posted September 13, 2006 Author Report Posted September 13, 2006 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 !!! Quote
ashray Posted September 14, 2006 Author Report Posted September 14, 2006 Sorry again !! :PI'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, AplabI 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).. Quote
ashray Posted September 14, 2006 Author Report Posted September 14, 2006 And no i cannot use a DSO... Quote
Theatronics Posted September 14, 2006 Report Posted September 14, 2006 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 screenBY 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 square0,01,02,02,12,21,20,20,1If 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 everWe 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 Quote
ashray Posted September 15, 2006 Author Report Posted September 15, 2006 ;DYup 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 ... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.