pic16f628a issue


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1

    Default pic16f628a issue

    So I am trying to write a hello world program of sorts for a 16f628a chip. I have a led hooked up to portb 3. Here is the code that is not working

    Code:
    Main:
    High PortB.3
    pause 100
    Low PortB.3
    pause 100
    goto Main
    The led is not turning on. Why is this not working?

  2. #2
    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

  3. #3


    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

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


    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

  5. #5


    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 ?

  6. #6


    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

  7. #7


    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