weird problem with dot matrix and shift register


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I think you just need to "Blank" the rows before changing the Column data, then turn the next row on.

    Try it like this ...
    Code:
    FOR CNTR2 = 0 TO 100
      FOR CNTR1 = 0 TO 7
        STRB = 0
        COL = COLVAR[CNTR1]^255
        SHIFTOUT DAT,CLK,0,[COL]
        PORTB = 0                   ; blank all Rows
        STRB = 1                    ; latch the data
        PORTB = DCD CNTR1           ; turn on next Row
    
        PAUSE 2
      NEXT CNTR1
    NEXT CNTR2
    DT

  2. #2
    Join Date
    Oct 2009
    Posts
    30


    Did you find this post helpful? Yes | No

    Smile worked !!

    Darrel,

    thx alot for helping, it worked really well.

    i always wished to thank you in person. cuz from 3 years i enter this forum as a visitor and i always see ur post. you always find the solution. thx much Darrel.

    still i have a problem i didnt mention. the first row always doesnt give full brightness when it is on. i suppose this relates to the previous problem. i will try to work it out.

    thx again Darrel.

    BW

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Thanks Ahmadabuomar, and your welcome.

    First row's dimmer than the others ... ok.
    Let's try moving the "blanking", so that all the rows are ON the same amount of time.
    It should actually dim the other 7 rows to what the first one was.

    Code:
    FOR CNTR2 = 0 TO 100
      FOR CNTR1 = 0 TO 7
        STRB = 0
        COL = COLVAR[CNTR1]^255
        SHIFTOUT DAT,CLK,0,[COL]
    
        STRB = 1                    ; latch the data
        PORTB = DCD CNTR1           ; turn on the Row
        PAUSE 2                     ; LED ON time
        PORTB = 0                   ; blank all Rows
    
      NEXT CNTR1
    NEXT CNTR2
    DT

  4. #4
    Join Date
    Oct 2009
    Posts
    30


    Did you find this post helpful? Yes | No

    Thumbs up solved it

    Hi Darrel,

    in fact, row 1 problem was not related to software!! after i tried your last code. i found nothing changed.

    I then checked all npn transistors used in rows. i found the transistor on portb.0 is not working properly !! i changed the transistor and the problem was solved.

    all portb transistors were bc337 25 npn transistors except portb.0 that was bc337 40

    i dont know if 40 is different than 25 !! but i think the transistor itself is not working

    thx Darrel for your help

    BW

Members who have read this thread : 0

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