Pwm portb in pic 16f628 in same time


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Pwm portb in pic 16f628 in same time

    Sorry, you are correct, you just need the wsave at $70. If you are going to put it in your file, just make sure they are all edited out in the include file. But put:

    wsave VAR BYTE $70 SYSTEM ' location for W if in bank0

    above the include line.

    Sorry for giving you bad advice.
    </pre>

  2. #2
    Join Date
    May 2010
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: Pwm portb in pic 16f628 in same time

    Ic,ok I am not professional in PicBasic, I learning,but thks,to your help!

    Is correct this :
    Code:
    ;-- Place a copy of these variables in your Main program -------------------
    ;--   The compiler will tell you which lines to un-comment                --
    ;--   Do Not un-comment these lines                                       --
    ;---------------------------------------------------------------------------
    ;wsave   VAR BYTE    $20     SYSTEM      ' location for W if in bank0
    ;wsave   VAR BYTE    $70     SYSTEM      ' alternate save location for W 
                                             ' if using $70, comment wsave1-3
    
    ' --- IF any of these three lines cause an error ?? ------------------------
    '       Comment them out to fix the problem ----
    ' -- Which variables are needed, depends on the Chip you are using --
    wsave VAR BYTE $70 SYSTEM ' location for W if in bank0
    ;wsave1   VAR BYTE    $A0     SYSTEM      ' location for W if in bank1
    ;wsave2    VAR BYTE    $120    SYSTEM      ' location for W if in bank2
    ;wsave3  VAR BYTE    $1A0    SYSTEM      ' location for W if in bank3
    
    
    ' --------------------------------------------------------------------------
    I write now this in my file DT_INTS-14.bas
    but now I have error message :

    Code:
    ERROR Line 50: Redefinition of VAR.
    I dont now what is now???

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