Hi,
The title is to make searching easier. My main question is regarding using a particular relay with a PICAXE, but I also have a general question about the states of I/O which is a far more useful piece of knowledge than specific information on a random component.
I'll start with the title question. As I understand, a PICAXE (or other uController) I/O can have three states: Input, Low and High. "Input" is a high impedance state, whereas "Low" means the pin is effectively tied to ground? So if I have a relay coil I want to trigger both ways, one pole of the coil should be "high" the other "low". Yes? Or should it be "high" and "input"? I suspect the former, is there anywhere in the manual this is explained or a particular term(s) I can google.
2nd question: According to the manual, each pin can source/sink 20mA, and all pins 90mA. According to the datasheet for the 28X2:
I could use a different relay or a transistor to drive it. However, I have limmited space so the fewer components the better. That relay is small, so good, but it is also latching and has a coil voltage which my 3.3V (as per the requirements of the app) 28x2 can provide.
Thanks in advance as usual,
David.
The title is to make searching easier. My main question is regarding using a particular relay with a PICAXE, but I also have a general question about the states of I/O which is a far more useful piece of knowledge than specific information on a random component.
I'll start with the title question. As I understand, a PICAXE (or other uController) I/O can have three states: Input, Low and High. "Input" is a high impedance state, whereas "Low" means the pin is effectively tied to ground? So if I have a relay coil I want to trigger both ways, one pole of the coil should be "high" the other "low". Yes? Or should it be "high" and "input"? I suspect the former, is there anywhere in the manual this is explained or a particular term(s) I can google.
2nd question: According to the manual, each pin can source/sink 20mA, and all pins 90mA. According to the datasheet for the 28X2:
Which of those figures is the corresponding figure to the manual? Only 5mA in it I know, but I want to use a relay that has a coil current of 33mA (+-10%), so I need all I can get. Obviously, 33mA > 25mA, but it's a latching relay so only requires a pulse of current. I'm not quite sure what the datasheet is saying on the pulse length (top of "Characteristics" table on p2), but the figures are around 3ms. So the question is, could I have a PICAXE source and sink a current of 36.3mA (110%) for around 3ms?Input clamp current, IIK (VI < 0 or VI > VDD)..........................................................................................................20 mA
Output clamp current, IOK (VO < 0 or VO > VDD) ..........................................................................................................20 mA
Maximum output current sunk by any I/O pin..........................................................................................................25 mA
Maximum output current sourced by any I/O pin ....................................................................................................25 mA
Maximum current sunk byall ports (-40°C to +85°C)........................................................................................... 200 mA
Maximum current sunk byall ports (+85°C to +125°C)......................................................................................... 110 mA
Maximum current sourced by all ports (-40°C to +85°C) ......................................................................................185 mA
Maximum current sourced by all ports (+85°C to +125°C) .....................................................................................70 mA
I could use a different relay or a transistor to drive it. However, I have limmited space so the fewer components the better. That relay is small, so good, but it is also latching and has a coil voltage which my 3.3V (as per the requirements of the app) 28x2 can provide.
Thanks in advance as usual,
David.