Communicate with PC at baud rate :115200 bps


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by iugmoh View Post
    I can communicate at 9600 with higher than this the data is not true it's corrupted
    Quote Originally Posted by iugmoh View Post
    2- 4MHZ or 8MHZ crystal
    3- PIC16F877A or PIC18f452 or PIC4220
    Says right in the back of the manual that a faster clock speed than 4Mhz will most likely be needed with a 4Mhz crystal, like quite a bit faster.
    If you're using a '452, turn on the 4xPLL and use the 8Mhz crystal. That'll give you 32Mhz to play with.

  2. #2
    Join Date
    Mar 2006
    Location
    INDIA
    Posts
    89


    Did you find this post helpful? Yes | No

    Default

    But i always use 115200 Baud in nokia 3350 sms zone alarm with this code.

    DEFINE OSC 12 ( I use 11.0592 mhz xtal after define osc 12 )

    OUTPUT PORTC.6 '-- SERIAL Port TX
    INPUT PORTC.7 '-- SERIAL Port RX

    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_SPBRG 5 ' 115200 Bauds with 0% error

    HSEROUT [X,Y,Z]

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by precision View Post
    But i always use 115200 Baud in nokia 3350 sms zone alarm with this code.
    Well, that'll work too, because you're using the HARDWARE USART.
    The note at the back of the book is for SERIN(2)/SEROUT(2).
    The O/P didn't specify if hardware or software serial was being used...

  4. #4
    Join Date
    Mar 2006
    Location
    INDIA
    Posts
    89


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by skimask View Post
    Well, that'll work too, because you're using the HARDWARE USART.
    The note at the back of the book is for SERIN(2)/SEROUT(2).
    The O/P didn't specify if hardware or software serial was being used...
    You 'r right skimask,
    We cannot achive 115200 baud with SERIN2, According to manual and limitation of compiler,
    But i think one day we all will use SERIN2 at 115200 baud as below,

    DEFINE OSC 20
    INCLUDE "My_Lcd.bas"
    INCLUDE "DT_INTS-14.bas"
    INCLUDE "LCDbar_INC.bas"
    INCLUDE "DT_INS-SERIN2.bas"


    B0 var word
    Main:
    @ DT_SERIN2 , 115200, [B0]

    LCDOUT $fe,1, "Value", DEC 5 B0
    pause 200
    goto main

    Sory Sir Darrel Taylor, its impossible for us to achive 115200 baud in serin2 mode without your MAGIC code.
    Last edited by precision; - 9th March 2008 at 09:35.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by precision View Post
    You 'r right skimask,
    We cannot achive 115200 baud with SERIN2, According to manual and limitation of compiler,
    But i think one day we all will use SERIN2 at 115200 baud as below,
    I don't know if it works or not...but...
    If you DEFINE OSC 4...
    then try to run DEBUG at 9600...
    but actually clock your PIC at 48Mhz...
    (or DEFINE OSC 4, run DEBUG at 19200 and clock at 24Mhz)
    You MIGHT get 115,200.
    Don't know how reliable it'll be though...

  6. #6


    Did you find this post helpful? Yes | No

    Thumbs up Yes It's work

    Oky Here is the code after trial it on PIC16f877a to communicate with PC at 115200 bps baud rate and it's working fine without any error
    ===============================================
    DEFINE OSC 20
    ' Set receive register to receiver enabled
    DEFINE HSER_RCSTA 90h

    ' Set transmit register to transmitter enabled
    DEFINE HSER_TXSTA 24h

    ' Set baud rate
    DEFINE HSER_BAUD 115200

    ' Set SPBRG directly (normally set by HSER_BAUD)
    DEFINE HSER_SPBRG 10

    main:
    HSEROUT ["yes its working",13,10]
    pause 300
    goto main

    end

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. pic18f4520 baud rate change to 115200
    By caltex88 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th September 2007, 08:41
  3. Auto Baud Rate Detection
    By mytekcontrols in forum Serial
    Replies: 10
    Last Post: - 31st October 2005, 02:17
  4. PIC12F675, accuracy of baud rate with Internal Oscillator
    By Chris Mayhew in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 22:41
  5. Baud Rate and Timing Calculator
    By picnaut in forum General
    Replies: 3
    Last Post: - 23rd January 2004, 16:48

Members who have read this thread : 2

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