Weird flicker


Closed Thread
Results 1 to 11 of 11

Thread: Weird flicker

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697

    Default Weird flicker

    Hi. Ive been making a circuit and ive started getting trouble with lights flickering. The chip does use PWM but the flicker is something different. The chip will work fine then for no aparent reason all the outputs will turn on and off rapidly (about 10 times a second). I had this problem when i was testing but only if i started unplugging the mains supply slowly. Could this be a brownout? The chips stop responding to the serial input. Whats the most likely cause? Programming error? Dodgy circuit?

    Edit: In my circuit i have 2 chips and they both did the same thing at the same time. Weird
    Last edited by The Master; - 9th December 2007 at 17:08.

  2. #2
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    Show us your circuit and show us your code. The most here have no cristalball to see what you have on your desk.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    well, i think those having one got..

    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Sorry. I was just asking what the most likely one would be. Heres both anyways.

    Now one chip doesnt seem to be responding at all
    Attached Images Attached Images  
    Attached Files Attached Files

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    can you reprogram it and tell what happen with the one who stop?

    Board layout won't help, if you have access to a Schematic software, this would make things easier for us. or a scan of an hand-made one.

    I usually start with schematic, then i observe the board layout, and then the code.. but it's me
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    I havnt got any scematic software yet. Im trying to get livewire though. I think i solved the random clicker prob. It seems that if i send chr(100) for 100% brightness the chips dont like it. I cant see why that would cause a problem but i changed the max to 99 and they dont go weird now.

    I do still have a problem. Ive made a test app to send a few commands out and at one command everything sticks for a second. I think this might be to do with the app tho so hopefully ill have them all working soon :P

    The chip that stopped responding was actually responding. The status light was flashing so i think it wasnt getting the right command or something. Oh well, nothing that a few late nights cant fix im sure

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    what happen if you send 101?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    If i send 101 in theory nothing should happen. 100 should mean its the brightest. 0 is obv off. 255 means data start and 254 means reset the address.

    That program isnt quite finished. The idea is that each chip picks up 16 bytes of data. 1 chip handles the first 8 and the other handles the second lot of 8. Resetting the address should only happen if a button is being held down when the command goes out.

    Ive got the lights running a test pattern now so ill see if they break

  9. #9
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    I dont see:
    @ DEVICE PIC16F???,XT_OSC
    @ DEVICE PIC16F???,HS_OSC
    etc,ect.
    in your code

  10. #10
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    maybe i've misunderstood something but
    Code:
                                    if recpos=18 then
                                        if indata<100 then
                                            address=indata
                                            write 0, address
                                            for y=1 to 10
                                                high portb.6
                                                high portb.7
                                                pause 20
                                                low portb.6
                                                low portb.7
                                                pause 20
                                            next
                                            high portb.6
                                        else
                                            low portb.6
                                            for y=1 to 10
                                                high portb.7
                                                pause 20
                                                low portb.7
                                                pause 20
                                            next
                                            high portb.6
                                        endif
                                        recpos=16
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  11. #11
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    All fuses are set in the programmer software. I did have problems with them but now ive set them correctly it works.

    That section of code your looking at is to reset the address. It only runs if RecPos=18. RecPos is only set to 18 if chr(254) arrives. That check is so the address must be less than 100. Well, i dont think ill be making 100 boxes that each have 16 chanels. 1600 sets of lights a nice thought but a little out of my price range. Hehe

    Edit: Those loops just make the lights flash either orange or red depending if the address was ok or not ok

Similar Threads

  1. Weird code problem
    By Navaidstech in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th March 2009, 11:16
  2. Weird Problem
    By isaac in forum General
    Replies: 9
    Last Post: - 22nd September 2008, 19:30
  3. LCD and PIC18F2685 - Weird LCD behavior
    By Castor in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 29th April 2008, 09:55
  4. PIC16F877 Weird behavior
    By fadibasic in forum General
    Replies: 1
    Last Post: - 27th April 2008, 00:03
  5. Weird Oscillator Problems
    By CocaColaKid in forum Off Topic
    Replies: 5
    Last Post: - 2nd September 2005, 22:19

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