6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Jun 15, 2024 8:08 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Dec 07, 2010 3:28 pm 
Offline

Joined: Tue Dec 07, 2010 3:23 pm
Posts: 1
I was wanting to show some teenagers how an oscilloscope can be used, so I was looking to see what signals I could view from my PET I just resurrected. I can see the Phi1 and Phi2 clock signals (though they are showing in phase which I don't think makes sense). Are there any other signals that are easily accessible which would be interesting? I was hoping for two signals that were related. i.e. an interrupt that comes every three clock cycles. I have a two channel oscilloscope that is even older than the PET :)


Thanks,

Allan.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 07, 2010 4:17 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8458
Location: Southern California
If you look at φ1 and then φ2 one at a time just triggering off themselves, they will both start on the rising edge if that's how you have it set to trigger, or both on the falling edge if you have it set to trigger on the falling edge. If you watch them both at once with two channels then they will show out of phase.

You can look at any of the signals, like data bits, address bits, etc., but you won't get a stationary display. The old proverbial NOP generator would give you a predictable rate of up & down on the address bits, each higher one going at half the rate of the previous one, but an actual running program will have branches and jumps, as well as stores and loads from locations besides where the program is actually running.

Interrupts might be rather hard to see because they often aren't very regular and the interrupt line won't be down very long. If there are interrupts coming, whether from a timer, serial input, etc., you could trigger on the falling edge of the IRQ\ line and see it. The amount of time it will be down will have some variation. You definitely won't have one every three cycles. The average instruction takes about four cycles to complete, so after the interrupt line goes down, it will take an average of two cycles to finish the already-started instruction (depending on where it coincided in the instruction's timing, like whether the instruction just got started or was nearly done), plus seven more for the interrupt sequence (to store the address to come back to and store the status plus get the address of the interrupt-service routine, plus a couple of cycles of internal housekeeping), then the time to run the interrupt-service routine (ISR), then six more cycles to execute the return-from-interrupt (RTI) instruction. The fastest you could realistically do without overrunning it would be an interrupt every 20 clocks or so, and that's if all the ISR did was increment a ZP byte. Most processors can't do it anywhere near that fast.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 07, 2010 7:02 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8214
Location: Midwestern USA
GARTHWILSON wrote:
Interrupts might be rather hard to see because they often aren't very regular and the interrupt line won't be down very long.

Most 8 bit Commodore computers with BASIC 2.0 or later have a 50 or 60 Hz jiffy IRQ which is ultimately used to update the TI and TI$ software clocks. So it should be possible to see that in action.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 07, 2010 7:27 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10827
Location: England
It might be interesting to look at SYNC or R/W, perhaps triggered off the IRQ. You'll see the first few cycles of the interrupt handling, which will probably be regular enough to get a good display. SYNC will show the intstruction fetches, and R/W should go low for 3 cycles to stack the address and status byte.

Would be great to see photos of traces!

Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 07, 2010 8:15 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1006
Location: near Heidelberg, Germany
You could scope some of the keyboard inputs - maybe triggered by a specific keyboard output (note: the 4 PIA( VIA?) pins that act as keyboard scan select are expanded to 10 separate lines where only one is active at a time. You may want to use these instead of the PIA pins)

You could then let someone press the appropriate keys to show them how the keyboard output changed - but only when the correct keyboard input is active. Give a little matrix keyboard explanation up front, that should be a great show

You could also scope the video output synced with vsync and 20ms total time, i.e. you see the whole screen on the scope. If the timing resolution of your scope is high enough you might even see the cursor blinking. You could then let someone fill the screen with character "online" and see how the display changes. You could also do a single rasterline (i.e. one of hte eight (graphics mode) or 14 (IIRC, upper/lower case mode) horizontal lines per char. i.e. sync with hsync, 100us total time). You see an overlay of all rasterlines on the scope. With a blank screen you should see mainly a flat line, but with a lower intensity line going up flashing for the cursor. Now again let someone put some chars on the screen. Again, before showing this, give them some explanations, let them decide on which characters to try for which reason. hint: vertical bars....) Again, should be a good show.

You could also save something on tape, and scope the tape while it reads the file back, but that is more sophisticated. Would probably require some knowledge on the encoding...

Hope this helps, let us know what you did and how it worked out!
André


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: