USB watchdog timer


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2010
    Posts
    5

    Default USB watchdog timer

    Hi All,

    looking to make a USB watchdog timer. ie PIC circuit connected via USB (I know the new chips have USB support) and software running on PC. software on PC sends 'something' every 30 seconds etc. PIC is monitoring, looking for these keepalives. if Keepalive no received in 60 minutes then drop power relay pin to reboot PC - simple.

    I see there are some USB commands in PICBASIC - but has anyone used them to do anything like I'm talking about there - could it be done in PICBASIC (without ASY code)

    this is pretty close to what I'm looking for : http://www.j-works.com/wdt284.php

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    I know you asked not in assembly code ... but ....

    You might be interested in an article from Nuts and Volts magazine August 2010 on page 39, called the WatchPuppy. It does pretty much just what you are talking about, and uses a pic chip 16f873 and a UM232R usb to serial converter.

    I'm sure it is covered in copyright protection, so I can't attach the article. You would have to find the magazine.

    But here is the code:
    http://radiosky.com/WatchPuppy/
    Last edited by ScaleRobotics; - 11th September 2010 at 02:30.
    http://www.scalerobotics.com

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Why not just increment a VAR with a timer. When a Keep Alive is received the VAR drops back to zero. If the VAR reaches "X" then re-boot.

    No ASM if PBP interrupts are used.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Sep 2010
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    yes that's the basic idea in the code. the core code like that seems to be the easy part - how are you going to;

    1. listen to a USB port for certain event? what will the event look like, what will the PICBASIC code look like?

    2. Write a program in Windows(7) that does the PC side of sending that 'event' down the USB cable which ultimately resets the watchdog timer etc.

  5. #5
    Join Date
    Sep 2010
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    You might be interested in an article from Nuts and Volts magazine August 2010 on page 39, called the WatchPuppy. It does pretty much just what you are talking about, and uses a pic chip 16f873 and a UM232R usb to serial converter.
    thanks! you forced me to subscribe.. but that's probably a good thing anyways.

    it looks ideal. ie the article you refer to.

    But, in the spirit of invention.. does anyone know how to make one in PIC basic.. I guess I just like the idea of building it myself :-)

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    This might help you out.
    http://www.picbasic.co.uk/forum/cont...ns-for-Dummies!

    USBIN on the MCU side. A simple program on the PC to send data.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Sep 2010
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    This might help you out.
    http://www.picbasic.co.uk/forum/cont...ns-for-Dummies!

    USBIN on the MCU side. A simple program on the PC to send data.
    that's a great little article! .. I think I need to learn VB to write a small app that sends something down the COM port ...

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Here just happens to be a thread on VB and serial running.

    Might find everything you need. One stop shop.

    Let us know how it goes. Intersting project.
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Sep 2010
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Here just happens to be a thread on VB and serial running.
    ?? where :-)

  10. #10
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    http://www.picbasic.co.uk/forum/showthread.php?t=13609

    Sorry , that is the second time I did that today.
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts