¿ªÔÆÌåÓý

Re: pin 2 of raduino board seems to have gone to CW TX full time after boot message.


Jack Purdum
 

Using:

?? pinMode(pin, INPUT_PULLUP);

is functionally equivalent to:

?? pinMode(pin, INPUT);
?? digitalWrite(pin, HIGH);

The first version puts it in a known state just as the second two statements do. I think I checked the list file for the statements a long time ago and both generated the same code as I recall, so nothing is gained in terms of resource use from one over the other.

Jack, W8TEE

On Sunday, May 20, 2018, 2:27:03 PM EDT, Arv Evans <arvid.evans@...> wrote:


Allison, and others...

I have not taken time to look at the software, but a question keeps nagging me
that this may be a software problem.? The "pinMode()" command has an option
for turning on the internal PULLUP resistor, or not doing that.? What might be
the effect of not turning on the PULLUP option for the encoder push-switch,
or for one or both of the encoder phase signals??

pinMode();
pinMode(pin, mode);
pinMode(pin, INPUT);
pinMode(pin, OUTPUT);
pinMode(pin, INPUT_PULLUP);
or
digitalWrite(pin, HIGH);
digitalWrite(pin, LOW);

If using interrupts to read the rotary encoder it may be possible that the direction
LOW-to-HIGH or HIGH-to-LOW was not set properly relative to any pinMode()
command.

With that in mind I may have to download the source code and take an in-depth
look at what might be happening there.

Arv
_._


On Sun, May 20, 2018 at 11:50 AM, ajparent1/KB1GMX <kb1gmx@...> wrote:
Jerry, there was no wire to flail around brush the board only has the 12V input
as everything is 5V or 3.3.? That's why I am concerned it seemed spontaneous.

My guess it was ESD despite usual precautions.? Though in general I've never
experienced that and its actually very humid due to the rains.

However layout and input protection are important. I tend to put diodes from ground
to the input and input to whatever applicable +V so the input cannot see ESD or
other excursions from off board sources.? Inputs I worry about are key, mic-ptt,
button, Encoder A/B inputs.

Its got me, curious.

Allison


Join [email protected] to automatically receive all group messages.