16 bit PWM using CCP1


Closed Thread
Results 1 to 40 of 61

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: 16 bit PWM using CCP1

    Quote Originally Posted by richard View Post
    in dt's code the var is declared in a asm routine and as EXT in pbp


    if you declare a var in pbp and wish to refer to it in asm it must be prefixed with an underscore as others have stated
    That is from post #1 but in #3 which Talat is using
    Code:
    DutyHold1 VAR WORD BANK0 SYSTEM      ' holds next dutycycle, synch with PWM 
    DutyHold2 VAR WORD BANK0 SYSTEM      '
    is the way they are declared and again "_" is not used.

  2. #2
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: 16 bit PWM using CCP1

    Found the answer in the manual of all places!
    Modifiers can be used to specify certain attributes of the variable when created:
    address A numeric address may be used as a modifier. This instructs PBP where to locate the variable in RAM.
    BANKx Instructs PBP to locate the variable in a specific bank of RAM.
    SYSTEM The default behavior of PBP is to append a prefix underscore character when creating the variable in Assembly Language. The SYSTEM modifier inhibits this behavior so that the variable name will be identical in PBP code and Assembly code.
    Does anyone read the manual, me included obviously?

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,643


    Did you find this post helpful? Yes | No

    Default Re: 16 bit PWM using CCP1

    when all else fails

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Half-bridge PWM with a 16F684 ?
    By Byte_Butcher in forum General
    Replies: 7
    Last Post: - 17th January 2010, 22:18
  3. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  4. How to tell which PICs can handle 16 bit variables?
    By MikeTamu in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st August 2005, 08:44
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

Members who have read this thread : 2

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