PDA

View Full Version : Resetting a slave from master mcu



Demon
- 1st March 2024, 23:28
I have a reset button on the master PIC, and I'd like to reset all the slaves internally. This is what I have so far:

https://i.imgur.com/KG6fdir.png


I found formulas to calculate the base resistor, like this one:

https://breadboardcircuits.com/how-transistors-work/


But they're dependent on preliminary calculations done for the load current, and I have no clue how that is calculated with a PIC pin. I see several current loads in the datasheet for the 16F1933, but no clue which is the appropriate one to use in the formulas.

Ioannis
- 2nd March 2024, 18:57
The main Load Current for the PNP transistor will come from the 10K, R5 resistor, that goes to +Vdd and not from the PIC /MCLR pin. Do not worry about that.

Ioannis

Demon
- 5th March 2024, 03:11
I had gotten that circuit from "somewhere", but I can't find any more. So, I'm looking at this guy:

https://www.electro-tech-online.com/threads/pic-self-hard-reset.17256/

He's using a NPN transistor, and I notice he's missing a pull-down on the base of the NPN.

I added labels to make it clear what attaches where, and I end up with this:

https://i.imgur.com/fK6eRHx.png


Do you see a problem if I have the programmer on the slave PIC at the same time as the pin from master PIC is connected?

I can always unconnect everything when I program, but I know "one day", I'm gonna rush and program with everything connected.

Ioannis
- 8th March 2024, 18:58
The base of the transistor is grounded through R6. The other end of R6 is Vss, meaning ground.

To Reset the system you have to feed high to the transistor in this circuit.

I am a bit worry about the collector that is connected to a 100 ohm and this to the programmer. In programming, there might be 13 or more volts. At this time you have to be sure that the transistor will be in OFF state, that is [/MCLR Slave from master PIC] be low. If you can be sure of this then I see no problem.

Ioannis

Demon
- 8th March 2024, 19:14
Yeah, this seems so sketchy to me. I'm thinking it would be safer to be able to connect only one at a time; either the programmer, or the master PIC.