Connect with us

understanding the pic16f627a

Discussion in 'Microcontrollers, Programming and IoT' started by foTONICS, Jul 19, 2012.

Scroll to continue with content
  1. foTONICS

    foTONICS

    332
    9
    Sep 30, 2011
    So I've been doing lots of reading and researching and I feel I can confidently program one of these babies except for one thing. My problem is any tutorials i read i can't seem to find how to initialize one of the outputs. I dont know what to call them when writing my program.

    looking at the schematic i would believe, that since there are two ports, that RA0 would indicate an output at portA and RB0 would indicate one at PORTB.

    so if i wanted to write a simple program that turned on RA0 do i just type this?

    bsf PORTA, RA0

    or do I have to define these somewhere or are they already defined in the #include file?
     
  2. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    You need to include

    #include <p16F627A.inc>

    And the symbols will be defined.

    bob
     
  3. foTONICS

    foTONICS

    332
    9
    Sep 30, 2011
    so

    bsf PORTA, RA0

    will work?
     
  4. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    Yes.

    Bob
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-