LCDOUT not working at 16mhz oscillator speed.


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT not working at 16mhz oscillator speed.

    Changed: OSCCON=%01111011

    Now LCD works on 16mhz, but still misbehaves sometimes - displayed characters get distorted, say you send text "TEST TEXT" and some letters will be replaced with garbage from user character area. I tried adding filtering capacitors/etc - no luck.

  2. #2
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT not working at 16mhz oscillator speed.

    You don't want filtering caps on communications lines, you want the high-low-high transitions as crisp as possible. If anything, you may adjust the SLRCONx settings.

  3. #3
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT not working at 16mhz oscillator speed.

    LOL I'm not adding filtering caps to data lines. I'm adding them to power lines

  4. #4
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT not working at 16mhz oscillator speed.

    Looking at the library code, if the clock is set for > 16MHz (or 24MHz in some cases) it uses a longer internal delay before asserting some of the control pins.
    Try this - lie to the compiler and tell it you're running faster than you really are:
    DEFINE OSC 32 'set oscillator speed

    Don't change your OSCCON setting... leave it so you're still actually running at 16MHz.

  5. #5
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT not working at 16mhz oscillator speed.

    Yes I already tried that and it works just fine, but it messes up with all other timing settings in my code, which is about 16K.
    Is there any way to adjust the library settings?

  6. #6
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT not working at 16mhz oscillator speed.

    Not that I see, at least not without re-writing the lib asm code.

    It looks like your display just isn't compatible with the timing of LCDOUT.
    Your method of changing the osc freq before/after using the LCD is probably the easiest "fix" that comes to mind.

  7. #7
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT not working at 16mhz oscillator speed.

    Yes, quite possible, since this is not usual 1602 LCD module - it has 3 character sets (JP, Western europe, Cyrilic), switchable just like in WS0010. It also ignores LCDOUT $FE,$0 statement. But I will try with other 1602 modules and write the results.

Similar Threads

  1. Define oscillator speed
    By CipiCips in forum PBP3
    Replies: 1
    Last Post: - 8th August 2016, 13:51
  2. PAUSEUS Using a 16MHz Oscillator
    By rsocor01 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 10th October 2013, 22:17
  3. Replies: 2
    Last Post: - 25th July 2012, 02:19
  4. High Speed Oscillator question
    By Tina10 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th July 2012, 10:29
  5. First time with external oscillator - 16F877a Not working
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 15th October 2009, 17:14

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