Can't properly configure RA3,Ra4 as digital out (PIC16F876A)


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2010
    Posts
    37

    Default Can't properly configure RA3,Ra4 as digital out (PIC16F876A)

    Hi!
    Please help me to configure RA3 and RA4 as digital out (PIC16F876A). On Proteus simulator all are working fine but not in real world.
    I know that RA$ is Digital I/O – Open-drain when configured as output.
    I have used:

    TRISA = %00000001
    ADCON1 = %10001110
    cmcon = %00000111

    Thank you very much.
    PIC16F876A Datasheet
    Last edited by luxornet; - 4th July 2014 at 12:47.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,389


    Did you find this post helpful? Yes | No

    Default Re: Can't properly configure RA3,Ra4 as digital out (PIC16F876A)

    can't see anything wrong with your settings ,its only porta4 that's open drain but I assume
    RA$
    is just a typo
    have you tried adcon1=6 just to try a minimal setting ?

    maybe if you post your code something will stand out

  3. #3
    Join Date
    Jan 2010
    Posts
    37


    Did you find this post helpful? Yes | No

    Default Re: Can't properly configure RA3,Ra4 as digital out (PIC16F876A)

    Thank you for your answer, richard.
    I know that RA4 is Digital I/O – Open-drain when configured as output.
    I will try adcon1=6

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Can't properly configure RA3,Ra4 as digital out (PIC16F876A)

    Quote Originally Posted by richard View Post
    can't see anything wrong with your settings ,its only porta4 that's open drain but I assume is just a typo
    have you tried adcon1=6 just to try a minimal setting ?

    maybe if you post your code something will stand out
    He He $, that's a Capital 4 . . . do that myself every now and again . .
    Try setting ADCON0 to zero, at least bit zero.
    Last edited by Archangel; - 4th July 2014 at 21:30.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598


    Did you find this post helpful? Yes | No

    Default Re: Can't properly configure RA3,Ra4 as digital out (PIC16F876A)

    AllDigital will tell you exactly what you need.

    http://www.picbasic.co.uk/forum/showthread.php?t=18529

    Robert

Similar Threads

  1. RA3 won't get a high level.
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 22nd August 2014, 20:41
  2. PIC16F1824, problem with oscillator and RA3,RA4,RA5
    By billys7 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 6th May 2014, 18:38
  3. CONFIGURE & OSCCON & meProg configure
    By SUNFLOWER in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th February 2011, 21:25
  4. problem with output RA2 and RA3
    By savnik in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th December 2006, 13:49
  5. 16f688 and MCLR (ra3) as input
    By kitcat in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st March 2005, 18:15

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