pic16f628a issue


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    60


    Did you find this post helpful? Yes | No

    Default Re: pic16f628a issue

    Do you have PortB set as output? You need TrisB.3 = 0 in your code.
    Regards
    CharlieM
    Using PBP3
    MCSPX

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: pic16f628a issue

    Quote Originally Posted by c_moore View Post
    Do you have PortB set as output? You need TrisB.3 = 0 in your code.
    well I didnt, but even with that code at the top it does not work

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: pic16f628a issue

    What config settings did you use?

    What PBP version do you have?

    PM or MPASM assembler?

    Robert

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: pic16f628a issue

    How is your led connected, and what resistor value are you using for it ?

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: pic16f628a issue

    Quote Originally Posted by aerostar View Post
    How is your led connected, and what resistor value are you using for it ?
    If i remember right it is connected to the positive end, then the negative end is grounded, and there is no resistor. But I know that the configuration is correct

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: pic16f628a issue

    Technically, you're supposed to put a current-limitting resistor along with an average LED with 5 VDC; most use 330ohms. Does the LED still work on 5 VDC and a resistor? Confirming it isn't burnt is a good start.

    Basics on Configs here:
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    Some overview on what files are used (I have v2.60, so it's about the same as 2.50 - the syntax for 16F is just a bit different):
    http://www.picbasic.co.uk/forum/showthread.php?t=15982

    Robert


    EDIT: Look at top right, try CONFIG 16F628A in Advanced Search.

    Here is one thread that came up:
    http://www.picbasic.co.uk/forum/showthread.php?t=9794
    Last edited by Demon; - 29th April 2012 at 05:26. Reason: Search feature and example

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: pic16f628a issue

    Quote Originally Posted by Demon View Post
    Technically, you're supposed to put a current-limitting resistor along with an average LED with 5 VDC; most use 330ohms. Does the LED still work on 5 VDC and a resistor? Confirming it isn't burnt is a good start.

    Basics on Configs here:
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    Some overview on what files are used (I have v2.60, so it's about the same as 2.50 - the syntax for 16F is just a bit different):
    http://www.picbasic.co.uk/forum/showthread.php?t=15982

    Robert


    EDIT: Look at top right, try CONFIG 16F628A in Advanced Search.

    Here is one thread that came up:
    http://www.picbasic.co.uk/forum/showthread.php?t=9794
    the led works, and I have been told by 2 friends of mine familiar with what I am doing that I dont need a resistor because of my setup.

    But even after reading that stuff I can still not get this working for the life of me. Here is my, still broken, code.
    Code:
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _LVP_OFF
    
    Define OSC 4
    CMCON = 7 
    VRCON = 0 
    
    
    
    
    PortA=0
    TRISA=0000
    TRISB = 0000 
    PortB = 0000 
    
    
    Main:
    High PortB.3
    high PortA.1
    pause 1000
    Low PortB.3
    low PortA.1
    pause 1000
    goto Main


    Also, I just found these fuse settings in my programmer, should one of these settings be different?

  8. #8


    Did you find this post helpful? Yes | No

    Default Re: pic16f628a issue

    Quote Originally Posted by Demon View Post
    What config settings did you use?

    What PBP version do you have?

    PM or MPASM assembler?

    Robert
    what is a config value?
    2.5 if I remember right
    mpasm

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