Please,
Is it possible use delay icon to delay output change after the triger event (set or reset LED, relay = function TON or TOF) without slowing program execution speed?
Microcontroller PIC 16F887, FC7.
Dealay on output PIC16F887
Moderator: Benj
-
- 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: Dealay on output PIC16F887
You could use a timer interrupt for a delay instead of a delay icon?
What delay time are you thinking of?
Take a look at this post.
If you get stuck then post your flowchart for further help.
Martin
What delay time are you thinking of?
Take a look at this post.
If you get stuck then post your flowchart for further help.
Martin
Martin
Re: Dealay on output PIC16F887
Martin, this is still a big task for me.
Change the voltage in range 0-5V at input RA0 illuminate LED1-20. I attach a flowchart.
In case of a rapid change of the voltage on RA0, the light from the LED may not be visible. That's why I want to deactivate every diode with delay by approx. 200ms.
That means using 20x delays before each TurnOff component.
During a delay, the user program is not running. Short voltage pulses will not be displayed.
Thank you.
Marian
Change the voltage in range 0-5V at input RA0 illuminate LED1-20. I attach a flowchart.
In case of a rapid change of the voltage on RA0, the light from the LED may not be visible. That's why I want to deactivate every diode with delay by approx. 200ms.
That means using 20x delays before each TurnOff component.
During a delay, the user program is not running. Short voltage pulses will not be displayed.
Thank you.
Marian
- Attachments
-
- C1MS1701SW170523.fcfx
- (36.68 KiB) Downloaded 192 times
-
- 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: Dealay on output PIC16F887
Hi Marian,
Hopefully this should work (untested on hardware) the way you want it to.
Martin.
Hopefully this should work (untested on hardware) the way you want it to.
Martin.
- Attachments
-
- C1MS1701SW170525.fcfx
- (47.68 KiB) Downloaded 178 times
Martin
-
- 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: Dealay on output PIC16F887
Your welcome.
Can you let us know it it works the way its intended to please.
Martin
Can you let us know it it works the way its intended to please.
Martin
Martin
Re: Dealay on output PIC16F887
Martin. It seems to work well. With rapid change of voltage at RA0 input, the LEDs will turn on quickly and will go out with a short delay.
I have to study the program from you to understand how it works.
A few years ago I bought Flovcode V5. Something I have programmed for PIC 8 bit, but I have not worked with him yet. I am now testing the new version of Flowcode V7.
In the meantime, I have been working on industrial PLCs in structured text and lader diagrams. That's why in Flowcode 7 I was intuitively looking for the TON, TOF timer icon so, that the delay is related only to the selected event (output changes) and did not slow the execution of the program.
Thank you Martin.
Marian
I have to study the program from you to understand how it works.
A few years ago I bought Flovcode V5. Something I have programmed for PIC 8 bit, but I have not worked with him yet. I am now testing the new version of Flowcode V7.
In the meantime, I have been working on industrial PLCs in structured text and lader diagrams. That's why in Flowcode 7 I was intuitively looking for the TON, TOF timer icon so, that the delay is related only to the selected event (output changes) and did not slow the execution of the program.
Thank you Martin.
Marian
-
- 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: Dealay on output PIC16F887
Glad it's working for you.
Thanks for letting me know
If you get stuck with working out how it works, I can assist you further.
Martin
Thanks for letting me know
If you get stuck with working out how it works, I can assist you further.
Martin
Martin