led matrix pic 16f84 and 4017 help me please


Closed Thread
Results 1 to 16 of 16
  1. #1
    Join Date
    May 2009
    Posts
    66

    Arrow led matrix pic 16f84 and 4017 help me please

    im using led matrix 5x9 which has 5 anode and 9 cathode im pluging 9 cathode in 4017 5 anode in port a in pic 16f84 so i need help to pulsout portb.0 to the 4017 so i want to display text on the led matrix


    example

    porta = %10010
    pulsout portb.0,150
    pause 10
    porta = %11001
    pulsout portb.0,150
    so on .......

    i need help in pulsout plz or someone can post any example code here ,,?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I do not understand you question.

    Do the LEDs light up as expected if PORTB.0 is made high?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I do not understand you question.

    Do the LEDs light up as expected if PORTB.0 is made high?
    i made led matrix 5 x 9 well im pluging the side which has 5 and the side which has 9 in 4017 decade counter ic and led matrix 5x9 which is 45 leds.and i did 5 cathodes and the 9 anoides, the ic 4017 it need pulsout i conected it to portb.0 the problem i have is i want to send 1 pulse to 4017 during porta feeding the 1st 5 cathodes leds then 2nd 5 leds 2nd pulse to 4017 so on ...bcz led matrix it has 9 lines of 5 leds so i can display scroling txt or anythings,i hope u inderstand and i will try t0 draw a schema ,,

  4. #4
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    This is the schematic,i need help how to drive this ti write scroling text ,thank u
    Attached Images Attached Images  

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I do not think the pulsout command is going to work for you, maybe a series of them?

    This may help you.
    http://delabs-circuits.com/cirdir/th.../doc00020.html
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hello Mus.me,
    Here is basically what you do, get some graph paper, lay out 5x9 squares on the paper, and create the characters you want to display. The sides will have a binary value. I use the Port side (the PIC side) as the port output value. I use 8x8 displays as it is easier. the character " 0 " would be comprised of a row value $7e, followed by 3 rows of $81 and finally $7e again. Make up 5 lookup tables which execute sequentally and put the 5 bytes of each character in each. That's how to do it.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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


    Did you find this post helpful? Yes | No

    Default

    If that's a CD4017, then it can only source about 0.36 ma @ 5V. That's not enough to drive 1 LED, let alone 5.

    If it's a 74HC4017, then it can drive 25 ma. Good enough for 1, maybe 2 LED's, or 5 DIM ones.

    Some transistors or darlingtons would help.
    You might want some resistors in series with the 5 cathodes too.
    <br>
    DT

  8. #8
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    If that's a CD4017, then it can only source about 0.36 ma @ 5V. That's not enough to drive 1 LED, let alone 5.

    If it's a 74HC4017, then it can drive 25 ma. Good enough for 1, maybe 2 LED's, or 5 DIM ones.

    Some transistors or darlingtons would help.
    You might want some resistors in series with the 5 cathodes too.
    <br>
    thank u for reply i know that ,but i wanted to know how i write the pulse to 4017 ,i will change the schematic and i take off tc4017 and i use 8x5 led matrix it will be easy to drive anyway thank you Darrel Taylor & joe S & Mackrackit for helping me .
    Last edited by Mus.me; - 14th July 2009 at 00:55.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Mus.me View Post
    ... ,but i wanted to know how i write the pulse to 4017 ...
    OK, so let's take a look at the PULSOUT command.
    There's really nothing wrong with your original statement, which is why we were avoiding the question.
    Code:
    pulsout portb.0,150
    The pulsout line above will toggle the pin twice, giving an effective "Pulse". The 4017 will count on the "Rising Edge" of the pulse.
    The time between the Toggles would be 150 * 10us = 1500us = 1.5ms. (assuming 4mhz OSC)

    1.5ms is extremely long for this purpose. But it would still work.
    pulsout portb.0,1 with a 10us pulse would work just as well.
    However, the 4017's can take a pulse width as small as 100ns (.1us) so you don't really need PULSOUT.
    Simply toggling the pin with HIGH and LOW will do the job too.
    Code:
    HIGH PORTB.0
    LOW  PORTB.0
    Another thing to do is turn OFF all LED's before the pulse. Otherwise the 5 LED pattern will briefly show on 2 rows, giving a ghosting effect.
    Code:
    PORTA = %11111   ; ALL LED's OFF
    HIGH PORTB.0
    LOW  PORTB.0
    porta = %10010   ; new pattern
    Cheers,
    DT

  10. #10
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    thank u Darrel Taylor for helping me,i have another quetion, i,m using proteus 7.5, for testing my project but it seems not working good is there any other programe to test projects?

  11. #11
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    What would be wrong with doing it the old fashion way?

    A bread board, some wires and parts. Then the only thing
    to worry about maybe is some stray capacitance.
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Mus.me View Post
    . . . . . .my project but it seems not working good is there any other programe to test projects?
    Hello Mus.me,
    The " code snippet" you posted . . . is that all of it or is there more? I ask because you made no mention of TRISA or TRISB, and those registers tell the PIC to make the ports inputs or outputs, also check your data sheet for that PIC because most of this series have open collector outputs on PortA.4 . I do not see config statements or OSC Define either.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  13. #13
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Hello Mus.me,
    The " code snippet" you posted . . . is that all of it or is there more? I ask because you made no mention of TRISA or TRISB, and those registers tell the PIC to make the ports inputs or outputs, also check your data sheet for that PIC because most of this series have open collector outputs on PortA.4 . I do not see config statements or OSC Define either.
    ok joe in know to how to config them i think

    define osc 4
    porta = 0
    trisa = 0
    portb = 0

    i did everythings but to debug in protues it doesnt work good ex: porta.0 isnt sending data out in proteus so im lookin if there is any other software like proteus to debug my code ,ICD doesnt include f84 and many PICs,i did pic simulator but i didnt understand it so proteus is easy but it seems not doing good job and very slow ,thank u joe for helping me ..
    Last edited by Mus.me; - 16th July 2009 at 15:12.

  14. #14
    Join Date
    Feb 2007
    Posts
    55


    Did you find this post helpful? Yes | No

    Default

    define osc 4
    porta = 0
    trisa = 0
    portb = 0
    this as well:
    trisb = 0

    porta = %10010
    pulsout portb.0,150
    pause 10
    porta = %11001
    pulsout portb.0,150
    so on .......

    Maybe worth changing the 'pause 10' to 'pause 1' if your display is flickering.

    does your 4mhz crystal have 2 caps (18 - 22pf) between each leg and ground?
    not shown on your diagram.
    Last edited by wellyboot; - 18th July 2009 at 20:49. Reason: missed something

  15. #15
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by wellyboot View Post
    this as well:
    trisb = 0




    Maybe worth changing the 'pause 10' to 'pause 1' if your display is flickering.

    does your 4mhz crystal have 2 caps (18 - 22pf) between each leg and ground?
    not shown on your diagram.
    thank u wellyboot for explaining, and thanks everyone trying to help ,,, i will do it and i post the result ........

  16. #16
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default 4017 problems

    hello to everbody...so i tried to play a little with a 5x7 dotmatrix and 4017 whitch is driving the columns, the problem is that when i power down my circuit and power it up the scroll is not starting from first colum, sometimes it does, but i must to reset circuit a several times there is no clear pattern for this and the leters start to mix up, eny idea how to solwe this???


    edited:

    I realized that I can use the free pin uC to reset 4017
    Last edited by xxxxxx; - 5th February 2011 at 00:44. Reason: I have become smarter

Members who have read this thread : 2

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