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


Results 1 to 40 of 68

Threaded View

  1. #14


    Did you find this post helpful? Yes | No

    Default ok....just another question ...

    Dave

    Will try the operation with only your code...
    Can one run SERIN and SEROUT on same pic as I would like to send the received data to hyperterminal and also to the LCD. So would the fol.lowing code be correct then ?
    Oh and why did you choose PORTC.4 ? Looking at the pinouts for both pics I see PORTC.6 is TX and PORTC.7 is RX -are these for hardware serial , ie. HSERIN and HSEROUT and should I use them for SERIN and SEROUT or is it better to use PORTC.4 in case I want to use them for HSERIN/OUT later ?

    Here's the code

    Transmitter PIC (16F887)
    Code:
    SEROUT PORTC.4,T2400,[9,3]
    Receiver PIC (18F4520)
    Code:
    main:
    
    SERIN PORTC.4,T2400,[9],net 'prepare to receive the data from other PIC
    IF net = 3 LCDOUT "data is",net 'look for the number 3
    SEROUT PORTC.5,T2400,[9,3] 'send received data to hyperterminal via max232n to PC
    end if 
    goto main 
    end
    Smoke and mirrors indeed :-)

    Kind regards

    Dennis
    Last edited by Dennis; - 26th November 2009 at 21:51.

Similar Threads

  1. Direct PIC to PC without MAX232
    By acjacques in forum Serial
    Replies: 14
    Last Post: - 23rd October 2014, 21:32
  2. Serial VB 2005 pic 16f877a problems
    By Snap in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 8th July 2013, 00: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, 08: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, 14:46
  5. RX TX modules - intermitent communication
    By ruijc in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 11th June 2009, 00: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