Connect with us

PIC18 Serial Communications

Discussion in 'Microcontrollers, Programming and IoT' started by Nlis12, Nov 6, 2017.

Scroll to continue with content
  1. Nlis12

    Nlis12

    7
    2
    Oct 10, 2017
    Greetings,

    I have a PIC18F67K90 chip that I am trying to configure for serial communication with a computer.
    For this particular chip, pins (TX/RX) 4/5 and 31/32 are dedicated to serial communication. (USART)
    These pins are already used for other things.

    I was wondering if I could configure an unused TTL/Digital I/O pin to read in serial data to the USART or do I have to use the dedicated pins?

    Any insight is appreciated.
    Thanks in advance!
     
  2. Minder

    Minder

    2,921
    615
    Apr 24, 2015
  3. HellasTechn

    HellasTechn

    1,490
    210
    Apr 14, 2013
    Or re assign the pins if it is not to hard to alter the code accordingly ?
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    9,632
    2,013
    Nov 17, 2011
    Afaik it is not possible to route the signals from other I/O pins to the internal U(S)ART. You are bound to use the dedicated pins if you want to use the HW-UART of the chip.
    As @HellasTechn proposed/asked: re-route the external wiring such that the RxD and TxD pins are free for use with the UART, use other I/P pins for the signals that previously occupied the RxD and TxD pins.

    'Bit banging' as propsed by @Minder can be used on any I/O pin but requires some effort in software and uses possibly valuable processor ressources at runtime.
     
    Nlis12 likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-