Hardware of software problem?

Thread Starter

bug13

Joined Feb 13, 2012
2,002
So today the PCB for my project arrived, all look good, but One of the incremental rotary switch stop working after 1 minute or so. It starts working if I reprogram the MCU or I touch the programming header on the PCB.

I suspect it's my PCB layout problem, is this possible? (My code should be fine, because I use the same code for the other rotary and it works all right)
 

SPQR

Joined Nov 4, 2011
379
It sounds like you might have a cold solder joint. (you touch something and something changes).

Have you checked all the joints, and/or resoldered?
 

spinnaker

Joined Oct 29, 2009
7,830
Unless you post your schematic, code and what you have done to troubleshoot the problem, the best anyone can do is guess what your problem is.

But the above souns like a good guess.
 

John P

Joined Oct 14, 2008
2,025
Well, if the switch quits working after the same length of time, or after some amount of usage, every time you run the unit, it's software. It just has to be.

Try running it until the switch quits, then reset the processor without jarring the board, and see if it comes back. If it does, then it was the reset that cured it, not any sort of mechanical shock. And so it must be in the software.
 

ErnieM

Joined Apr 24, 2011
8,377
This may also be a floating input: touching it or near it "drives" it to a good value,later it drifts to something that doesn't work.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Ok it's a software problem, in the header define section, I have assigned a wrong port in a #define code.

but when I check, I do have a cold join on the other pin not related to this.

Thanks guys, very appreciate it. :)
 

spinnaker

Joined Oct 29, 2009
7,830
Ok it's a software problem, in the header define section, I have assigned a wrong port in a #define code.

but when I check, I do have a cold join on the other pin not related to this.

Thanks guys, very appreciate it. :)
And you were so sure it was not a software problem. :)
 

WBahn

Joined Mar 31, 2012
29,976
So today the PCB for my project arrived, all look good, but One of the incremental rotary switch stop working after 1 minute or so. It starts working if I reprogram the MCU or I touch the programming header on the PCB.

I suspect it's my PCB layout problem, is this possible? (My code should be fine, because I use the same code for the other rotary and it works all right)
You can't be using the same code otherwise you would be talking to the other rotary switch.

The point is that there ARE some differences in both the software and the hardware that distinquish the two. Look carefully at the differences IN BOTH realms as your first target of investigation.
 
Top