Hot!EUSART MODULE PIC16LF1705 probleme

Author
mansgueg
New Member
  • Total Posts : 29
  • Reward points : 0
  • Joined: 2015/11/19 01:42:42
  • Location: 0
  • Status: offline
2018/05/31 07:56:21 (permalink)
0

EUSART MODULE PIC16LF1705 probleme

Dear all,
 
I have a probleme with eusart module of PI16LF1705.
I want a synchronous communication with Start and Stop bit at 38.4kbauds with 8 data bits.
 
Here is my configuration:
BAUD1CON = 0x08;//ABDOVF no_overflow; SCKP async_noninverted_sync_fallingedge; RCIDL idle; BRG16 16bit_generator; WUE disabled; ABDEN disabled;
RC1STA = 0x80;// SPEN enabled; RX9 8-bit; CREN disabled; ADDEN disabled; SREN disabled;
TX1STA = 0x24;// TX9 8-bit; TX9D 0; SENDB sync_break_complete; TXEN enabled; SYNC asynchronous; BRGH hi_speed; CSRC slave;
SP1BRGL = 0x67;// Baudrate parameter
SP1BRGH = 0x00;// Baudrate parameter
 
Attached is the oscilloscope plot. I send 0xAA in a loop and I see 0xAB with the scope. The bit 1 is always at 1.
Does anyone know the issue ?
 
Regards

Attached Image(s)

#1

3 Replies Related Threads

    jack@kksound
    code tags!
    • Total Posts : 2632
    • Reward points : 0
    • Joined: 2014/05/14 10:03:19
    • Location: 0
    • Status: offline
    Re: EUSART MODULE PIC16LF1705 probleme 2018/05/31 11:17:08 (permalink)
    +1 (1)
    The EUSART transmits (and receives) LSB first not MSB. So not 0xAB but rather 0xD5.
    Post your program code, you have an error (or 2) somewhere.
     
    #2
    Jams100001
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2018/04/12 13:37:33
    • Location: 0
    • Status: offline
    Re: EUSART MODULE PIC16LF1705 probleme 2018/07/12 09:21:14 (permalink)
    0
    Mansgueg,
     
    Can you attach your full code so I can see if I can see the issue?
     
    Jams100001
    #3
    qɥb
    Monolothic Member
    • Total Posts : 2980
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: online
    Re: EUSART MODULE PIC16LF1705 probleme 2018/07/12 13:24:36 (permalink)
    +1 (1)
    mansgueg
    I want a synchronous communication with Start and Stop bit at 38.4kbauds with 8 data bits.

    Can't be done. SYNCHRONOUS mode does not use start and stop bits.
    Your code is setting ASYNCHRONOUS mode, i.e. the SYNC bit in TX1STA is clear.
     
    Did you really mean asynch?
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #4
    Jump to:
    © 2018 APG vNext Trial Version 4.5