10mS delay using Delay´s!

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

10mS delay using Delay´s!

Post by jgu1 »

Hi!

Need a litlle help from my friend´s! :D

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

Spanish_dude
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!

Post by Spanish_dude »

Hi,

What's your oscillator frequency ?
Have you set your oscillator frequency in the project options correctly ?

Nicolas

jgu1
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!

Post by jgu1 »

Hi Nicolas! :D

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

User avatar
JohnCrow
Valued Contributor
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!

Post by JohnCrow »

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
pod 2ms.jpg
pod 2ms.jpg (153.13 KiB) Viewed 7443 times
This is the FC5 I used
2ms test.fcf
(6.5 KiB) Downloaded 259 times
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 !

jgu1
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!

Post by jgu1 »

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

jgu1
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!

Post by jgu1 »

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 :D . Cuold not beleive it was FC.

Thanks to all and especially to you John.

Have a nice week-end

Jorgen

User avatar
JohnCrow
Valued Contributor
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!

Post by JohnCrow »

Hi Jorgen

Thats ok these things do happen
1 in 10 people understand binary, the other one doesn't !

medelec35
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!

Post by medelec35 »

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 :cry:

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

User avatar
JohnCrow
Valued Contributor
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!

Post by JohnCrow »

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).
1 in 10 people understand binary, the other one doesn't !

medelec35
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!

Post by medelec35 »

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.
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.
But that's still a good point you made.
JohnCrow 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).
Not bad at all for £280
Martin

User avatar
JohnCrow
Valued Contributor
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!

Post by JohnCrow »

Hi Martin

This is the output of the programmer (in a loop) sending "Hello" @1200 baud 8 data bits.
Hello-2.jpg
(191.64 KiB) Downloaded 1569 times

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 !

medelec35
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!

Post by medelec35 »

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.
Martin

User avatar
JohnCrow
Valued Contributor
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!

Post by JohnCrow »

Just tried that
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 !

Post Reply