Can't set 38400 baud @ 48Mhz


Closed Thread
Results 1 to 39 of 39

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Beta 2.46

    DT

  2. #2
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Beta 2.46
    You laugh...but for some reason I think I might have a one-off version of 2.46. I got it a couple of months after it came out. Then noticed that patch awhile after that, still haven't been able to get that applied successfully. Some of the PBP INC files are labelled 2.45, some much earlier than that (but then again, no need to waste time by renaming stuff if you didn't do anything to it right?). I emailed Jeff about it awhile back, he sent me an email back, I never did get around to sending a copy of my registration, etc. to get a new CD and he mentioned 2.47 was on it's way out, so I held off...
    I'm wondering if this 2.46 isn't my problem with the SPI on the '4620, worked fine on the '452, never could get it to work on the '4620. Maybe 2.47 will fix that too, maybe Microchip will someday publish another errata...

    At any rate... I still wonder if the original poster could easily get around this whole problem by setting the register values manually instead of relying on the compiler to handle it automatically...

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Woooaa, there's an Idea.

    Jerry,

    Have you run the Patch for 2.46 yet?
    http://www.melabs.com/support/patches.htm

    I did a long time ago, forgot all about it.

    Good thought skimask.

    P.S. The 2.47 upgrade will fix that if you didn't.

    P.P.S. The patch is a PITA. because if you have modified the .INC files (like we all do for the configs), it won't run, until you undo the changes. If you haven't done it yet, just wait for 2.47. It'll save you a few hours of horror.

    DT

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Quote Originally Posted by Darrel Taylor View Post
    P.P.S. The patch is a PITA.
    mmm PITA

    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130

    Wink Solution!

    Hi guys,

    After speaking with the nice folks at MeLabs I have the following explanation, the warning is due to the fact that PicBasic defaults to 2400 baud, and I had the oscillator set to 48Mhz, which it can't do with the high speed baud generator register set. I was close, I could get it to compile without the warning, but the baudrate wasn't right. The following code works perfectly now;

    BAUDCON.3 = 1 'SETUP FOR HIGH SPEED.
    DEFINE HSER_RCSTA 90H
    DEFINE HSER_TXSTA 24H 'HIGH SPEED MODE BAUD RATE GENERATOR
    DEFINE HSER_BAUD 38400
    DEFINE HSER_SPBRG 38H '38400 BAUD *** THIS WORKS! ***
    DEFINE HSER_SPBRGH 01H

    Thanks,

    Jerry.

    Thanks for all your help!
    If your oscilloscope costs more than your car...

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Isn't that what Steve and I said in Post #24 and 23?

    DT

  7. #7
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130

    Smile Exactly!

    I'm sorry, I should have made it more clear, that was why I posted the 'solution,' so that you and Steve would know that you were indeed right! More importantly, you guys were available and willing to help out on the weekend, which is when I have uninterrupted time to work, as opposed to during the week when the phone rings incessantly. Have a great weekend!

    Jerry.
    If your oscilloscope costs more than your car...

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 21:58
  2. Auto Baud Rate Detection
    By mytekcontrols in forum Serial
    Replies: 10
    Last Post: - 31st October 2005, 03:17
  3. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 15:31
  4. help
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th February 2005, 21:42
  5. Need once your help one please
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th February 2005, 21:33

Members who have read this thread : 1

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