18M2 Reset pin or no ?

zorgloub

Member
Hello to the Picaxor's community ;)
Just to be sure : is the 18M2 pin4/C.5 a Reset pin?
Indeed, I see in various documentations that the 18M1 and 18X2, fully compatible pin to pin, have a pin4/C.5 Reset.
Thank you to all of you.

24317
 

inglewoodpete

Senior Member
The base PIC for the 18M2 has 3 functions for leg 4: Reset, Vpp (for programming the Flash) and digital input. Rev-Ed have chosen to configure the PICAXE firmware to use the pin as a digital input. Best use in a PICAXE, in my opinion.

The configuration of this pin in a PICAXE cannot be changed.
 

AllyCat

Senior Member
Hi,
Rev-Ed have chosen to configure the PICAXE firmware to use the pin as a digital input. Best use in a PICAXE, in my opinion.
Yes, indeed. For most purposes the Programming/Serial Input pin (C.4) can be used as an Active High Reset input. You only need to learn the "Hard Reset" procedure if you use a DISCONNECT or SERRXD instruction in your program.

Cheers, Alan.
 

zorgloub

Member
You said:
<<Rev-Ed have chosen to configure the PICAXE firmware to use the pin as a digital input. >>
<<For most purposes the Programming/Serial Input pin (C.4) can be used as an Active High Reset input.>>

1. But so, if I use this C.5 as a "normal" input, will a reset be caused if this input is High?
Which would not necessarily be the goal for a "normal" input.

2. What do we mean by "Hard Reset"? Does it consist of turning off the power and then putting it back on? And a "normal" reset would be to apply an impulse on a pin dedicated to the reset function of the MCU and therefore of the program?
 
Last edited:

AllyCat

Senior Member
Hi,

No, it won't reset. The only way that it differs from a "normal" digital input is that it doesn't have an internal "protection" diode to the supply rail. So it shouldn't be used with for example "real RS232" input levels (i.e. ~+/- 12 volts) unless an external diode is added.

Cheers, Alan.
 

tmfkam

Senior Member
On the "base" PIC device, should this pin be taken above 5V, it places the device into high voltage programming mode. If the device isn't programmed, or after programming is complete, returning this pin to 5V (or less) after holding it higher than 5V (9V to 12V or so) will perform a reset.

On the base PIC device it can be (optionally) configured as an input pin, though not as an output. As a PicAxe it is (always) an input in a similar way.

It might be good practice to ensure any input to this pin is not allowed to go above 5V. I always fit a diode with the cathode to 5V, anode to pin 4 and a series limiting resistor. No prizes as to how I learned this lesson...

For me, a "soft" reset would be done from a software command in the program. A hard reset being done from outside the program, either power removed or from a reset pin.
 

Flenser

Senior Member
zorgloub,

if I use this C.5 as a "normal" input, will a reset be caused if this input is High
To answer your original question about pin C.5.
This PIC microcontroller is specified to operate with +V up to 6.5V and the voltage on all the other input pins between -0.3V to (+V + 0.3V)
If you use C.5 with the same maximum voltage that you use for all the other Input pins then it will behave like the other input pins and you will never cause a reset by putting the C.5 input high

The C.5 pin is a special case, which is why you probably got more details than you were expecting.

What tmfkam was warning you about is that if you hold B.6 and B.7 low and put 9v on C.5 this will put the PIC microcontroller into a PIC programming mode (NOTE: This is _not_ the PICAXE programming mode). You probably never want to do this.
- If your input voltages are always <= (+V + 0.3V) then you will never have a problem.
- If your input voltage to C.5 could be 9V then connecting a diode as tmfkam describes will limit the voltage so that C.5 never sees that 9V.

All the discussions about the PICAXE Hard Reset procedure are not relevant to your question about C..5.
The hard reset procedure only applies to the PICAXE download through the Serial In pin
- It is not a reset in the way that the RESET pin worked on the 18X and 18M chips.
- The hard reset procedure is a feature of the PICAXE firmware that gives the PICAXE firmware a way of detecting that a download is being started when there is something about your program that prevents the firmware from detecting a download has been started. e.g. If you program issues the DISCONNECT statement so that you can use pin C.4 as an input then the only way you can start another download is by using the hard reset procedure.
 

zorgloub

Member
Thank you for all your answers which actually go a little further than my initial question but which is undoubtedly all the richness of this forum! Thanks everyone.
 
Top