16F1824 "HPWM 2" woes (command seemingly forces PortC.3 from analogue to digital)


Results 1 to 11 of 11

Threaded View

  1. #9
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: 16F1824 "HPWM 2" woes (command seemingly forces PortC.3 from analogue to digital)

    I concur...the 16F182x are a great range of chips...absolutely chocka with features.

    I can't say I've had a lot of setup problems with them (certainly nothing that wasn't obvious when I complied)....other than this pesky HPWM 2 issue, the one other issue I had Darrel kindly helped sort....

    I needed to modify the 16F1824.INC file (mods in red)....

    Code:
    ;****************************************************************
    ;*  16F1824.INC                                                 *
    ;*                                                              *
    ;*  By        : Leonard Zerman, Jeff Schmoyer                   *
    ;*  Notice    : Copyright (c) 2010 microEngineering Labs, Inc.  *
    ;*              All Rights Reserved                             *
    ;*  Date      : 09/14/10                                        *
    ;*  Version   : 2.60b                                           *
    ;*  Notes     :                                                 *
    ;****************************************************************
            NOLIST
        ifdef PM_USED
            LIST
            "Error: PM does not support this device.  Use MPASM."
            NOLIST
        else
            LIST
            LIST p = 16F1824, r = dec, w = -302
            INCLUDE "P16F1824.INC"	; MPASM  Header
            ;__config _CONFIG1, _FOSC_HS
            ;__config _CONFIG2, _PLLEN_OFF & _LVP_OFF
            NOLIST
        endif
            LIST
    BLOCK_SIZE	EQU	32
    CCPTMRS0 = CCPTMRS
    The first two mods (semi colons) are standard fayre, but that last one would have taken me a good few years to get to the bottom of on my own.
    Last edited by HankMcSpank; - 21st April 2011 at 11:30.

Members who have read this thread : 0

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