Shop OBEX P1 Docs P2 Docs Learn Events
Looking for a software reboot/reset method in SXB? — Parallax Forums

Looking for a software reboot/reset method in SXB?

T&E EngineerT&E Engineer Posts: 1,396
edited 2008-12-02 20:17 in General Discussion
Is there a way to cause a reset of·an SX48 or SX28 without physically pressing the reset pushbutton (e.g. /MCLR goes Low)? I have an SX48 with a keypad and LCD and want to use one of the unused keys to cause a reset on the board using the keypad (and not just using a longer wired parallel pushbutton reset switch). The SX48 is also a master for 1 of many SX28 slave boards. I wrote some code to basically TX a LOW to a pin that is wired to /MCLR on the SX28 slave unit which kind of works but don't know if this is the right way to accomplish this or is there a better approach to doing this.·

Comments

  • BeanBean Posts: 8,129
    edited 2008-11-25 13:06
    An output pin tied to /MCLR should do it.
    Upon reset all I/O are set to input mode, so that should allow the SX to startup okay.
    Make sure you still include the 10K pullup on /MCLR.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2008-11-25 13:11
    Thanks Bean. That's how I currently have it on my proto boards (10K on /MCLR) - However, there is no /MCLR access on my Professional Development Board.

    I just wanted to make sure that was a good method to send a low

    (or basically this: First set RA.1 HIGH and then just PULSOUT RA.1, 255)


    RA.1 is wired to /MCLR on the proto board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Smykowski: Well-well look. I already told you: I deal with the customers so the engineers don't have to. I have people skills; I am good at dealing with people. Can't you understand that? What is wrong with you people?
  • JonnyMacJonnyMac Posts: 9,214
    edited 2008-11-25 15:50
    The MCLR pin is connected to the reset button (just to the left of the LEDs) -- the sockets are marked "RESET"
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2008-11-25 15:57
    Thank you JonnyMac. I did already see this on the schematics for the Professional Development Board as well as the SX28 proto board.
  • VonSzarvasVonSzarvas Posts: 3,526
    edited 2008-12-02 20:13
    For a "software only" solution, you could make use of the watchdog feature. Force the sxb code into an endless loop when the keypad is pressed. Once the time spent in the endless loop passes the configured watchdog timeout, the sx chip will reboot. No external pin or connection to MCLR required !
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2008-12-02 20:17
    Thanks Maxwin. However, I have the I/O to spare and went with Beans approach to just tie an output pin to /MCLR. That worked fine as long as I did not declare the pin (e.g. PIN Rx OUTPUT ...). Otherwise, it would lockup probably because of the SX restarting with all pins as INPUTS. This made sense to me not to use a PIN OUTPUT command.
Sign In or Register to comment.