Timer with external adjustment

pinkfoot

New Member
Hi
I'm a new user so don't laugh at my simple question,I am useing a 18m2 chip am looking for way to adjust onboard timer with external pot.
I have managed internal timing useing INC,am looking at READADC am I on right track-help would be much appreciated.
regards Pinkfoot.
 

Circuit

Senior Member
A big welcome, Pinkfoot, to this forum; there is a wealth of expertise on this site.
Perhaps you could expand on what you are trying to achieve; it is difficult to understand quite what you are asking. What is the project and its intended function?
 

westaust55

Moderator
As circuit indicates, more information would be good.

As a starting point for a possible solution:
Use the READADC command to obtain a reading from the external pot (itself across the PICAXE supply)
Depending on the timing range/resolution you may use either the 8 bit or 10 bit version of the READADC command.

Since you mention the INC function then an alternative may be to use the value from the READADC with some scaling as necessary to determine a value for a PAUSE command.

Do you need to have other actions keep occurring while your timing operates to permit a task/command to be actioned?
 

pinkfoot

New Member
Hi,thanks for reply I will try to be more explain with small prog:-

main:if pinb.0 = 1 and pinb.1 = 1 then
goto cut
end if
low b.2
goto main
cut:high b.2
if pinb.0 = 1 and pinb.1 = 1 then
goto cut
end if
goto main

if b.0 and b.1 are high then b.2 will stay high and if b.0 or b.1 are released then b.2 will go low that's fine, but I need a time limit on b.2 staying high
even if b.0 and b.1 are kept high.I have achieved it with INC command but can't work out how to adjust time externally,this is just a part of a larger
project.
Hope this helps, Regards
 

pinkfoot

New Member
Hi Westaust55,
Thanks for your reply I'm sure you will see my reply to" Circuit" so I need not go through it again--gobsmacked to get reply from Australia.
Thanks for your time-Regards.
 

rossko57

Senior Member
So to put it another way, you want some input conditions to start off an output for a limited time only. You want that time to be adjustable by external pot. At the end of that time, or if the input conditions change, the output is to go low.
It will help if you can describe the time frame here - milliseconds, hours, weeks? - affects the options.
 
Top