![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi All, Really pleased, I got a digital oscilloscope for xmas. Today was the first day I got round to actually using it, and I wanted to test that it was working ok. The first test I thought of was to write a little program for my microcontroller that toggles a port (high\low) and measure the frequency of it. The MicroController in question uses the internal oscillator at 8Mhz, which equates to 2MIPS. The program which loops constantly uses 6 cycles on each iteration. 2,000,000 (MIPS) divided by 6 cycles = 333.33Khz. My scope measures a frequency of 335.2Khz, just under 1.9Khz higher than the calculated value (over .5 percent higher). Is this an acceptable difference? is my scope at fault? or the internal oscillator of the PIC? Thanks in advance. Mark | |
| |
| | (permalink) |
| I always blame the PIC... | |
| |
| | (permalink) |
| At least for AVR, the internal oscillator is from an RC oscillator, and as such is somewhat temperature dependent. In the datasheets it states that you can expect a range of 7.7-8.1MHz clock source for an 8MHz internal clock. Completely normal. Use Crystals if you ever need a perfect clock source. | |
| |
| | (permalink) |
| The tolerance if fine. The error is probably a mixture of the scope's tolerance and the PIC's. Does your scope have a frequency counter function? A frequency counter is a lot more accurate than counting the squares on the scope.
__________________ I also post at the following sites: http://www.stop-microsoft.org http://www.heated-debates.com Screen name: Aloone_Jonez | |
| |
| | (permalink) |
| If you are using a Microchip design, the OSCCAL register can be used to adjust the internal RC frequency. See: http://ww1.microchip.com/downloads/e...Doc/31002a.pdf John | |
| |
| | (permalink) |
| Totally within the spec range for on-chip uC oscillators. Your scope sounds fine. Enjoy it! I have to buy myself one as a belated giftmas present this year since Santa didn't bring one. | |
| |
| | (permalink) |
| My 'scope is about 44 years old. I made it as a kit and it still works fine today. I souped it up a little over the years.
__________________ Uncle $crooge | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| UTMonkey your Junebug has a 30KHz test mode, it's fairly accurate as the Junebug (PICkit2) is crystal controlled. Access the troubleshoot mode from the standalone software. | |
| |
| | (permalink) |
| A 555 timer is always a trusty way to generate the target frequency. My flyback transformer 555 timer generates a waveform of 25kHZ, but it looks really bad Good ol 555 timer! | |
| |
| | (permalink) |
| Enjoy your o-scope. It is a real necessity for serious study and repair. Most modern scopes need to run a calibration routine when first out of the box. Mine does it with all probes removed. It takes a minute or more, depending on the make and model. Mine warns that this needs to be done if the temeperature changes by 5deg Centigrade. And, of course, the probes must be adjusted for each channel. Happy holidays! kenjj
__________________ All my pencils *used* to have erasers! | |
| |
| | (permalink) |
| Thanks Guys, the scope is a digital one. I did ask in a previous thread which ones to look for and got some good feedback. At the end of the day, I let my wife choose the model (its true!) - let's just say she went for the "practical" option, i'll let you decide what that means.... Anyway it looks great, and I am sort of getting the hang of it, you are all correct however - it definitely opens everything up - should have had one of these years ago instead of picking up (and putting down) electronics books. BlueRoom - What software for PicKit2 are you referring to? Thanks All Mark | |
| |
| | (permalink) |
| What make and model is it then?. And if I need access to a digital scope I know where to come! | |
| |
| | (permalink) |
| "A 555 timer is always a trusty way to generate the target frequency." Just like an airplane is always a trusty way to travel .... unless your pilot is a bus driver who's never seen the inside of a cockpit before! (No intentional insult to bus drivers here.) The 555 has very little to with the accuracy and precision of the "target frequency". The weakest link in a 555 circuit is the timing capacitor, not only the value, but the tolerance and temperature coefficient. The timing resistor(s) are almost secondary to that even. If I want an accurate frequency, the 555 is one of my last choices. I'd use the output of a crappy analog signal generator or function generator before that! A simple crystal oscillator has accuracy that is magnitudes more accurate that any RC-based generator such as one based upon a 555. Dean
__________________ Dean Huster, Electronics Curmudgeon Contributing Editor emeritus, "Q & A", of the former "Poptronics" magazine (formerly "Popular Electronics" and "Electronics Now" magazines). R.I.P. | |
| |
| | (permalink) |
| A CMOS watch crystal oscillator running at 32.768kHz is often the best way of calubrating a scope. In fact, what I normally do is set my function generator to a know frequency using my frequency counter which I hopt uses a quatz crystal for timing, then use it to test the scope.
__________________ I also post at the following sites: http://www.stop-microsoft.org http://www.heated-debates.com Screen name: Aloone_Jonez | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| The Oscilloscope | ElectroMaster | Electronic Theory | 12 | 3rd February 2008 02:45 PM |
| Using Oscilloscopes | mechie | Electronic Theory | 9 | 29th November 2007 10:49 PM |
| Digital and analog oscilloscope | patroclus | General Electronics Chat | 34 | 12th July 2006 03:34 AM |
| Oscilloscope DL1620/DL1640/DL1640L | tkvenki | General Electronics Chat | 0 | 10th January 2006 01:37 PM |
| buy DSO Oscilloscope | peterpeter | General Electronics Chat | 4 | 21st November 2002 06:36 PM |