sx-48 timer puzzle
Sawmiller
Posts: 276
hi guys,
time for another eye to look at my code... i'm stumped
what i have is a sx48 proto board with a rs-422 chip on it sending and reciving signals to a magnostrictive linear position sensor...which sends a magnetic pulse out a rod to a movable magnet,interacts with the field and returns, thus giving me a timed pulse on RB.4 to measure
now the hard part..
it will read the position of themovable magnet the first time thru and report it to my lcd, but after that it will keep reporting the same time delay, even it i move the magnet..
however if i press the reset button, it will then give me another reading, which seems to be logical..
i want it to change the reading when it looks at the capture registers again.
it seems as if it will not change the cap registers the second or third time thru , unless its reset with the reset button...
what am i missing ? tried doing a jmp $FFF just to test, but that did not work....
heres the code
thanks for any and all pointers
time for another eye to look at my code... i'm stumped
what i have is a sx48 proto board with a rs-422 chip on it sending and reciving signals to a magnostrictive linear position sensor...which sends a magnetic pulse out a rod to a movable magnet,interacts with the field and returns, thus giving me a timed pulse on RB.4 to measure
now the hard part..
it will read the position of themovable magnet the first time thru and report it to my lcd, but after that it will keep reporting the same time delay, even it i move the magnet..
however if i press the reset button, it will then give me another reading, which seems to be logical..
i want it to change the reading when it looks at the capture registers again.
it seems as if it will not change the cap registers the second or third time thru , unless its reset with the reset button...
what am i missing ? tried doing a jmp $FFF just to test, but that did not work....
heres the code
thanks for any and all pointers
SXB
8K
Comments
after meesing around all day , finally got it to work by putting
·TRIS_B· = %11111110· ' **** why do it do what it do
·output query
after i get the timer capture numbers......
no idea why that works , but it does.. now on to subtract and divide 16 bit numbers....
bean was right, will have lots o resolution on this thing , looks like ( by using a calc )
1/256th of a inch.... or so [noparse]:)[/noparse]
had to put
·TRIS_B· = %11111110· ' **** why do it do what it do
·output query
after i got the timer capture numbers, dont know why it works, but it seems to
dan