Resetting a slave from master mcu


+ Reply to Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    I ended up with this design, using tri-state pin on master to reset all the slaves when required. This will not be used for programming the slaves, only resets.

    Name:  Slave MCLR from master TRI-STATE.png
Views: 1140
Size:  42.0 KB


    It's simple, uses a single general I/O pin on master, and no extra components on slaves.

    I include that 100R res on slaves "just in case" I need them one day with my Pik-Kit.


    EDIT: For those that want to ICSP as well, look at the SN7407, and thank Mr E for the info (master on Input A, slave on Output Y)
    Last edited by Demon; - 31st May 2024 at 21:49.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    What drives the MCLR pin of the slaves? A PIC output?

    I am asking, because the MCLR pin needs a level of 0,2*Vdd to see LOW (for the 16F177x series, but I guess it is the same for others).

    It depends on output characteristics if you are within limits of the MCLR. So be sure that what you think as low is actually sensed as low on the MCLR pins.

    Ioannis

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    you could do in software..... send out to one or all listeners a command to goto a restart routine like.... which "provides a way to execute a MCLR in software"
    ,
    ,
    ,
    restarting:
    @ RESET

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    Quote Originally Posted by amgen View Post
    you could do in software..... send out to one or all listeners a command to goto a restart routine like.... which "provides a way to execute a MCLR in software"
    ,
    ,
    ,
    restarting:
    @ RESET

    But will that work if the slave is caught in a loop or some such?

    I'm aiming for a complete reset with no decision from the slave.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    But will that work if the slave is caught in a loop or some such?

    I'm aiming for a complete reset with no decision from the slave.
    could do.........
    1)
    '
    restarting:
    pause 1000 ............... wait a second or 2 to reset all
    @ RESET
    '
    or 2)................
    if all slaves are on same 5 or 3 volt supply, then use a small NC (normally closed) relay to turn off power for few seconds to restart all slaves

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Lightbulb Re: Resetting a slave from master mcu

    I figured out an easier way to MCLR a PIC from another; a simple diode.

    Name:  MCLR slaves from master.png
Views: 1029
Size:  20.2 KB


    I was fixated on that darn pull-up to VDD:

    - pull-down MCLR on Slave.
    - 1N4001 diode from GP pin on Master.
    - 100R towards ICSP.

    And that's it. I just tested it, and there's never more than 5V on Master-side of diode.

    I can't believe it was so simple.


    I have one last test to do; check how much current is running from Master.

    EDIT: I see a quick pulse of 16-17mA when I'm programming via ICSP. I'm not sure how I can manage that.
    Last edited by Demon; - 29th September 2024 at 23:17.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    MCLR's have internal weak pullups in chip.....

    Name:  icsp.JPG
Views: 1040
Size:  32.3 KB

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    Quote Originally Posted by amgen View Post
    could do.........
    1)
    '
    restarting:
    pause 1000 ............... wait a second or 2 to reset all
    @ RESET
    '
    or 2)................
    if all slaves are on same 5 or 3 volt supply, then use a small NC (normally closed) relay to turn off power for few seconds to restart all slaves

    What is the @ RESET command? (I'm using PBP3.1)

    I prefer to avoid relays and mechanical devices. Contacts generally consume more current than ICs and discretes, and contacts wear out.

    I've got an order for some SN7407N from Digikey; gonna check out Mr E's suggestion.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  9. #9


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    diodes can be like signal diodes 1N4148. Not backwards in order to pull MCLR low to reset and that is considering you do LOW VOLTAGE PROGRAMMING setting, if not doing that then would use the 2n3906 or any NPN to pull down all the slaves through the diodes. The @ RESET is an assembly instruction using the @ for PBP to do machine code directly ( I think you know all that stuff)...... so if you want a hard reset after ICSP then yes to use MCLR but if chips are running, you could give instruction to GOTO reset.

    Name:  reset.JPG
Views: 972
Size:  125.9 KB

  10. #10
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Resetting a slave from master mcu

    Quote Originally Posted by Ioannis View Post
    What drives the MCLR pin of the slaves? A PIC output? ...
    A tri-state general I/O pin on the master.

    Output low = reset
    Input = do nothing


    Quote Originally Posted by Ioannis View Post
    ...

    I am asking, because the MCLR pin needs a level of 0,2*Vdd to see LOW (for the 16F177x series, but I guess it is the same for others).

    It depends on output characteristics if you are within limits of the MCLR. So be sure that what you think as low is actually sensed as low on the MCLR pins.

    Ioannis
    I can't say. This is all theory for now, but is supported by posts on google and a forum elder, Mr E.

    So I blame him if my house burns down.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Master to slave 16F767
    By sachymo in forum General
    Replies: 6
    Last Post: - 3rd June 2008, 20:22
  2. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  3. PIC master slave howto
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 18th September 2007, 22:35
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. i2c master/slave
    By lab310 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th April 2005, 22:23

Members who have read this thread : 10

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