16f946


Closed Thread
Results 1 to 21 of 21

Thread: 16f946

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Thank you for the advice!

  2. #2


    Did you find this post helpful? Yes | No

    Default

    It seems the "HELLO WORLD" program I posted has problems. If certain characters are added to the seventh digit, the second digit becomes corrupted. The attached program is the same as the other one, with the digit "8" added after the "D" in "WORLD". You see that the "W" loses the "L" segment. I believe that this is happening because I'm trying to write characters at the wrong time. I have tried using "Type-B waveforms" and the LCD interrupt, but I don't understand how to use this interrupt. Does anyone have any ideas? Thank you.
    Attached Files Attached Files

  3. #3
    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

  4. #4


    Did you find this post helpful? Yes | No

    Thumbs down

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

  5. #5


    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.

  6. #6
    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

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Fixed it, thank you!

Similar Threads

  1. 16F946 pcb footprint (64 tqfp)
    By nomad in forum Schematics
    Replies: 2
    Last Post: - 8th September 2009, 12:14
  2. Replies: 4
    Last Post: - 17th April 2009, 09:56
  3. 16F946 Instant Interrupts problem
    By jderson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th April 2009, 23:20
  4. Problem with Bank 3 in 16F946
    By karlosguay in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th September 2006, 01: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