English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 27 January 2018, 22:18   #1
Stardust
Registered User
 
Join Date: Jun 2010
Location: UK
Posts: 72
Learning electronics - View the CPU clock signal of a A500 with a oscilloscope

I am slowly learning electronics with homebrew computing by building a RC2014 Z80 computer. I am having difficulty testing a relatively simple 7.328mhz fast clock test circuit I have done on breadboard.

A few weeks ago I brought a 2 channel 20mhz Hantek 6022BE USB oscilloscope. It works fine the inbuilt test 1Khz square wave output and I have tested various outputs from a 555 timer chip and inverting the signal. But I would like to test a signal in the mhz range.

So with a Amiga A500 I have and the schematic for it I have connected one channel of the oscilloscope between ground and pin 15 on the 68000 CPU and connection 7 of the side expansion slot. But I only get a square wave of 100khz from both CPU pin 15 and the edge connector pad 7, and not a square wave (that might look quite choppy) of 7 Mhz.

How could I view the 7Mhz clock signal that drives the CPU?
Stardust is offline  
Old 27 January 2018, 23:06   #2
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
Long story short, your oscilloscope is most likely not good enough. Sorry to disappoint, but I went through similar trouble when I wanted to check 7MHz with my 25MHz noname Chinese scope. It just cannot correctly display clock that fast.

If you want to see a proper waveform of a signal, your scope needs to have a bandwidth of at least 10x the frequency you're measuring.

For digital electronics, something like a logic analyzer will be far more useful anyway (I can recommend Saleae Logic Pro 16, which has a bandwidth of 100MHz).
strim is offline  
Old 28 January 2018, 03:19   #3
Stardust
Registered User
 
Join Date: Jun 2010
Location: UK
Posts: 72
EDIT:

I have a no name\Saleae clone 8 channel 24mhz logic analyzer. I will see what results I can get with it.

Last edited by Stardust; 28 January 2018 at 05:36.
Stardust is offline  
Old 29 January 2018, 00:27   #4
Stedy
Registered User
 
Stedy's Avatar
 
Join Date: Jan 2008
Location: United Kingdom
Age: 46
Posts: 733
Hi,

I checked the Hantek 6022BE specs, it's bandwidth is 20MHz and it samples at 48 Megasamples/sec. This should show a 7 MHz clock signal, you mey not see the detail of the edges but it will show you a signal.

Did you change the timebase of the oscilloscope to 10ns/division or try the 'Auto' mode?
If you calibrated the scope @ 1KHz then did not change the settings, you could be seeing an aliased signal. If you can adjust the trigger, level, try 1-2 Volts.

Have not used the Hantek scopes so I can't comment on the software. I can comment and recommend the Labnation Smartscope though

Ian
Stedy is offline  
Old 29 January 2018, 13:25   #5
A4000Bear
Registered User
 
Join Date: May 2011
Location: Taradale / Australia
Posts: 96
As other people have already indicated, you will not be able to properly view a 7MHz square wave on a 20 MHz scope.

When a bandwidth is quoted, it is commonly accepted that the frequency response is 3dB down at that frequency. What that means is that if you feed a 20 MHz sine wave at 1V into a 20 Mhz scope, it will display a 20 MHz sine wave at about 0.7V. Increasing the frequency will make the discrepancy greater, reducing it will lessen it until the scope accurately shows the sine wave as 1V.

Things get more complex when you view a square wave. A square wave has more than just its fundamental frequency. It has harmonics extending to infinity at multiples of of the fundamental frequency(assuming an 'ideal' square wave). If we fed our 20 MHz square wave into our 20 MHz scope, we will see a 0.7V sine wave again (maybe a bit distorted, but still a sine wave). This is because our scope cannot respond to any of the harmonics past the 20 MHZ fundamental.

Now in your case, with a 7 MHz 1 V square wave into your 20 MHz scope, what you see will be the right amplitude at 1V, but you won't get a square wave. Your scope will respond fully to the 7MHz fundamental and the 14MHz second harmonic. It will partially respond to the third harmonic at 21 Mhz and after that nothing at all. You will see a very distorted and rounded square wave.

If you are trying to measure the frequency of your 7MHz clock using the scope, you will need to make sure the 'time/cm' setting is appropriate. I am not familiar with your scope, so I can't provide details on how to do that. There may also be a setting to turn interpolation on or off, depending on the signal you are viewing and how your scope is set up, having that set incorrectly may give a totally incoherent display.

Last edited by A4000Bear; 29 January 2018 at 13:50.
A4000Bear is offline  
Old 29 January 2018, 18:51   #6
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,875
Quote:
Originally Posted by A4000Bear View Post
When a bandwidth is quoted, it is commonly accepted that the frequency response is 3dB down at that frequency.
Bandwidth apply to analog signal directly (and as such to amplifiers, ADC or DAC's) but in digital world all this is more complex, general rule is that to see properly sinewave on digital scope you should sample your signal at least twice faster and overal recomended is 2.5 sample rate at least (with assumption to sinc reconstruction filter - interpolating).
However... there is few exceptions from this rule and signal can be undersampled (sub Nyquist sampling) or it can be sampled for example in stochastic or random way . For digital signal measurement general principle is that sampling rate should be at least 5x so IMHO 7MHz should be properly sampled by listed DSO.
btw you can have 20MHz ADC with 500MHz amplifier bandwidth or 20MHz bandwidth amplifier and 500MHz ADC - sampling rate is not equal to bandwidth and vice versa.
pandy71 is offline  
Old 29 January 2018, 19:55   #7
Stardust
Registered User
 
Join Date: Jun 2010
Location: UK
Posts: 72
I used the wrong settings in the Hantek6022BE software when I was measuring the Amiga A500 CPU clock. So now measuring the clock the software gives a fluctuating frequency between 7 and 7.1mhz. I can see what is half way in-between a sine wave and a square wave. This might because, like others have said, that the oscilloscope is lacking the resolution to give a fully detailed waveform.

The test circuit on the breadboard is working. If I use a 7.328mhz crystal I get what is mostly a sawtooth waveform with the software reporting a frequency of 7.328mhz. But if I swap the crystal for a 4mhz one I can see a waveform that is much more like a square wave.

I will try and compile github open source software - OpenHantek for the oscilloscope and sigrok, pulseview for the no name\Saleae clone 8 channel 24mhz logic analyzer in Debian Linux. The Windows versions of software for both the oscilloscope and logic analyzer keeps crashing in Windows 10.

Last edited by Stardust; 29 January 2018 at 20:03.
Stardust is offline  
Old 30 January 2018, 11:34   #8
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,875
There is many factors affecting waveform visible on oscilloscope screen, digital scopes (DSO) can provide false images under some conditions. Remember that in digital scopes usually interpolation ("line" that connect two points representing samples to provide picture easier to interpretations) may distort real waveform - that's why with linear interpolation may give you sawtooth/triangle look and with sinc more sine wave than rectangular square wave look even if signal is very "rectangular" - more samples lead automatically to more accurate waveform representation - that's why normally it is recommended to use at least 10 samples per period (ideally you have thousands of samples per period so no need to use any interpolation as samples are so dense that they behave like continuous not discrete signal).
Other factors involved in this are slew rate (at some point of simplification can be synonym to bandwidth) of analogue path and jitter (jitter usually affecting both i.e. source and DSO, usually jitter is uncorrelated).
You may try to reduce some limitations of your scope by using techniques well known as "sampling scopes" https://en.wikipedia.org/wiki/Oscill..._oscilloscopes and https://en.wikipedia.org/wiki/Oscill...g_oscilloscope . However i'm not sure if this is worth any significant effort if some 100MHz can relatively easy to buy especially for you living in highly developed country where normal market for used measurement equipment exist (probably not as good as United States market but anyway) - go for some decent used HP or Tektronix DSO on ebay.
pandy71 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
A500 ATX PSU Dongle problem - Video signal brightness dims during FDD access LocoSombrero support.Hardware 22 09 March 2016 02:21
A2000 Fast CPU Port - Signal Information Zetr0 support.Hardware 5 15 September 2014 17:16
Separating SCSI and CPU clock on a Cyberstorm MK3 corpsicle support.Hardware 4 19 July 2014 22:11
Custom CPU and clock frequency MagerValp support.FS-UAE 4 10 April 2013 00:09
Amiga demos on oscilloscope Lord Aga support.Demos 2 30 March 2013 15:25

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:55.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12979 seconds with 13 queries