Basic - how long is pin high?

Bryang

Member
Hi,
I know this should be dead simple, but I just cannot get it to work, and searching thru the forum has just got me further lost, so, help!

I have an 08M in effect watching for various sequence of events from different inputs, and when a certain sequence matches (this could be many minutes to occur), it puts an output high, until a particular second combination of events happens, then switches the output pin low again - the high period is always <0.6 seconds....This all works fine:)

Then, I have a18X sitting watching for an input pin (input 6 actually) to go high from the 08M output pin, and when it does, I want it to capture the time period the input pin is high, then display the time period on an LCD, and do other stuff. Simple! The LCD display & other stuff seems to work ok, but I cannot suss out capturing the high period!!!


I have this code...

look_for_trigger:
pulsin 6,1,w6 'when IN-6 goes high, capture time period into variable w6
if w6=0 then look_for_trigger
goto calculate

what am I missing?
 

inglewoodpete

Senior Member
Or a software issue....

An 08M only has input pins 1, 2, 3 & 4. Bryang, pins are virtual hardware addresses. Refer to Manual 1 "Getting Started", page 22, I think. One of those would be physical leg 6.

It's good to see that Technical is human too ;)
 

Dippy

Moderator
"Then, I have a18X sitting watching for an input pin (input 6 actually) to go high from the 08M output pin..."

- it's good to see that IPete is human too.... :)
 

Bryang

Member
Problem solved:)

Thanks guys it turned out to be an obvious error after all, thanks to Tech, I went back to basics with the circuit rather than assuming it was my coding as I had been for a couple of evenings.... and IPete was also in the right direction.... I had wired Pin-3 on the 08M for the output!!!! Thanks again - Now I can get onto the next challenge:)
 

Dippy

Moderator
It's OK Pete, you can put the glass down now. Your crystal decanters were obviously working better than my crystal balls.
 
Last edited:
Top