Serial Communication with PIC16F877A


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Do you have a MAX232 or similar between the PIC and PC?

    If you do not have one, try SERIN2/SEROUT2 using inverted mode.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Dec 2008
    Location
    Charlottesville, VA
    Posts
    31


    Did you find this post helpful? Yes | No

    Question Yes

    Yes I have a MAX232 on the ICD I've built... it should also work as my serial communicator for this purpose as well... This is the number on the chip:

    69CT01M
    MAX232IN

    TTL to CMOS converter...

    any ideas?

    Morris Beasley
    Manufacturing Test Technician
    B.S. Industrial Technology (2007)

    For more information on our robotics, please visit:
    http://www.ish-electronics.webs.com

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Serial data to a PC should always be 8 bits.

    DEFINE HSER_BITS 9 ; won't work
    <br>
    DT

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Missed this the first time I looked at it.
    DEFINE HSER_BITS 9
    Scratch the above line
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Dec 2008
    Location
    Charlottesville, VA
    Posts
    31


    Did you find this post helpful? Yes | No

    Question Modifications...

    I have scratched the line as you suggested... however, it still isn't working. If I try to transmit the example in my code, which is A369621... I don't receive anything back at all. Also, if I don't transmit anything and the USART times out, I receive this: ¬ºê*ë... any other ideas?

    Do I have to set PORTC as this:????

    TRISC=%11000000

    I'm a little confused on the correct settings to get the USART to function properly.
    Last edited by mcbeasleyjr; - 26th May 2009 at 23:25. Reason: another question....

    Morris Beasley
    Manufacturing Test Technician
    B.S. Industrial Technology (2007)

    For more information on our robotics, please visit:
    http://www.ish-electronics.webs.com

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Dec 2008
    Location
    Charlottesville, VA
    Posts
    31


    Did you find this post helpful? Yes | No

    Question tried...

    I copy and pasted the code you provided me but had no luck with it...

    Morris Beasley
    Manufacturing Test Technician
    B.S. Industrial Technology (2007)

    For more information on our robotics, please visit:
    http://www.ish-electronics.webs.com

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Can you post your schematic and/or a picture of your setup. I think it is down to a hardware problem now.

    Caps on the 232?
    Cable is straight through?
    Usb to serial converter?
    Real serial port?
    Port on PC is known to be good?

    Hold one hand in the air while touching you big toe?

    Could be anything now.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Wireless serial communication question
    By Ahmadabuomar in forum Serial
    Replies: 3
    Last Post: - 21st December 2009, 03:49
  2. PIC to PIC "wired" serial one-way communication - SERIN2/SEROUT2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2008, 20:02
  3. Bootloader,MCSP and Serial communication
    By surfer0815 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd March 2006, 10:52
  4. Serial Communication using 12F629
    By charudatt in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th March 2005, 04:24
  5. Replies: 8
    Last Post: - 11th November 2004, 20:08

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts