Connect with us

PIC16F690 - RA5 digital input. Cannot change state. Even in Sim. What have'nt I done? Please?

Discussion in 'Electronic Basics' started by Me, May 5, 2007.

Scroll to continue with content
  1. Me

    Me Guest

    Hi All,
    I am having a problem switching just RA5 on a 16F690. I have been going through the
    docs and the net. I just can't find what it might be.
    My prog worked fine until I reset the processor in the Sim and now when I setup porta
    as digital input and clrf it I, get 00100000 out .
    My config word is _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF &
    As far as I know that should do it, but it does'nt.

    Any ideas welcome.

  2. Guest

    Show the code you're using for setting up TRISA.
  3. Randy Day

    Randy Day Guest

    RA5 doubles as one of the external clock oscillator
    pins. It's probably one of the config codes relating
    to that.

    Can't be much more help than that, at this point.
    Lost my devel 'puter in a break-in recently. :(
  4. Since your programming was working until you reset the simulation, you may
    have not cleared memory after resetting. This could result in "leftover"
    information in the registers not giving you the results you were getting.
    You can see if that is the case by single-stepping through the simulation
    and observing the registers.

    To clear memory, assuming MPLAB: pull down Debugger and Clear Memory, then
    select All Memory (or do each individually). You may even want to rebuild
    your program, then try re-running it.
    Alternatively, get out of MPLAB and then restart.

    Hope this helps.
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