16F913 RA7 Pin control problem


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Location
    Hernando,Florida USA
    Posts
    8

    Question 16F913 RA7 Pin control problem

    I am having a problem making RA7 an I/O and making it go low.

    ANSEL = 0
    CMCON0 = $07
    INTOSCIO set in the 16F913.inc file which will give me general I/O on RA6 and RA7

    LOW PORTA.7 'should set pin RA7 to output and low. (not working)

    looking at the data sheet @ TABLE 3-1 page 40
    SUMMARY OF REGISTERS ASSOCIATED WITH PORTA
    the only registers used by RA7 are :
    TRISA7
    LCDEN
    LCDSE0
    LCDSE1

    Anyone have any ideas

    Thanks Wayne
    Last edited by Wayne; - 26th January 2006 at 21:41.

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


    Did you find this post helpful? Yes | No

    Default

    Is the INTRC is also set when you import your program in the programmer software too?

    Is a simple blink elsewhere work?
    Steve

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

  3. #3
    Join Date
    Sep 2005
    Location
    Hernando,Florida USA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Hi Mr. E

    I have setup the program in the MPLAB Sim and this is what happens.
    I set the config bits to use INTOSCIO in MPLAB.
    then compile and run in the sim.
    TRISA.6 and TRISA.7 read as "1"
    after TRISA.7 = 0
    LOW PORTA.7 the port reads "0" but it is in tristate ( on the PCB)
    there is a 20K res to vcc going to RA7 always high.
    when I write a "0" to PORTA.7
    It looks like the 16F913 thinks it is in one of the external modes.
    But with no xtal on the PCB how could it run.
    All other functions of the program work.
    I changed the program to use RB6 and it works, but I need RB6 for other things.


    The line below is from the data sheet.
    Note: TRISA<7:6> always reads ‘1’ in XT, HS and LP OSC modes.
    But it is in INTOSCIO mode

    Thanks
    Wayne

  4. #4
    Join Date
    Apr 2005
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Wayne,

    Did you happen to find the solution to this issue? I am trying to do the same thing on a 16F690 and porta.4 is not controllable. It just sits there oscillating up and down when I try to set it as an output.

    I can control any other pin on portA, just not RA4.

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. Replies: 1
    Last Post: - 6th April 2007, 10:50
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07

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