Variable Not Responding
Yeah I finally got a prop [noparse]:)[/noparse]
I have been playing around with spin with a bunch of quick success. Part of getting down to the nitty gritty is with the weird issue I am having. The solution to the problem is probably simple but still no sucess after messing around trying to get it to work.
I am trying to pass a fraction parameter to the LED blink method but it only wants to pass integers for some reason.
I have been playing around with spin with a bunch of quick success. Part of getting down to the nitty gritty is with the weird issue I am having. The solution to the problem is probably simple but still no sucess after messing around trying to get it to work.
CON
_xinfreq = 5_000_000
_clkmode = xtal1 + pll16x
PUB Main
dira[noparse][[/noparse]0..3] := %1111
LEDBlink(0, 1/4)
PUB LEDBlink(pin, freq)
repeat
outa[noparse][[/noparse]pin] := 1
waitcnt((clkfreq * freq) + cnt)
outa[noparse][[/noparse]pin] := 0
waitcnt((clkfreq * freq) + cnt)
I am trying to pass a fraction parameter to the LED blink method but it only wants to pass integers for some reason.

Comments
PUB Main dira[noparse][[/noparse]0..3] := %1111 LEDBlink(0, 25) PUB LEDBlink(pin, freq) repeat outa[noparse][[/noparse]pin] := 1 waitcnt((clkfreq / 100 * freq) + cnt) outa[noparse][[/noparse]pin] := 0 waitcnt((clkfreq / 100 * freq) + cnt)