Framing error if I disable transmitter after shift register is empty?


Results 1 to 40 of 46

Threaded View

  1. #31
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170

    Default Re: Framing error if I disable transmitter after shift register is empty?

    Quote Originally Posted by tumbleweed View Post
    The USART section in the datasheet for your device will tell you if you should set/clear the TRIS bits for the TX/RX pins....
    I've misunderstood/misinterpreted the data sheet before. Seriously, I read the EUSART section and my eyes gloss over when they start making distinctions between half-duplex, full-duplex, synchronous, asynchronous...)


    Quote Originally Posted by tumbleweed View Post
    ..If the chip supports open-drain mode then you just need to setup the TX pin to enable it at startup (ODCONC.6 = 1).
    There's no need to set and clear it, and you won't need to enable/disable TXEN anymore either...
    Something like..?

    TRISC.7=1
    ODCONC.6 = 1

    Loop:
    TX, RX, rinse repeat

    I would have thought you need to reset ODCONC.6 to "standard push/pull"...? (Possible example of not always understanding what the datasheet "means").


    Quote Originally Posted by tumbleweed View Post
    ...If your pic has PPS you'll probably need to set that up too to assign the pin to the UART TXD function.
    PPS output functions aren't typically enabled by default.
    Yes, I figured that much. There's just so many peripherals available (coming from a guy that started with a 16F628).


    EDIT: I just rechecked the EUSART section (starts at page 543), and they never mention ODCON (last occurence is at page 233).

    The datasheet says very little about ODCON:

    Name:  ODCON.png
Views: 2895
Size:  23.1 KB
    Last edited by Demon; - 25th September 2024 at 21:28.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Trying to emulate shift register
    By RuudNL in forum General
    Replies: 0
    Last Post: - 17th March 2013, 19:57
  2. pic+shift register+lcd
    By eworld in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd October 2012, 05:11
  3. Long shift register
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 18th April 2009, 19:14
  4. Framing Error /w USART
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th February 2007, 01:34
  5. Replies: 15
    Last Post: - 30th January 2005, 03:58

Members who have read this thread : 10

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