How to set up UART??


Results 1 to 9 of 9

Threaded View

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

    Default

    Get a copy of PicMulticalc, click on USART calc, enter your parameter, and you should have something like...
    Code:
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 32  ' 19200 Baud @ 10MHz, -1.36%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    If that device have an EUSART, you can also use...
    Code:
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    DEFINE HSER_SPBRG 129 ' 19200 Baud @ 10MHz, 0.16%
    SPBRGH = 0
    BAUDCON.3 = 1         ' Enable 16 bit baudrate generator
    Error % is better.


    NOW, you have to show us your configuration fuse setting.

    PICMultiCalc available bellow...
    http://www.mister-e.org/pages/utilitiespag.html

    Configuration Fuses setup and how to..
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    Maybe your PIC is running @10MHZ... but you you didn't set the right Fuses. That one have a few to set first
    Last edited by mister_e; - 24th April 2007 at 01:13.
    Steve

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

Similar Threads

  1. Pin won't stay high during Repeat...Until loop??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th August 2009, 23:57
  2. Interruptus Frustratus
    By Byte_Butcher in forum General
    Replies: 16
    Last Post: - 17th April 2009, 20:36
  3. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 07:57
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31

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