serial to PIC


Results 1 to 23 of 23

Thread: serial to PIC

Threaded View

  1. #7
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Code:
    define osc 4
    include "bs2defs.bas"
    
    wait:
    
    SERIN PORTa.1,N9600,["K"],myVar
    
    IF myVar = 51 THEN out ' Ascii 51 = decimal 3 (When you type 3 myvar will be 51)
    
    goto Wait ' this line is esential otherwise any key will activate the function 
    
    out:
    
    HIGH PORTb.7
    
    PAUSE 300
    
    LOW PORTb.7
    
    goto wait

    This is the code that Dave suggested.

    From keyboard type K3 to activate portB.7 for 300 millisecs.


    Al.
    Last edited by aratti; - 11th July 2009 at 16:35.
    All progress began with an idea

Similar Threads

  1. 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
  2. Automatic VB6 to pic serial connection
    By arniepj in forum Code Examples
    Replies: 13
    Last Post: - 10th January 2008, 07:57
  3. Serial Com Pic to Pic
    By uludere72 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st May 2005, 10:06
  4. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  5. Serial communication PIC to PIC help.
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2005, 15:45

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