Shop OBEX P1 Docs P2 Docs Learn Events
sx-48 timer puzzle — Parallax Forums

sx-48 timer puzzle

SawmillerSawmiller Posts: 276
edited 2006-01-16 22:58 in General Discussion
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

Comments

  • SawmillerSawmiller Posts: 276
    edited 2006-01-16 22:57
    GOT IT tongue.gif

    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]
  • SawmillerSawmiller Posts: 276
    edited 2006-01-16 22:58
    got it..

    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
Sign In or Register to comment.