Is there a wise way to debug a large code?


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: Is there a wise way to debug a large code?

    As mentioned above, that noise comes from PWM, PWM is used to adjust brightness of the nixie tubes
    The HPWM output from the chip is used to modulate bases of all MPSA42 transistors, emitters of which, individually, go into ports of MCU, and collectors are tied to nixie tube cathodes.
    That PCB is quite large - about 88x44mm, now I've designed even more compact one, just 70x30mm. Good I haven't put it into production yet - will add capacitor place to PCB.

    Actually, reading schematics via PCB is not that hard - just you need to learn it, as you do with normal schematics.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: Is there a wise way to debug a large code?

    I would try first the software filtering as I described to you.

    Last resort to capacitors. If something changes, then you would remove old caps and put new, larger or smaller???

    Ioannis

  3. #3
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: Is there a wise way to debug a large code?

    Yeah maybe
    My software skills are quite limited as you can see from my posts
    And by the way, there was another issue which I've fixed now, and quite likely it was also causing the problems
    Due to coding error, I had that brightness adjusting PWM routine called 500 times per second (it was placed in middle dot blink loop)
    and when you use HPWM statement, instead of changing the current PWM register, Picbasic stops the pwm generator and restarts it with new values (you can check this with oscilloscope) which causes additional noise generation. Now I moved it into segment refresh routine, which happens once per minute (and keyboard input is deactivated during it), so most likely, it should work without capacitor now, but too lazy to take it apart and unsolder

    Name:  clcock.jpg
Views: 947
Size:  378.4 KB

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: Is there a wise way to debug a large code?

    Glad you found the logic error on your code. You did just fine!

    Ioannis

Similar Threads

  1. DEBUG DEC DatVar vs DEBUG #DatVar
    By netstranger.nz in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th March 2011, 21:26
  2. Replies: 0
    Last Post: - 18th November 2010, 18:50
  3. How does everyone debug their code?
    By HankMcSpank in forum General
    Replies: 30
    Last Post: - 18th June 2009, 06:41
  4. SERIN from a large string
    By earltyso in forum Serial
    Replies: 5
    Last Post: - 2nd May 2008, 22:23
  5. large displays
    By George in forum Off Topic
    Replies: 2
    Last Post: - 18th March 2007, 21:56

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts