Hserin baudrate select


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default Hserin baudrate select

    Hi

    I would like to select between 2 Hserout baudrate's at start up
    by checking an input pin
    It is not possible to use "Define Hserbaud xxxx" twice or in an if/then loop

    Is it possible to select different baudrates after power-up ?

    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    Hi Walter,

    You can't change DEFINEs in mid-stream.

    But you can change the SPBRG register anytime you want.
    Although it's best to turn the module off before doing so.
    <br>
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel

    I found a nice value calculator from Mister E
    How can i stop and start the module ?

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    See the last two post in this thread
    http://www.picbasic.co.uk/forum/showthread.php?t=10265
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    With RCSTA.
    Code:
    RCSTA = 0
    SPBRG = NewBaudRate
    RCSTA = $90
    DT

Similar Threads

  1. Sony SIRC IR Issue
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th August 2015, 08:10
  2. HSERIN with/without interrupt
    By macinug in forum Serial
    Replies: 3
    Last Post: - 19th January 2009, 17:03
  3. How to select timeout related to buadrate for HSERIN ?
    By grich in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th May 2008, 17:19
  4. select case question
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th March 2006, 10:01
  5. Interrupt/timer not really interrupting...
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd May 2005, 22:05

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