new guy here,
I have an 18x chip and simply trying to count high pulses coming into Input #0 generated by a magnetic reed switch closure at a very slow rate of speed. (I assume that high means +5v, and low means 0v)
I seem to be having a problem with the following code
I never see the interrupt! Does it have to do with my blocking using a SerIn command?
Modified code to interrupt on low, but with same results.
Any ideas what I am doing wrong?
thanks,
Dan
I have an 18x chip and simply trying to count high pulses coming into Input #0 generated by a magnetic reed switch closure at a very slow rate of speed. (I assume that high means +5v, and low means 0v)
I seem to be having a problem with the following code
Code:
w1 = 0
SerInt 1,1
Top:
SerIn 1, N4800, b0
If b0 = "P" Then GoTo SendCount
SerOut 4, N4800, ("?", 0x0d, 0x0a)
GoTo Top
SendCount:
SetInt OFF
w2 = w1 + 65
w1 = 0
SetInt 1,1
SerOut 4, N4800, ("<P>", w2, "</P?, 0x0d, 0x0a)
GoTo Top
interrupt:
w1 = w1 + 1
SetInt 1,1
return
Modified code to interrupt on low, but with same results.
Any ideas what I am doing wrong?
thanks,
Dan