How to code Baud 38400


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Posts
    70

    Angry How to code Baud 38400

    I try to conect PIC to PC with Max232 we need to connect at 38400 baud rate
    microcode studio ,PBP 2.45

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


    Did you find this post helpful? Yes | No

    Default

    PIC?
    OSC speed?

    Did you read the PBP manual in SEROUT, DEBUG,SEROUT2, HSEROUT section?
    Steve

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

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I don't know if PBP has a DEFINE that goes that high, but in any case you can always directly set the SPBRG register. The exact setting depends on your oscillator frequency, but if you are running at 20Mhz, you can set
    SPBRG = 32 to give you 38.4Kbaud.
    You will have to consult the datasheet if you are running at a different frequency.
    Charles Linquist

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Can't set 38400 baud @ 48Mhz
    By b1arrk5 in forum Serial
    Replies: 38
    Last Post: - 19th January 2009, 23:56
  4. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  5. Auto Baud Rate Detection
    By mytekcontrols in forum Serial
    Replies: 10
    Last Post: - 31st October 2005, 02:17

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