HSEROUT at Quarter Rate!


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default Re: HSEROUT at Quarter Rate!

    what crystal are you driving the PIC with? I notice you have the PLL enabled which will multiply the crystal freq. by 4 times. You have declared the operating frequency as 8 Mhz. If you have set the internal frequency as 8 Mhz then you are generating 24 Mhz. I would check your settings....
    Dave Purola,
    N8NTA
    EN82fn

  2. #2
    Join Date
    Jan 2011
    Posts
    6

    Default Re: HSEROUT at Quarter Rate!

    Thanks Dave,

    I am currenty using the internal osc, as set by CONFIG FOSC = INTIO1 and it should be running at 8MHz by the OSCCON=%01100000 configs. In regards to the PLL, by switching it on - by either the PLLCFG or OSCTUNE, it enables the HSEROUT command to operate at the correct baud, but this results in the rest of the pic running at 4 times...

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default Re: HSEROUT at Quarter Rate!

    Gitchie, That is because you have declared to PBP that you are running the code @ 8 Mhz. by the statement:
    define OSC 8 ' Internal OSC runs at 8MHz

    This statement tells PBP to scale all timing statements like PAUSE and the like to use an 8 Mhz. oscillator. You should be setting the DEFINE statement to 32 Mhz. which is the frequency that the processor is actually being clocked at.
    Dave Purola,
    N8NTA
    EN82fn

  4. #4
    Join Date
    Jan 2011
    Posts
    6

    Default Re: HSEROUT at Quarter Rate!

    That's correct, but then the hserout runs at quarter speed... For the moment, I've set the baud to 9600 and will run it at 2400...

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default Re: HSEROUT at Quarter Rate!

    Don't you understand? Just set the baudrate to the desired rate and set the DEFINE OSC 32. Everything will work correctly.....
    Dave Purola,
    N8NTA
    EN82fn

  6. #6
    Join Date
    Jan 2011
    Posts
    6

    Default Re: HSEROUT at Quarter Rate!

    Thanks for your replays Dave,

    But it was a typographical error with the HSER2 defines... I had HSER_BAUD2 1200 when it should have been HSER2_BAUD 1200

    I was hunting for an OSC problem also

    Cheers and thanks again for your suggestions

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