18f4520 serial communication


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by merlinknight View Post
    Thanks Steve,
    It is connected to a MAX232 . OSC is at 4 mhz. didnt know about the serial communicator. Nice toy. Still learning. But not giving up.

    Thanks for taking the time to reply.

    Merlin Knight
    Didn't you say earlier you were using C.6 for TX and C.7 for RX?
    Your code says exactly the opposite...

    --> My circuit board uses portc.6 for tx and portc.7 for rx.

    --> Serout PORTC.7, N2400, ["test"] ' Send string

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    You need to use non-inverted serial mode if you're going through the max232.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Feb 2007
    Posts
    14


    Did you find this post helpful? Yes | No

    Question

    ok, i did have the incorrect pin. Thank you
    second, i needed to change to T2400. Thank you

    I will try to review my work closer in the future. Didn't see these.

    It is now working. One more question.


    include "modedefs.bas"


    print:
    Serout PORTC.6, t2400, ["test"] ' Send string
    pause 100 ' pause 1/10 sec
    Goto print ' Forever

    end


    If i was to use this statement how would the con be stated? SO con PortC.6. It does not compile with this. What should be here. I would think that i need to state port and bit.

    SO con portc.6 ' Define serial out pin
    Last edited by merlinknight; - 4th March 2007 at 15:41.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    PBP automatically makes the pin an output.

    Serout PORTC.6 tells PBP which port & pin to use. You can't declare a port
    pin as a constant.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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 : 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