MikroE clicker, 18f47J53, serout 2 to serial LCD issues


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    brookfield, ct, usa
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Re: MikroE clicker, 18f47J53, serout 2 to serial LCD issues

    OK Henrik - you were right. I changed PLLDIV to 4, and set OSC = 48, and it works.

    But now I have to ask why it didn't work when I tried OSC = HS

    ; CONFIG CFGPLLEN = OFF ; PLL Disabled - doesn't this mean PLL is turned off?

    Thanks for your help - as usual more to learn.

    Thanks again

    Alec

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: MikroE clicker, 18f47J53, serout 2 to serial LCD issues

    Hi,
    OK, I'll try this again:
    When you're using the MikroE USB HID bootloader the CONFIG bits aren't written to device since doing so can make the bootloader it self stop working, basically bricking the board. The bootloader code (and the actual USB hardware in the PIC) relies on the fact that the PIC is running at 48MHz. IF the bootloader allowed itself to change the CONFIG it would sort of allow itself to commit suicide and you'd need to reload the bootloader into the chip using a normal device programmer. I'm 99.9% sure this is the case with the MikroE USB Bootloader as well.

    This means that you changing to OSC = HS or trying to change the PLLDIV doesn't actually do anything to the operation of the device. It is and always has been running at 48MHz. I only said that IF the config bits where updated the default PBP config, with PLLDIV=5 isn't correct when using a 16MHz x-tal. But for that change to actually end up in the chip you'd need to use an actual device programmer.

    I'm pretty sure that the sole thing that made it work in your case was specifying the correct oscillator frequency to the compiler, ie DEFINE OSC 48.

    CONFIG CFGPLLEN = OFF ; PLL Disabled - doesn't this mean PLL is turned off?
    Yes, you're quite right. It means that the PLL is off by default but that it CAN - (because OSC = HSPLL) - be turned ON at runtime by setting OSCTUNE.6
    If CFGPLLEN = ON then the PLL is permanently on and can not be turned off by software.

    Does that make any sort of sense?

    /Henrik.

  3. #3
    Join Date
    Feb 2005
    Location
    brookfield, ct, usa
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Re: MikroE clicker, 18f47J53, serout 2 to serial LCD issues

    Thanks Henrik, now it makes sense. When I got it to operate correctly under the internal oscillator, by setting the correct values for the OSCCON register, telling it to use the 8 mhz internal clock, it works because software changed the clock source, and not from setting the configuration files which the bootloader ignores to make sure that the configuration needed for the bootloader never changes.

    Thanks again

    Alec

Similar Threads

  1. 18F47J53 ADCON Setting
    By gavo in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th August 2014, 14:06
  2. StartUSB board from MikroE
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 2nd June 2014, 06:37
  3. Random Serin/Serout issues
    By Szczepaniec in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th May 2011, 03:11
  4. Parallax Serial LCD and issues
    By nbrucew in forum mel PIC BASIC
    Replies: 5
    Last Post: - 18th September 2009, 04:42
  5. Serout/serin issues, advice required
    By Agent36 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th May 2008, 22:51

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