hardware or software? - Page 1
Forum section: electronics / beginners

author: alecto
author_rank: Contributor
timestamp: June 14, 2016, 01:10:28 pm
content: In a few words : I build an led cube(I know...original) 3x3x3I have 9 common cathode columns of 3 leds, each column is switched by NPN (BC337, 10k on base, load on collector, emitter to ground ) and 3 common anode levels of 9 leds, each level is switched by PNP (BC327, 10k on base, load on collector, emitter to 5v)the logic is provided by a PIC16F690 and me with PickIt2 MPLAB and ASM...(unexperimented experimenting beginner)The All is alimented by a 9v wall wart regulated to 5v with an LM7805...The cube worked all right for 3 weeks ...my program was too heavy, badly implemented but it worked !So last week I wrote a new program, tried it ...and I was a happy programer...it was way lighter...I added software pwm...made some tests, a few animations...and proud of myself decided to turn it off...but 2 minute later I turned it on(yeah just to watch it once more...so sad) and there it started...Now when I turn it on, it does strange animations...then a few minutes later it seems to "stabilize" and run my program correctlyIf I try to modify the program during this "strange phase", the result is different... but still not coherentbut if I wait for it to stabilize, every modification applies immediately and correctly...What I did so far :checked voltages...seems okchecked for bridges or short...nonereplaced the PIc...no changeadded 10k between MCLR an VCC(even if deactivated by software config)...no changeadded 0.1µf between VDD an VSS...guess what...no changeuploaded my old badly implemented program...still this strange (but slightly different) behaviourtoday on a breadboard I redid the circuit, except I used 2 ULN2803 to drive the 9 columns...and yes...still strangeWhile writing this, I realized that it must be software...I just don't get why when I reverted to my ancient code, the bug remained...(or appeared??)hardware or software...maybe neither, maybe just me....anyway if you have any suggestions...a tired amateur thanks you in advance

author: tautech
author_rank: Super Contributor
timestamp: June 16, 2016, 02:52:51 am
content: I'm guessing HW although it's hard to confirm without a scope.Thinking it's a power rail issue from the IC coupling state switching transients into the power rail.What bulk capacitance value have you usedafterthe PSU?

author: jdraughn
author_rank: Regular Contributor
timestamp: June 16, 2016, 07:47:34 am
content: Sounds like you may have an overflow happening in code.

author: Chris Mr
author_rank: Regular Contributor
timestamp: June 16, 2016, 08:56:44 am
content: If the running the old code that worked ok doesn't fix it then I would say hardwarePresumably you have resistors in series with the LEDs?

author: danadak
author_rank: Super Contributor
timestamp: June 16, 2016, 09:41:33 am
content: Post the code and a schematic.Regards, Dana.

author: SL4P
author_rank: Super Contributor
timestamp: June 16, 2016, 10:07:56 am
content: You mention the new code is 'lighter'... does that mean 'brighter'?Perhaps your new code has increased the 'on time' of the LEDs - pushing the current consumption of the circuit toward the edge...?