I am using a 12f675 and the read write commands and is doesnt seem consistant the way that they work.
At the beginning of the program I use the following to grab the values.
Code:
read 0, delay
read 8, rpm.byte0
read 10, rpm.byte1
In the program I use the following to set the delay.
Code:
REWRITED:
write 0, delay
read 0, delayc
if DELAY <> DELAYC then goto rewrited
And the following code to set the RPM
Code:
PULSIN gpio.2,0,RPM
LIMIT = RPM
IF gpio.3 = 1 THEN GOTO CHANGE
REWRITER:
write 8, limit.byte0
write 10, limit.byte1
read 8, limit.byte0
read 10, limit.byte1
if limit <> rpm then goto rewriter
The delay in ms works ever time and keeps the setting even after power off.
The rpm work speratically.
Any ideas?
Bookmarks