2nd hardware UART


+ Reply to Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,642


    Did you find this post helpful? Yes | No

    Default Re: 2nd hardware UART

    mcc suggests different baud-gen figures that what you have used
    mcc
    U2BRGL = 0x82;
    U2BRGH = 0x06;
    Warning I'm not a teacher

  2. #2
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    169


    Did you find this post helpful? Yes | No

    Default Re: 2nd hardware UART

    Quote Originally Posted by richard View Post
    mcc suggests different baud-gen figures that what you have used
    mcc
    U2BRGL = 0x82;
    U2BRGH = 0x06;
    Yes Richard, I realise that *if* I was operating in 9600 baud, but I noted at the top of that register post I was setting everything to 115200 originally and that pruned snippet of the register setting code was copy-&-pasted from my original attempts at getting this to work. Apologies for not updating those values to make them consistent with the previous posts utilising PBP defines for the config. I did have my terminal receiver running on the correct baud for the settings irrespective.

    One thing I've noticed since is the Hserout2 statement is hanging/crashing my code.

    Sending a character to the U2TXB register directly *does* work - at least at 9600 baud.

    Troy

Similar Threads

  1. PID-filter routine (2nd try).
    By HenrikOlsson in forum Code Examples
    Replies: 131
    Last Post: - 3rd October 2018, 07:53
  2. Setup baudrate on hardware uart on 18F4520
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th August 2010, 00:31
  3. crucial error in a 90% working hardware uart
    By mimmmis in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 23rd September 2008, 14:18
  4. Serial Port Complete 2nd Edition
    By Bruce in forum Serial
    Replies: 4
    Last Post: - 8th November 2007, 15:28
  5. 2nd Order Digital Filter for 24-bit
    By sefayil in forum mel PIC BASIC
    Replies: 0
    Last Post: - 2nd December 2005, 21:55

Members who have read this thread : 13

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