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

jgu1
Posts: 1179
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1104 times
Been thanked: 295 times
Contact:

10mS delay using Delay´s!

Postby jgu1 » Fri Apr 20, 2012 11:13 am

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

Postby Spanish_dude » Fri Apr 20, 2012 5:27 pm

Hi,

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

Nicolas

jgu1
Posts: 1179
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1104 times
Been thanked: 295 times
Contact:

Re: 10mS delay using Delay´s!

Postby jgu1 » Fri Apr 20, 2012 6:48 pm

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: 381 times
Been thanked: 720 times
Contact:

Re: 10mS delay using Delay´s!

Postby JohnCrow » Fri Apr 20, 2012 8:17 pm

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 4244 times


This is the FC5 I used

2ms test.fcf
(6.5 KiB) Downloaded 129 times


As you can see from the timing on the pulse it is actually 2 ms ± acceptable error
These users thanked the author JohnCrow for the post:
jgu1 (Fri Apr 20, 2012 8:24 pm)
Rating: 5%
 
1 in 10 people understand binary, the other one doesn't !

jgu1
Posts: 1179
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1104 times
Been thanked: 295 times
Contact:

Re: 10mS delay using Delay´s!

Postby jgu1 » Fri Apr 20, 2012 8:35 pm

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: 1179
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1104 times
Been thanked: 295 times
Contact:

Re: 10mS delay using Delay´s! SOLVED!

Postby jgu1 » Sat Apr 21, 2012 1:05 pm

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: 381 times
Been thanked: 720 times
Contact:

Re: 10mS delay using Delay´s!

Postby JohnCrow » Sat Apr 21, 2012 4:15 pm

Hi Jorgen

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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8825
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2561 times
Been thanked: 3720 times
Contact:

Re: 10mS delay using Delay´s!

Postby medelec35 » Sun Apr 22, 2012 10:42 am

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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 381 times
Been thanked: 720 times
Contact:

Re: 10mS delay using Delay´s!

Postby JohnCrow » Sun Apr 22, 2012 11:30 am

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 !

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8825
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2561 times
Been thanked: 3720 times
Contact:

Re: 10mS delay using Delay´s!

Postby medelec35 » Sun Apr 22, 2012 4:32 pm

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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 381 times
Been thanked: 720 times
Contact:

Re: 10mS delay using Delay´s!

Postby JohnCrow » Sun Apr 22, 2012 6:46 pm

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 !

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8825
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2561 times
Been thanked: 3720 times
Contact:

Re: 10mS delay using Delay´s!

Postby medelec35 » Sun Apr 22, 2012 6:58 pm

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.
These users thanked the author medelec35 for the post:
JohnCrow (Sun Apr 22, 2012 7:19 pm)
Rating: 5%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 381 times
Been thanked: 720 times
Contact:

Re: 10mS delay using Delay´s!

Postby JohnCrow » Sun Apr 22, 2012 7:19 pm

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 !