LCD / PC question


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    May 2007
    Location
    Area 71
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    I changed my code to :
    Code:
    main:
    LCDOUT $FE, 1
    LCDOUT $FE, $C0, "test"
    hserout ["test" ]
    pause 1000
    goto main
    LCD displays "test" , nO problem
    Terminal program displays:"
    ÈKÛ¼ìÿ ( String )
    C8 4B DB BC EC FF (Hex)

  2. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Its a problem with your serial baud settings for your pic.

    Change the SPBRG value to 64 like this:

    DEFINE HSER_SPBRG 64

    You could probably even remove that line altogether.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  3. #3
    Join Date
    May 2007
    Location
    Area 71
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    thanks Kamikaze

    After few hours trying any possible setup, I solved the problem

    The problem is with HSPLL config.

    If I change the config to:
    _FOSC_HS_1H
    define osc 10, it works

    but if I change the config to :
    _FOSC_HSPLL_HS_1H
    define osc 40, it did not work as expected

    HSPLL suppose to multiply the frequency, and if I define osc to 40 ( 4x ) it should be working right out of the box , right ? Or did I forget something ?

    Could anyone share information about this ?

  4. #4
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    The PLL expects an input frequency that is a multiple of 4, which your 10 Mhz clock is not.

    For this PIC I usually use a 4Mhz crystal with _PLLDIV_1_1L, _CPUDIV_OSC1_PLL2_1L, and _USBDIV_2_1L which results in a 48Mhz clock for the processor.

    Have a look at the table in the data sheet on pages 29 and 30.

    edit: also have a look at the figure on page 24 - it shows that the PLL must have a 4Mhz input.
    Last edited by Kamikaze47; - 25th August 2008 at 09:56.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

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