[Solved] Oscilliscope, how to measure the time of a pulse from a pic 16f88. - Page 1
Forum section: electronics / beginners

author: Teza
author_rank: Contributor
timestamp: October 08, 2017, 02:39:37 pm
content: I have set up a pic 16F88 on a breadboard, and have programmed it to flash a led for 500ms every second.To find out if I have done this correctly, I would like to measure this on my agilent DSOX2024A (MSO enabled) oscilloscope.I have never learned how to use this oscilloscope, but have played with it today and got the following screenshot:Anyone that can point me in the correct direction to solve this?

author: ataradov
author_rank: Super Contributor
timestamp: October 08, 2017, 05:55:39 pm
content: Well, it says on the right DX = +20 ms.But assuming you want it to toggle every 500 ms, you can just judge it using your eyes. Does it blink at this rate?

author: Teza
author_rank: Contributor
timestamp: October 08, 2017, 06:57:15 pm
content: Not so important how fast it is blinking, it is for learning purpose only.The visual blinking looks correct, ~1/2 second on and ~1/2 second off, but I am trying to learn how to measure it.I don't understand the values I got on my oscilloscope, and I believe I am not using it correct.(The pic uses the internal oscillator at 4MHz, if I have understood it correctly this give an instruction cycle of 1 MHz, if this info is needed)Short story: I try to find out the correct way to connect the scope and get the correct measurements.

author: ataradov
author_rank: Super Contributor
timestamp: October 08, 2017, 07:01:15 pm
content: Quote from: Teza on October 08, 2017, 06:57:15 pmIt is actually very important. Now we know that whatever is shows on the scope clearly way off from what you see in a real world.Given 50 Hz signal, I assume you are observing the mains interference somehow.Well, actually your trace is marked D0, which is a digital channel. So you do observe 50 Hz interference on a digital channel.Press a button that corresponds to the channel you have your devices connected to. Or just press Auto button to get to some sort of a known state.

author: Teza
author_rank: Contributor
timestamp: October 08, 2017, 07:34:01 pm
content: I tried again, using scope channel 1 instead, and got something that looked more correctly.The power supply say 4,96V, and I have read that the internal oscillator if the pic is not the most accurate.So 1 cycle is 1,23 S and the led will light for ~610 ms.Thanks!But should I not get this result when using the D0 channel?EDIT:Got it!So to use the D0 to D7 channels, one of the channel 1-4 must be connectet to the circuit so the scope get enough information?

author: ataradov
author_rank: Super Contributor
timestamp: October 08, 2017, 09:31:55 pm
content: Quote from: Teza on October 08, 2017, 07:34:01 pmNo, digital and analog channels are completely independent.If your digital inputs are not connected to anything, then you are just observing interference. They must be high impedance input, so if you don't feed anything into them, they will act as tiny antennas.

author: danadak
author_rank: Super Contributor
timestamp: October 08, 2017, 10:48:48 pm
content: Page 182 of the manual shows the automated measurements you can make w/o cursoruse.Regards, Dana.

author: Teza
author_rank: Contributor
timestamp: October 09, 2017, 03:22:13 pm
content: Thanks, did not even think looking for a manual (male syndrome?).Have just start to use the built in learning module.