How to upon receiving data via RS232, MCU immediately sends it back to the sender?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71


    Did you find this post helpful? Yes | No

    Default Re: How to upon receiving data via RS232, MCU immediately sends it back to the send

    no,it's not working

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: How to upon receiving data via RS232, MCU immediately sends it back to the send

    Did you turn portA digital ? Remember that by default portA is set as analog, so you cannot use the serin/serout command.

    Which pic are using?

    Al.
    All progress began with an idea

  3. #3
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71


    Did you find this post helpful? Yes | No

    Default Re: How to upon receiving data via RS232, MCU immediately sends it back to the send

    No I forget to turn into digital,I have to use ADCON = 7?
    I am using PIC16F877,but IF it's working I will make a small network,so I should send a messages from one PC to onether with RS232 protocol.

  4. #4
    Join Date
    Jun 2005
    Location
    Surrey, England
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Re: How to upon receiving data via RS232, MCU immediately sends it back to the send

    Another error: you define Prati as a byte then use it as a label - remove the byte definition. Also you assign the output value to Isprati which is undefined
    Peter

  5. #5
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71


    Did you find this post helpful? Yes | No

    Default Re: How to upon receiving data via RS232, MCU immediately sends it back to the send

    No it's not working,I changed everything,but stil nothing.
    I think the problem is in the MCS.When I compile code for PIC18F2550
    there is an error.
    And I want to make the code from DT,code for the Baragraphs it can't
    compile it.

  6. #6
    Join Date
    Dec 2010
    Location
    Colchester England
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: How to upon receiving data via RS232, MCU immediately sends it back to the send

    I see from your code that you do not assign a value to Isparti.

    Code:
    Prati:
    Primi = Isprati
    Serout PORTA.2,N2400,[Isprati]
    Goto Main
    You assign Primi with the value IspartI, would it be better to reverse it ?.

    Isparti = Primi

Members who have read this thread : 0

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