Problem with porta for 16F886(PIC 28X1)


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default Problem with porta for 16F886(PIC 28X1)

    Hi all!
    I have problems with making portA for 16F886(PIC 28X1) a digital input. I use PICAXE Programming Editor, downlowd't from picaxe.co.uk in basic language, not assembler. So, I need a code to transform portA pins from analogue in digital input, and when I perform the program , the leg 2,3,4,5 I want to appear like inputs.

    PS: For my hobby project I need 12 digital inputs an 8 outputs. If I perform a simple program like:

    "main:
    let pins=outpins
    goto main"

    it appear to the monitor a PIC 16F886 just with 8 inputs and 8 outputs and i don't know how make the portA pins became - and apper in simulate - digital inputs((

    If you can help me, please-please from my heart just do't!!!
    Sorry for my english! )) I'm a romania beginner.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Can't help with your programming environment/setup as we use Melabs PICBasic Pro here, but you may have a look at PIC16F886 datasheet.

    Section 8 Comparator
    CM1CON0 = 0 ' disable comparator
    CM2CON0 = 0 ' disable comparator

    Section 9 ADC
    ANSEL=0 ' disable all ADC

    PicAxe forum
    http://www.picaxeforum.co.uk/
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thank you very much for your help! I posted my problom to the picaxe forum and i hope to resolve this impediment. So, thank you very much again!

Similar Threads

  1. PortA digita input?
    By MOUNTAIN747 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th January 2009, 21:55
  2. portA problem
    By keymuu in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 15th October 2008, 16:48
  3. PIC's ports individual bits manipulation - how to?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 27th February 2007, 22:34
  4. 16f876 PortA set-up trouble?
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2006, 19:31
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

Members who have read this thread : 1

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