PIC to PIC TX RX and PIC to PC COM RX ..a little help please


Closed Thread
Results 1 to 40 of 68

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

    A little history to get you started...
    http://www.picbasic.co.uk/forum/show...highlight=idle
    let us know if the above helps.
    Dave
    Always wear safety glasses while programming.

  2. #2


    Did you find this post helpful? Yes | No

    Default ok .... now my options ?

    Hi Dave

    thanks for the history lesson re serin ..very informative ...
    The posting was a little confusing in that (unless I missed it!) it is not clear on how to get the port to dile low IDLE high or IDLE low.
    Is is as simple as somthing like
    portX.Y low or high after the serin line ?
    Note that I am not sending anything over RF yet ... the two PIC's are just wired together at this stage.

    Should I rather try DEBUG or serin/out 2 ?
    Do they suffer from the same issues?

    I would like to make sure I get everything ready before I attach the wireless RF and TX , maximizing both power and rate on the TX/RX pairs, other wise why bother ...not so ?

    Any further help would be much appreciated :-)

    Kind regards

    Dennis

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


    Did you find this post helpful? Yes | No

    Default

    For PIC to PIC Debug is not the way. SERIN is good for basic stuff. SERIN2 has a whole lot more options and uses the same syntax as HSERIN when you need it. The nice thing about the SERIN/2 is it can be set for TRUE or INVERTED while HSERIN is TRUE only requiring an inverter to connect to things like a PC, but that is a minor thing with the other benifits of hardware serial.

    http://www.melabs.com/resources/samples.htm
    Scroll down to the ser2mod examples for...examples....

    When it comes time to idle low or high that can be done with a resistor 100K. Or in your code.
    Dave
    Always wear safety glasses while programming.

  4. #4


    Did you find this post helpful? Yes | No

    Default OK so suggested method for TX RX is of choice is ...

    SERIN2
    or
    HWSER right ?

    You mentioned being able to set the IDLE in software if I am going to be using SERIN...
    That's what I was asking in the last post :-)

    In the post you pointed me to it mentions the issues/problems with SERIN and to set it IDLE ...
    SO my question is how do you set the IDLE using software ?

    Is there a document regarding the IDLE setting methods ?

    Kind regards

    Dennis

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


    Did you find this post helpful? Yes | No

    Default

    Normally the mode takes care of the idle state
    http://www.picbasic.co.uk/forum/show...92&postcount=7
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I hate to sound like a broken record - but... Always use the hardware serial port if your device has one. You will be glad you did.
    Charles Linquist

  7. #7


    Did you find this post helpful? Yes | No

    Default hmm...

    Thanks Dave and Charles :-)

    But where do I start with hardware ports?

    I got the impression reading through the forums that software serin/out and serin2/serout2 and debug would be easier to play around with.
    I ssetting up the hardware option just as easy ?

    I also read somewhere that serin needs to be setup to look for something first before it starts accepting data ? Is this why I after one keypress, nothing else appears on the LCD ?

    Is there a some code I could use just to test the TX/RX function between 2 PIC's using wires ( see my diagram in earlier posts) , once I have that working I can then move onto TX and RX using wireless

    Something like setup PIC A to send a string or a byte to PIC B and then have PIC B send the same byte to hyperterminal(pc).

    Could I use serin2 first then serout (not serout2) to send the string or byte to hyperterminal(pc).

    Have I made the correct choice for send and receive ports ..on both pics PORTC.6 and PORTC.7

    Any help or advice would really be appreciated.

    Kind regards

    Dennis

Similar Threads

  1. Direct PIC to PC without MAX232
    By acjacques in forum Serial
    Replies: 14
    Last Post: - 23rd October 2014, 22:32
  2. Serial VB 2005 pic 16f877a problems
    By Snap in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 8th July 2013, 01:52
  3. PIC or xbee times out after Tx 504 bytes
    By archendekta in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 23rd November 2009, 09:45
  4. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 15:46
  5. RX TX modules - intermitent communication
    By ruijc in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 11th June 2009, 01:13

Members who have read this thread : 2

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