16f946


Closed Thread
Results 1 to 21 of 21

Thread: 16f946

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    You should only use HIGH, LOW or TOGGLE on physical PINs.

    Using HIGH on any other register will cause it to clear a bit in another register that you didn't specify. PBP thinks it's clearing a TRIS bit, but that's only the case if a PIN is used.

    For instance, writing HIGH LCDDATA5.2 will also clear LCDDATA17.2

    HIGH LCDDATA8.3 will clear LCDDATA20.3
    ... and even worse ...
    HIGH LCDDATA12.0 will clear T1CON.0, which turns off Timer1 if running.
    All kinds of strange things can happen.

    LCDDATA12.0 = 1 would work much better.
    <br>
    DT

  2. #2


    Did you find this post helpful? Yes | No

    Thumbs down

    Thank you, Darrel! You're GREAT, as usual.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Characters display perfectly now, thank you. Only one slight problem- when I compile with MPASM, I get the following warning: "Warning[219]c:\pbp\pbppic14.lib 905 : Invalid RAM location specified." Is this anything to be concerned with? I want to use MPASM so that I can use DT Instant Interrupts.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jderson View Post
    Is this anything to be concerned with?
    Yes it is.

    The error is from a MOVE?CT macro. So one of the LCDDATAxx.x = 1 statements may have been edited wrong.

    If you look in the .LST file, and search for "Warning", you should see which one caused it from the line following the warning message.
    <br>
    DT

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Fixed it, thank you!

  6. #6


    Did you find this post helpful? Yes | No

    Default

    I have been trying to make an "INCLUDE" file containing all the various LCDDATA subroutines, but the compiler doesn't like it because LCDDATA is processor-specific, apparently. How is this done?

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Not sure what you mean, but ...

    The Main file that you are compiling determines the processor for all the include files too.

    If you are trying to compile the include file by itself, you probably just need to change the chip in the drop-down box in MicroCode Studio.
    <br>
    DT

Similar Threads

  1. 16F946 pcb footprint (64 tqfp)
    By nomad in forum Schematics
    Replies: 2
    Last Post: - 8th September 2009, 11:14
  2. Replies: 4
    Last Post: - 17th April 2009, 08:56
  3. 16F946 Instant Interrupts problem
    By jderson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th April 2009, 22:20
  4. Problem with Bank 3 in 16F946
    By karlosguay in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th September 2006, 00:19

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