1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

3x3x3 LED Cube - can i use16f628 instead 16f690

Discussion in 'Microcontrollers' started by robotsmani, Jan 20, 2009.

  1. colin55

    colin55 Well-Known Member

    Joined:
    Feb 14, 2009
    Messages:
    3,534
    Likes:
    82
    Location:
    Melbourne Australia
    Have a look at LED Cube Matrix Driver http://picprojects.org.uk/projects/lc/index.htm#Description site by Pete Griffiths.
    Not only is Pete Griffiths brilliant in designing electronic circuits but he shows how to create a microcontroller program to display amazing effects on the cube.
    In addition, his site is superbly laid out with diagrams and pictures and videos to help the constructor.
    And all this is FREE to the constructor.
    That’s why the internet beats any book or magazine hands down.
    The internet reaches a world-wide audience, INSTANTLY.
    And it's thanks to kssoin for finding this.
     
    Last edited: Dec 10, 2009
  2. Sceadwian

    Sceadwian Banned

    Joined:
    Oct 27, 2006
    Messages:
    14,047
    Likes:
    141
    Location:
    Rochester, US
    I'm sure they look a lot more impressive in person but I was never fond of how each LED can be blocked/refracted from other nearby LEDs and the framework. I've always wondered why 5mm LED's are typically used rather that surface mount LEDs aside from soldering ease. If the desire is to have a dot that glows simply use an SMD LED and coat it with semi-opaque wax or material that will diffuse the light to give you a nice glowing bead instead of the horrible directional effect typical of such LEDs. Even frosted lenses don't do enough to diffuse the light well.
     
    Last edited: Dec 10, 2009
  3. yuva

    yuva New Member

    Joined:
    Feb 9, 2010
    Messages:
    4
    Likes:
    0
    what is the icsp for 16f628 be80be..I am confused

    what is the icsp for this bebe,at first schematics you used port B for cathodes and later you used port A for cathodes,you didnt post icsp for later,could you plz tell what could the icsp pins for later schematic...
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. kssoin

    kssoin New Member

    Joined:
    Oct 2, 2009
    Messages:
    16
    Likes:
    0
    Location:
    Karnal in India

    Hi yuva,
    ICSP pins do not change when you re organise the outputs on a pic.I am very limited in my knowledge of PIC micros. Let more knowledgeable persons on this forum confirm this.
    I have just managed to construct the LED cube.
    The more exciting part is yet to start.
    Regards.
    kssoin
     
  6. yuva

    yuva New Member

    Joined:
    Feb 9, 2010
    Messages:
    4
    Likes:
    0
    thanks kossin,you are right
    I came to know that icsp pins do not change,
    I have builded the 3x3x3led cube and used blue Leds port B and RA 3 for anodes and RA 6,7,5 for cathodes, 2N2222 transistors,diode IN914,capacitor 220micro farad,and the mentioned resistors..I HAVE CONNECTED THE CIRCUIT CORRECTLY AND I DUMPED THE HEX FILE PROVIDED BY "be80be" STILL i DONT GET THE OUTPUT,can anybody able to tell me whats wrong??
    may be it is the hex file,can anybody provide me hex file plzz....???
     
  7. yuva

    yuva New Member

    Joined:
    Feb 9, 2010
    Messages:
    4
    Likes:
    0
    Hii turker..,nice to have people like you,
    could you plz provide me 3x3x3 led cube schematic,asm and hex files?
    actually i had made one using 16f628..i donno whats wrong in it
     
  8. yuva

    yuva New Member

    Joined:
    Feb 9, 2010
    Messages:
    4
    Likes:
    0
    somebody tell me how to create hex file from asm code using mplab

    I think my cube is perfect in circuit and it is may be the hex file
     
  9. birdman0_o

    birdman0_o Active Member

    Joined:
    Feb 23, 2009
    Messages:
    1,370
    Likes:
    18
    Location:
    Montreal, Quebec
    Simple....assemble the code, what isnt working?
     
  10. vanaardep

    vanaardep New Member

    Joined:
    Feb 11, 2010
    Messages:
    13
    Likes:
    0
    Hi there im using a pic 16F627 and i cant get the code to compile, ive changed the top of the 16F690 to a 16F627. When i try and compile it with mpasm v5.01 i get many errors....any idea whats wrong?
     
  11. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,798
    Likes:
    134
    Location:
    morristown,tn
    The code that's been posted on here will work with a pic16f627
    I have made 20 or more of them and ran out of 16f690 that why when the op ask I posted my
    remade code for the 16f628 If you post your code i will fix it for you.
     
  12. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,798
    Likes:
    134
    Location:
    morristown,tn
    I didn't post the ICSP all the time I figure you all would have that part figured
    The hex works that I posted

    This is a 16f628 and how the led's work
    [embed]http://www.youtube.com/v/OsUJwhyjJJc&hl=en_US&fs=1&[/embed]
     
    Last edited: Mar 15, 2010
  13. vanaardep

    vanaardep New Member

    Joined:
    Feb 11, 2010
    Messages:
    13
    Likes:
    0
    ''be80be
    The code that's been posted on here will work with a pic16f627
    I have made 20 or more of them and ran out of 16f690 that why when the op ask I posted my
    remade code for the 16f628 If you post your code i will fix it for you.''

    thanks but i got the code fixed. My next problem is that when i turn it on none of the leds come on. I bypassed one of the transistors, still nothing. I tested the voltage, the chip gets 5v like it should, but the Positive pins going to the leds get no voltage:confused:
     
  14. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,798
    Likes:
    134
    Location:
    morristown,tn
    The transistors sink the 3 rolls and the 9 columns are sourced sound like your not sinking current
    Here how I have made my cubes
    The resistors for the three npn transistors are 1kohm
     

    Attached Files:

    Last edited: Mar 23, 2010
  15. wassa831

    wassa831 New Member

    Joined:
    Apr 23, 2009
    Messages:
    2
    Likes:
    0
    Hi! and who can upload finished version of schematic and firmware for pic16F628A? Thank you!
     
  16. wassa831

    wassa831 New Member

    Joined:
    Apr 23, 2009
    Messages:
    2
    Likes:
    0
    and firmware PLEASE!
     
  17. renekenshin

    renekenshin New Member

    Joined:
    Jun 17, 2010
    Messages:
    8
    Likes:
    0
    Hi Be do you have another hex design for the cube? I really don't have much time to create my own code due to very hectic schedules. If you could posts another cool sequence i would gladly reprogram my pic to try it :)
     
  18. renekenshin

    renekenshin New Member

    Joined:
    Jun 17, 2010
    Messages:
    8
    Likes:
    0
    Anyways i made a PCB using Eagle complete with component guide and schematic during my spare time, enjoy :)
     

    Attached Files:

  19. renekenshin

    renekenshin New Member

    Joined:
    Jun 17, 2010
    Messages:
    8
    Likes:
    0
    Final Release and New Hex code

    Oops sorry for the inconvenience, some last minor changes were made on the pcb to accommodate the new firmware released by Be80be named - new3x3x316f628a. The Bottom and Top layer should be connected in reverse and the connection from LED9 to R1 going to pin 1 (RA2) should be connected to pin 2 (RA3) instead. For those that already made the pcb above just cut the trace from pin 1 and use a jumper or a small wire to connect it to pin 2 and just reverse the layer connection (Top should be Bottom and vice versa). Use the new firmware new3x3x316f628a.HEX
     

    Attached Files:

  20. ecampos

    ecampos New Member

    Joined:
    Dec 26, 2010
    Messages:
    2
    Likes:
    0
    Hi guys !


    I've just finished the project above and i'm experiencing a strange behaviour: I'm actually trying to light led located at PORTA-7/PORTB-0 ONLY, but when i do this led PORTA-5/PORTB-0 lights too ! When i light led PORTA-5/PORTB-0 ONLY it works... Source code:

    Code (text):
        list      p=16f628          ; list directive to define processor
        #include <p16F628.inc>      ; processor specific variable definitions

        __config 0x3D18             ; configuration settings

        cblock  0x20
            count1          ;used in delay routine
            counta          ;used in delay routine
            countb          ;used in delay routine
        endc

        org 0x0000
       
        movlw   0x07
        movwf   CMCON  
       
        bcf     STATUS, RP1
        bsf     STATUS,RP0
       
        movlw   b'00000000'
        movwf   TRISB  
        movlw   b'00000000'
        movwf   TRISA

        bcf     STATUS, RP0

        clrf    PORTA
        clrf    PORTB

        call    Loop
    Loop:

        movlw   b'00100000'     ; PORTA-5
        movwf   PORTA

        movlw   b'00000001'     ; PORTB-0
        movwf   PORTB
        call    Delay

        clrf    PORTA
        clrf    PORTB
        call    Delay


        movlw   b'10000000'     ; PORTA-7
        movwf   PORTA

        movlw   b'00000001'     ; PORTB-0
        movwf   PORTB
        call    Delay
       
        clrf    PORTA
        clrf    PORTB
        call    Delay

        goto    Loop

    Delay   movlw   d'250'          ;delay 250 ms
        movwf   count1
    d1  movlw   0xC7
        movwf   counta
        movlw   0x01
        movwf   countb
    Delay_0
        decfsz  counta, f
        goto    $+2
        decfsz  countb, f
        goto    Delay_0

        decfsz  count1  ,f
        goto    d1
        retlw   0x00

     end
    Thank you for your help !
     
    Last edited: Dec 26, 2010
  21. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,798
    Likes:
    134
    Location:
    morristown,tn
    You have a led backwards
     

    Attached Files:

    Last edited: Dec 26, 2010

Share This Page