Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1263 pic16f785.h -- Has incorrect CMxCONx bit definitions

closed-out-of-date
nobody
5
2013-05-25
2006-12-26
Sasha
No

The addresses for the registers are correct, but when writing to the associated pins (CxON, CxCHx, etc) the bits don't end up actually going into the correct places in the SFRs. You can verify this by compiling the program with:

"sdcc -mpic14 -p16f785 example.c"

...and then simulating it in MPLAB or running the code on real hardware (to find that the comparator doesn't work).

This is using sdcc 2.6.0 #4309

There are no error messages, my email address is included (I am logged on). I'm happy to test modified header files on real hardware.

Thanks!
-Sasha

Discussion

  • Sasha
    Sasha
    2006-12-26

    Example code

     
    Attachments
  • Raphael Neider
    Raphael Neider
    2006-12-28

    • milestone: --> fixed
    • status: open --> pending-out-of-date
     
  • Raphael Neider
    Raphael Neider
    2006-12-28

    Logged In: YES
    user_id=1115835
    Originator: NO

    Hi Sasha,
    you probably only need to update your SDCC installation: There was an off by one bug in the pic14 backend concerning bitwise access to memory. I can currently not verify this, but believe that this issue is fixed in recent versions of SDCC. Try the svn version or a recent nightly build from http://sdcc.sf.net/snap.php (around 4532, 200+ patches later than your installation).
    You may close this if an update solved your problem or report back if it does not, then I will have a closer look.

    Good luck and a happy new year,
    Raphael

     
  • Raphael Neider
    Raphael Neider
    2006-12-28

    Logged In: YES
    user_id=1115835
    Originator: NO

    Hi Sasha,
    you probably only need to update your SDCC installation: There was an off by one bug in the pic14 backend concerning bitwise access to memory. I can currently not verify this, but believe that this issue is fixed in recent versions of SDCC. Try the svn version or a recent nightly build from http://sdcc.sf.net/snap.php (around 4532, 200+ patches later than your installation).
    You may close this if an update solved your problem or report back if it does not, then I will have a closer look.

    Good luck and a happy new year,
    Raphael

     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending-out-of-date --> closed-out-of-date