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
    Still not working....i am getting following voltages..

    after the 10k - 1.54v(is this resistor required)
    after the diode - 0.99v
    after every 1k - 0.03v(i don't think so this is enough for to glow an LED)

    Is my jdm is not programming properly or something wrong in my wiring... i am clueless...

    How can i check my pic is programmed properly and it is working?

    can u tell where and what voltages i will get if the programe is working properly...

    Robotsmani :-(
     
    Last edited: Mar 26, 2009
  2. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    170
    Location:
    Toronto, Canada
    RA4 on the 16F628 is an open collector output. It can only sink current not source.
     
  3. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    ONLINE
    You no whats the whole deal here is no one read all the post just parts And i did this on 4 chips if they could read the code they would know where led 9 goes and I didn't tell any one to use 10 k on any leds there 150 ohms the 10k goes to mclr to vdd the 1k drive the 3 transistors now Bill is right you can't put a led on PORTA,4 it can only sink power I should of look back a what did when I made this work on a 16f628a But I can't I lost my harddrive
    on the computer I use for this. You use PORTA,2 for led 9
    Code (text):

    Output2:
                                ; --- Top Layer ---
        clrf    PORTA           ; clear port B
        movfw   Layer1          ; move layer1 to W
        movwf   PORTB           ; put W onto PortC

        btfsc   Layer4,7        ; see if LED 9 should be on
    [COLOR="Red"]   bsf     PORTA,2         ; turn on LED 9[/COLOR]
     
    here the right circuit For the 16f628a or 16f628 3x3x3 LED Cube - can i use16f628 instead 16f690 - Page 5 - Electronic Circuits Projects Diagrams Free
     
    Last edited: Mar 26, 2009
  4. dave

    Dave New Member

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


     
  5. robotsmani

    robotsmani Member

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

    Oh...is there any difference in 16f628 and 16f628a. I am using 16f628A. is that the problem, then what is the change the circuit and program for 16f628A?

    Thanks,
    Robotsmani
     
  6. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    ONLINE
    Last edited: Mar 26, 2009
  7. robotsmani

    robotsmani Member

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

    i have done the circuit like http://www.electro-tech-online.com/a...28led-cube.png only. but my doubt is on my pic. how can i check my pic is working. because all the other wiring is correct (i checked). is the follwing voltages are correct?

     
  8. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    ONLINE

    Attached Files:

    Last edited: Mar 26, 2009
  9. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    Cool it is working....my doubt is right. my pic is not working. i tried with winpic it is working except RA4 and RB2...Like the above reply do i need to reprogram it....

    It is really great to look at the working LED...Thanks a bunch be80be

    Robotsmani
     
  10. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    ONLINE
    what do you mean
    Just move led 9 from ra4 to ra2 is all you need to do.
     
    Last edited: Mar 26, 2009
  11. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    Yes moved the RA4 it is working now. only the RB2(pin8) is not glowing.....
     
  12. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    NOW IT IS WORKING. there some wiring problem....

    :):)IT IS WORKING NOW:):)

    Thanks Thanks Thanks
     
  13. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    ONLINE
    I know It would just a matter of time LOL
     
  14. welflash

    welflash New Member

    Joined:
    Mar 8, 2009
    Messages:
    22
    Likes:
    0
    Yes, mine too...
    all LED working now after i move the 9th LED to RA2, thanks to you.
    and now i'm about to learn to give some modification to the HEX,
    i'm telling you be80be, i'm gonna spend your time with a lot of question,
    it's your fault for being a master of it, LOL.
     
  15. robotsmani

    robotsmani Member

    Joined:
    Oct 15, 2008
    Messages:
    86
    Likes:
    1
    Location:
    Bangalore, India
    Next i will try to make a PCB for this....

    Thanks,
    Robotsmani
     
  16. welflash

    welflash New Member

    Joined:
    Mar 8, 2009
    Messages:
    22
    Likes:
    0
    :D:D:D
    this is my cube...
    :D:D:D



    i made a little change to the position...
    well i guess it's not cube anymore...
     

    Attached Files:

  17. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    ONLINE
    great job that looks real cool
     
  18. welflash

    welflash New Member

    Joined:
    Mar 8, 2009
    Messages:
    22
    Likes:
    0
    Thanks...
    well...it won't happen without your help,

    be80be,
    i'd like to use switches at unused portA for some command
    let's say...
    i wanna call label 0008 with switch at RA0,
    label 0009 with switch at RA1 and label 0010 with switch at RA3

    how could i do that
    could i just add this to the hex
    BTFSS PORTA , 00
    CALL Label_0008
    BTFSS PORTA , 01
    CALL Label_0009
    BTFSS PORTA , 03
    CALL Label_0010

    or is there anything else to change/add?
    thank you in advanced
     
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    ONLINE
    You added it to asm and rebuild the hex that code doesn't do any thing but check them. And you need to debonuce the switch here look at this
    Code (text):

    LookingForDown:
         clrw                          ; assume it's not, so clear
         btfss     PORTA,3             ; wait for switch to go low
         incf      Counter,w           ; if it's low, bump the counter
         movwf     Counter             ; store either the 0 or incremented value
         goto      EndDebounce
         
    LookingForUp:
         clrw                          ; assume it's not, so clear
         btfsc     PORTA,3             ; wait for switch to go low
         incf      Counter,w
         movwf     Counter
     
    that's one way i'll post you a easy one when i get home
    Here read this it's real good to show you how to use switches
    http://www.electro-tech-online.com/custompdfs/2009/04/PIC_Mid_A_3.pdf
     
    Last edited: Apr 6, 2009
  20. welflash

    welflash New Member

    Joined:
    Mar 8, 2009
    Messages:
    22
    Likes:
    0
    ok...thanks a lot
    i'll read it
    hope that i could understand it.
     
  21. welflash

    welflash New Member

    Joined:
    Mar 8, 2009
    Messages:
    22
    Likes:
    0
    i tried that but sadly i couldn't make the hex file right with mplab
    the hex file just filled with 3FFF
    i've search through google to find asm to hex converter but i couldn't find good one
    could anyone show me a simple programmer schematic that i could use with mplab cause i don't have cc to buy real prgrammer on the net
     

Share This Page