How many serial ports can 1 PIC handle?


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125

    Question How many serial ports can 1 PIC handle?

    I am using a 16876A for prototyping. It reads in from the PC, and then reads out to an LCD, the PC, and I want it to read out to a GPS also..

    I have used ports as follows:

    Cpinin var PortC.7 ' for PC in
    Cpinout var PortC.6 ' for PC out 9600b - works

    Apinout var PortA.0 ' out to LCD serial 9600b - works

    AGPSout var PortA.1 ' out to GPS - serial 4800b - not working!

    PORTA = %00000 'Initialize PortA to all zeros - all output
    TRISA = %00000 'All port A output

    PORTB = %00000000 'Initialize PortB to all zeros
    TRISB = %00000000 'All port B output(not using B for serial)

    PORTC = %01000000 'Initialize PortC to all zero except 7
    TRISC = %01000000 'All port C pins are output except pin 7 which is input (RX)

    I can't seem to find a way to get any more than 2 ports to work.. Hooking up to PortA.1, 2,3,4,5 never seem to get any data out...

    Am using SEROUT2 - but get no data on this last port:
    serout AGPSout, 188,[,10,13,"$GPWPL,",#Dec_lat1,".", #Dec_lat2]

    Is it that the PIC only can do 2 serial ports?

    Thanks

    Tom

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


    Did you find this post helpful? Yes | No

    Default

    never tested many serial outputs but what about if you disable the A/D converter on PORTA??

    ADCON1=7
    Steve

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

  3. #3
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Cool Figger'd it out...

    It was a dumb mistake -- as usual..

    I had configured the output via SEROUT2 driven true none - 84 like the one going through the RS232 chip.. this does not... Needed to be driven inverted none 16468.. fix that and presto.. not a problem...

    Sorry for taking up the bits on such a simple problem..

    TG

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Tom Gonser
    It was a dumb mistake -- as usual..
    TG
    of course not the last to be done That's happen to everybody playing with those toys !!!
    Steve

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

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  3. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  4. DS1820 headache
    By Calco in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 12th August 2004, 00:28
  5. New member
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 28th February 2004, 22:44

Members who have read this thread : 1

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