Author Topic: hardware or software?  (Read 2030 times)

0 Members and 1 Guest are viewing this topic.

Offline alectoTopic starter

  • Contributor
  • Posts: 21
hardware or software?
« on: June 14, 2016, 01:10:28 pm »
In a few words : I build an led cube(I know...original ;)) 3x3x3
I 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 correctly
If I try to modify the program during this "strange phase", the result is different... but still not coherent
but if I wait for it to stabilize, every modification applies immediately and correctly...

What I did so far :
  • checked  voltages...seems ok
  • checked for bridges or short...none
  • replaced the PIc...no change
  • added 10k between MCLR an VCC(even if deactivated by software config)...no change
  • added 0.1µf between VDD an VSS...guess what...no change
  • uploaded my old badly implemented program...still this strange (but slightly different) behaviour
  • today on a breadboard I redid the circuit, except I used 2 ULN2803 to drive the 9 columns...and yes...still strange

While 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
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28380
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: hardware or software?
« Reply #1 on: June 16, 2016, 02:52:51 am »
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 used after the PSU?
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline jdraughn

  • Regular Contributor
  • *
  • Posts: 106
Re: hardware or software?
« Reply #2 on: June 16, 2016, 07:47:34 am »
Sounds like you may have an overflow happening in code.
 

Offline Chris Mr

  • Regular Contributor
  • *
  • Posts: 139
  • Country: gb
  • Where there's a will there's a way
Re: hardware or software?
« Reply #3 on: June 16, 2016, 08:56:44 am »
If the running the old code that worked ok doesn't fix it then I would say hardware

Presumably you have resistors in series with the LEDs?
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: hardware or software?
« Reply #4 on: June 16, 2016, 09:41:33 am »
Post the code and a schematic.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: hardware or software?
« Reply #5 on: June 16, 2016, 10:07:56 am »
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...?
Don't ask a question if you aren't willing to listen to the answer.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf