Shop OBEX P1 Docs P2 Docs Learn Events
setting !option for a watchdog in an sxB program — Parallax Forums

setting !option for a watchdog in an sxB program

nick bernardnick bernard Posts: 329
edited 2006-07-17 15:36 in General Discussion
i've never used a watchdog timer before and i'm having trouble
this snippet is giving me compilation errors in the src file. any help?

program is attached

thanks guys
nick

'Watchdog prescale
\ setb !option.3
\ setb !option.2
\ clrb !option.1
\ clrb !option.0

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]

Comments

  • nick bernardnick bernard Posts: 329
    edited 2006-07-17 14:51
    'Watchdog prescale
    OPTION = %1111_1100

    is this sxB line equivalent?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]
  • BeanBean Posts: 8,129
    edited 2006-07-17 15:23
    Nick,
    · You cannot set the option register bit-by-bit.
    · You need to set the whole thing at once, like you did in the second post.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "I'm a man, but I can change, if I have to, I guess" The Red Green Show
    ·
  • nick bernardnick bernard Posts: 329
    edited 2006-07-17 15:36
    thanks bean!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]
Sign In or Register to comment.