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. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    Hi,

    i found this 3x3x3 LED Cube. The PIC 16F690 is not available in the market. Can i use 16F628A for this? Can I use the same 16F690 programe(hex file) for the 16F628A. If i have to reprograme, what changes are required? Is any same kind of programe is there for 16F628A?

    Please reply....


    Thanks,
    Robotsmani
     
  2. BUGATTI118

    BUGATTI118 New Member

    Joined:
    Jan 20, 2009
    Messages:
    3
    Likes:
    0
    Post in English only please - moderator


    it´s impossible
     
    Last edited by a moderator: Jan 21, 2009
  3. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    Is there any 3x3x3 LED Cube(like the above) schematic(with PCB layout, hex file) available using 16F628A or 16F84A.

    Please let me know the links....

    Thanks,
    Robotsmani
     
    Last edited: Jan 20, 2009
  4. dave

    Dave New Member

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


     
  5. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada

    The link in your first post includes the source code and schematic. Should be a good project to brush your assembly skills on. You'll need to disable the comparators on the 628A (don't use the 84A as the project also uses the RA6&RA7 pins)
     
  6. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    Thanks,

    Actually i am a beginner of PIC. I just want to make this LED Cube and learn the programming so that i require already build circuit and programe. i have searched in the net, but i didn't get anything using 628A.

    If you know some circuit and programe please let me know...

    Robotsmani
     
  7. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,234
    Likes:
    641
    Location:
    Derbyshire, UK
    They are both 16F series 14 bit PIC's, so it should be fairly easy to convert between them - or just order a 16F690 by mail order.
     
  8. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    Like it said, it's a good project to learn on. If you make a mistake the PICs are reprogrammable.
     
  9. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,808
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    It will work with the 16f628 you just change the code to mach it. It's not that hard to do
    and you'll learn a lot doing it I made it to day it's real cool. It will put on a good light show. Just change it to
    Code (text):

    list      p=16f628A           ; list directive to define processor
        #include <p16F628A.inc>       ; processor specific variable definitions

        errorlevel  -302              ; suppress message 302 from list file

        __CONFIG   _CP_OFF & _DATA_CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_OFF & _INTOSC_OSC_NOCLKOUT
     
    and use porta and portb
     
  10. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,808
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    Here you something to look at it's a 16f628a.asm showing you the changes that you need it may work I don't no I didn't try it.
    It will get you started.
     

    Attached Files:

    Last edited: Jan 21, 2009
  11. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,808
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    Two layers work on the code top and middle. porta is hard to get right lol
     
    Last edited: Jan 21, 2009
  12. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,808
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    Well it works on a 16f628a porta,5 is input only I move it to RA3 it works just like the 16f690 Have fun robtsmani
     
  13. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    Thanks,

    So i can use the attached asm file, right? i will try to build the circuit and programe the asm code and let u know.....


    robotsmani
     
  14. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,808
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    should work it did for me with a 16f628a
     
  15. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,808
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    The code will work but you need to change 1 thing in it
    Code (text):

    clrf    PORTA           ; clear port B
        movfw   Layer3          ; move layer3 to W
        movwf   PORTB           ; put W onto PortC

        btfsc   Layer4,[COLOR="Red"]3[/COLOR]       ; see if LED 9 should be on
        bsf     PORTA,4         ; turn on LED 9

        bsf     PORTA,7         ; turn on layer 2 buy outputing bit 6 of PortB
     
    make the red 3 a 5 or 1 led will stay on all the time
    layer 4 controls portA
     
    Last edited: Jan 22, 2009
  16. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,808
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    Here it is running [embed]http://www.youtube.com/v/OsUJwhyjJJc&hl=en&fs=1[/embed]
     
    Last edited: Jan 22, 2009
  17. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    Cool....i am really excited...i will build this and let u know....

    Thanks a bunch.....:)

    Robotsmani
     
  18. wolflsh

    wolflsh New Member

    Joined:
    Jan 24, 2009
    Messages:
    10
    Likes:
    3
    Location:
    China
    wow!

    That's so cool!

    it only use 27 LEDs,I'm very interesting in it.

    but i have a question.
    If i use 8051,will it control be more easier?:eek:
     
    Last edited: Jan 27, 2009
  19. nre-the-8th

    nre-the-8th New Member

    Joined:
    Feb 16, 2008
    Messages:
    6
    Likes:
    0
    Can anyone help

    I have downloaded the asm file that be80be posted and have tried to compile it with MPLAB, but every time it gets to the org 0 statement it comes up with the error:

    MPLINK 4.30, Linker
    Copyright (c) 2009 Microchip Technology Inc.
    Error - section '.org_1' can not fit the absolute section. Section '.org_1' start=0x00000000, length=0x00000f72
    Errors : 1

    Has anyone got any ideas on how to fix this error or a hex file that they have tried and know it works?

    Thanks for any help.
     
  20. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    I am thinking you did a quickbuild from MPLAB. That will result in the error you found.

    Instead create a project and add both the .asm file and the linker file 16F628A.lkr. Be sure to do CONFIGURE>SELECT_DEVICE then choose the 16F628A.

    HTH
    3v0

     
  21. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,808
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    I didn't use the lkr I use the project wizard set the pic and it builds the hex. The hex is in the led.zip
     

    Attached Files:

    • LED.asm
      File size:
      42.4 KB
      Views:
      2,415
    • LED.zip
      File size:
      2.5 KB
      Views:
      1,197
    Last edited: Feb 4, 2009

Share This Page