18LF4680 HSERIN and SEROUT hang my PIC!


Results 1 to 3 of 3

Threaded View

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


    Did you find this post helpful? Yes | No

    Default Re: 18LF4680 HSERIN and SEROUT hang my PIC!

    smells of DMX project again

    DEFINE HSER_CLOERR 1
    that one do absolutely nothing, the spelling is wrong

    try these defines

    Code:
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 10  ' 115200 Baud @ 20MHz, -1.36%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    If it's really DMX, you really need to study the protocol first, HSERIN will be of next to none use for that. There's a nice DMX paper on microchip website. I know I already posted it somewhere in here.

    Another thing, you may want to use a BaudrateVouched crystal for this baudrate. 1.36% err is not bad though.
    Last edited by mister_e; - 18th May 2011 at 23:59.
    Steve

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

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