10mS delay using Delay´s!
Moderator: Benj
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
10mS delay using Delay´s!
Hi!
Need a litlle help from my friend´s!
I have made this simple program. When I use a 10mS delay I measure 5mS on my scope. It look´s like, that in the real world the delay is only the half of FC. The same is if I set the delay (as in the att. program) 2mS I get 1mS.
I have tested the same program in a 12f675 and in a 16f88 with Xtal, but same result.
Am I misunderstood something
Best regard
Jorgen
Need a litlle help from my friend´s!
I have made this simple program. When I use a 10mS delay I measure 5mS on my scope. It look´s like, that in the real world the delay is only the half of FC. The same is if I set the delay (as in the att. program) 2mS I get 1mS.
I have tested the same program in a 12f675 and in a 16f88 with Xtal, but same result.
Am I misunderstood something
Best regard
Jorgen
- Attachments
-
- 10mS.fcf
- (12.5 KiB) Downloaded 253 times
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
Re: 10mS delay using Delay´s!
Hi,
What's your oscillator frequency ?
Have you set your oscillator frequency in the project options correctly ?
Nicolas
What's your oscillator frequency ?
Have you set your oscillator frequency in the project options correctly ?
Nicolas
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: 10mS delay using Delay´s!
Hi Nicolas!
I use the internal oscillator and set the frq on 4Mhz. you can see it in the configuration for the chip in the att file.
Even if I try on a pic16f88 and use external osc. Xtal 19066Mhz I get the same result
Hope you can see something.
Thank´s in advance
Jorgen
I use the internal oscillator and set the frq on 4Mhz. you can see it in the configuration for the chip in the att file.
Even if I try on a pic16f88 and use external osc. Xtal 19066Mhz I get the same result
Hope you can see something.
Thank´s in advance
Jorgen
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: 10mS delay using Delay´s!
Hi Just tried your attached program on a pic 16F88 with the standard 19.6608MHz crystal
This is the timing I get on the EB070 Test pod
This is the FC5 I used
As you can see from the timing on the pulse it is actually 2 ms ± acceptable error
This is the timing I get on the EB070 Test pod
This is the FC5 I used
As you can see from the timing on the pulse it is actually 2 ms ± acceptable error
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: 10mS delay using Delay´s!
Hi John!
Thank´s for your care. Strange?????
I have even also tested with 16f88 and xtal 19066mhz.
Ok first I tried with 10mS thats why the name is 10mS delay during test I change the delay. I can see by you it´s very fine. But by me it´s only the half time of the value.
By me: if I set the delay on 2mS I see 1mS on the scoope and 20mS > 10mS onthe scoope. Do you have any idea what i am doing wrong?
Tomorrow I will test your att. program with same Pic and osc. again, and you will get a reply.
Best regard
Jorgen
Thank´s for your care. Strange?????
I have even also tested with 16f88 and xtal 19066mhz.
Ok first I tried with 10mS thats why the name is 10mS delay during test I change the delay. I can see by you it´s very fine. But by me it´s only the half time of the value.
By me: if I set the delay on 2mS I see 1mS on the scoope and 20mS > 10mS onthe scoope. Do you have any idea what i am doing wrong?
Tomorrow I will test your att. program with same Pic and osc. again, and you will get a reply.
Best regard
Jorgen
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: 10mS delay using Delay´s! SOLVED!
Hi all!
The error is found, I am sorry many times.
It was my old Philips scoop that had the error, it shoows exactly the half of the time . I tested with a another and newer scoop and of course fit the timing, 2mS from FC (pic) is now also 2mS on my scoop.
I regret and apologize for any inconvenience for anyone who has spent time on it. But now I'm happy again . Cuold not beleive it was FC.
Thanks to all and especially to you John.
Have a nice week-end
Jorgen
The error is found, I am sorry many times.
It was my old Philips scoop that had the error, it shoows exactly the half of the time . I tested with a another and newer scoop and of course fit the timing, 2mS from FC (pic) is now also 2mS on my scoop.
I regret and apologize for any inconvenience for anyone who has spent time on it. But now I'm happy again . Cuold not beleive it was FC.
Thanks to all and especially to you John.
Have a nice week-end
Jorgen
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: 10mS delay using Delay´s!
Hi Jorgen
Thats ok these things do happen
Thats ok these things do happen
1 in 10 people understand binary, the other one doesn't !
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: 10mS delay using Delay´s!
Hi John,
that EB070 Test pod looks a great piece of kit!
Wish I had got one now, as my scope does not feel too well on one channel
Does it display a baud rate of 232 signals as well?
It's not a big deal if does not since it measures pulse duration, so baud can be calculated from that.
that EB070 Test pod looks a great piece of kit!
Wish I had got one now, as my scope does not feel too well on one channel
Does it display a baud rate of 232 signals as well?
It's not a big deal if does not since it measures pulse duration, so baud can be calculated from that.
Martin
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: 10mS delay using Delay´s!
Hi Martin
The EB070 connects to the EB006 programmer, so you would be able to see the data going to the RS232 board. Im not sure about connecting it to the output of as RS232 signal as it can go negative, and above 5V, which could damage the unit.
But it is a nice piece of kit.
I'm thinking of getting a 50 MHz Rigol oscilloscope in the near future as these are quite reasonably priced. (I dont personally like the USB type that plug into the PC, though they are nice and compact).
The EB070 connects to the EB006 programmer, so you would be able to see the data going to the RS232 board. Im not sure about connecting it to the output of as RS232 signal as it can go negative, and above 5V, which could damage the unit.
But it is a nice piece of kit.
I'm thinking of getting a 50 MHz Rigol oscilloscope in the near future as these are quite reasonably priced. (I dont personally like the USB type that plug into the PC, though they are nice and compact).
1 in 10 people understand binary, the other one doesn't !
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: 10mS delay using Delay´s!
Yes it the 5V TTL voltage levels I was thinking of thats between o/p of micorcontroller and i/p to UART to USB converter. If connected to actual RS232, then would need diodes to prevent negative going signals.JohnCrow wrote: The EB070 connects to the EB006 programmer, so you would be able to see the data going to the RS232 board. Im not sure about connecting it to the output of as RS232 signal as it can go negative, and above 5V, which could damage the unit.
But that's still a good point you made.
Not bad at all for £280JohnCrow wrote: I'm thinking of getting a 50 MHz Rigol oscilloscope in the near future as these are quite reasonably priced. (I dont personally like the USB type that plug into the PC, though they are nice and compact).
Martin
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: 10mS delay using Delay´s!
Hi Martin
This is the output of the programmer (in a loop) sending "Hello" @1200 baud 8 data bits.
What Ive found is you can save the sampled waveform, and load it into the signal generator software and send it back to the PIC
Ive just recorded the output form a RC5 remote control to the eblock plugged in the output of the pod.
Played it back via the POD and and got the same display on the LCD as if Id pointed the remote at the system.
This is the output of the programmer (in a loop) sending "Hello" @1200 baud 8 data bits.
What Ive found is you can save the sampled waveform, and load it into the signal generator software and send it back to the PIC
Ive just recorded the output form a RC5 remote control to the eblock plugged in the output of the pod.
Played it back via the POD and and got the same display on the LCD as if Id pointed the remote at the system.
1 in 10 people understand binary, the other one doesn't !
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: 10mS delay using Delay´s!
Hi John,
to determine the baud rate I just send the letter U
Must be upper case.
You can send data after the U.
Then the baud rate is the time duration of the 1/1st negative going pulse time duration.
But I do like the way the time duration is constantly shown at the top.
With my scope, I set it up show it's in single shot mode.
What your doing RC5 sounds interesting.
to determine the baud rate I just send the letter U
Must be upper case.
You can send data after the U.
Then the baud rate is the time duration of the 1/1st negative going pulse time duration.
But I do like the way the time duration is constantly shown at the top.
With my scope, I set it up show it's in single shot mode.
What your doing RC5 sounds interesting.
Martin
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: 10mS delay using Delay´s!
Just tried that
Works all the way up to 38400 baud
The more I play with this the more I like it
Works all the way up to 38400 baud
The more I play with this the more I like it
1 in 10 people understand binary, the other one doesn't !