Diode on pin C.3 for serin

Quick question: Manual 2's serin page states:

All 8 and 14 pin - Due to the internal structure of input3 (C.3) on these chips, a
1N4148 diode is required between the pin and V+ for serin to work on this
particular pin.
Am I correct in assuming this is still true for the M2 parts?

Ta, Calvin
 

nick12ab

Senior Member
Yes. However this should only apply when the serin voltage level is greater than the PICAXE Vdd, and even then you must still use a current limiting resistor like on the PICAXE download circuit. The diode is just an external version of the internal clamping diodes on all other input pins.
 

Grogster

Senior Member
I asked the same Q about the M2 parts recently. :)

As above, I normally use 180R resistors on all serial inputs if connected to a 3rd party device, such as an RF module.
When connecting PICAXE chips together ON THE SAME BOARD, I tend to just directly connect them, as they are running from the same 5v source. If they are on separate boards with perhaps separate 5v supplies, I use the resistor again.

As others have mentioned much wiser then I: Cheap insurance.

I always use TT comms, and 4k7 pull-ups on all serial pins, be they input or output.
 

westaust55

Moderator
A better diode might be the BAT85.

The BAT85 is an ultra high speed Schokkty diode which operate at a lower forward voltage of ~0.24 volts at IF = 0.1 mA rising to ~0.35 volts at IF = 5.0 mA
compared with the 1N4148 which has a forward volt drop of ~0.6 Volts at at IF = 5.0 mA.

In the PIC 12F1840 (~08M2) and the PIC 16F1824 (~14M2) datasheets, the simplified generic IO port schematic in section 12 infers all IO have the same arrangement including the clamping diodes.

By comparison the datasheets for the 14M (PIC 16F684 ) at pin RA3 and 08M (PIC 12F683) at pin GP3 specifically indicate the absence of a clamping diode between the signal line and VDD
 
Last edited:

womai

Senior Member
As above, I normally use 180R resistors on all serial inputs if connected to a 3rd party device, such as an RF module.
Unfortunately 180 Ohms is not much of an insurance for an input. At just 2V above supply that means a current of around 10mA (2V/180 Ohms, neglecting the Schottky diode drop of around 0.3V) flowing through the tiny protection diode, likely killing it instantly. I'd rather go for around 10-20k (just like the download input of a Picaxe) which gives protection for up to ~10-20V overvoltage. The 180 Ohms is sor of sufficitient to protect a single OUTPUT agains short circuits (although 5V/180 Ohms = 28mA which is more than a Picaxe output is allowed - even worse if more than one pin is shorted at the same time; so I'd rather use ~1 kOhm instead).
 

Dippy

Moderator
Well observed... and perhaps worthy of a little extra graphics by Rev-Ed in Manual 1?
Easy to miss text, harder to miss drawings.

Does Westy's "Shokkty" diode get used in the same circuit as his "Tantrum" capacitor? ;)
(PS. The reader 'infers' , the author 'implies').

And it shows that Microchip aren't perfect too:)
Many PIC programmers here will realise the reasons for that PIC arrangement but their Data Sheet could be clearer.
 

westaust55

Moderator
Yeah
A shokkty (minus a "c") is what the user might get if they do not fit a schokkty leading to demise of the chip
Mind your auto spell check suggests a "schooner" (beer) which might help overcome the Trantrum :)

Funnily a search suggests this forum has the highest rate for misspelling Schokkty and even found a link to the same typo in PICAXE manual 1 page 45.

The Enhanced diagram on page 45 is for the Serial In pin as enhanced protection (albeit that the SerIn pin does have the two clamping diodes inbuilt for the 08M and 14M).
As mentioned, Rev Ed could add a diagram immediately below for the use of input pin3 with RS232 or other higher voltage based serial input.
 
Last edited:

techElder

Well-known member
Schottky, Schottky, Schottky, Schottky, Schottky, Schottky, Schottky, ... that'll mess around with those spelling statistics! :D

... Funnily a search suggests this forum has the highest rate for misspelling Schokkty and even found a link to the same typo in PICAXE manual 1 page 45.
 

Dermotx

Member
I have been connecting leg 6 (serial data output) of NKM2401 in receive mode to leg 4 (C.3) of the 08M DIRECTLY together. Both chips are powered from the same 4.5V source. I am not having any problems. Should I add in the diode or a series resistor? What I am getting from the above is that there is not a problem if both chips are powered at the same voltage.
 

hippy

Ex-Staff (retired)
@ Dermotx : Because the pin is physically input only, can never be an output, and the voltage into the pin will never be greater than the PICAXE supply voltage; you do not need a clamping diode to +V nor any inline series resistor.
 

Dermotx

Member
@ Dermotx : Because the pin is physically input only, can never be an output, and the voltage into the pin will never be greater than the PICAXE supply voltage; you do not need a clamping diode to +V nor any inline series resistor.
Thanks for clarification.
 
Top