serial to PIC


Closed Thread
Results 1 to 23 of 23

Thread: serial to PIC

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

    Send K3...
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jul 2009
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Its not working
    PLZ help me

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


    Did you find this post helpful? Yes | No

    Default

    check if your wiring is the same as the attached schematic.

    Al.
    Attached Images Attached Images  
    All progress began with an idea

  4. #4
    Join Date
    Jul 2009
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Yes it's like your drawing but not working. I send {k3} from the windows terminal and from another 2 programs and it's not working. I am using PICBASIC PRO and PIC16F84a and My code now exactly like this:

    define osc 4
    include "bs2defs.bas"

    wating:
    SERIN PORTa.1,N9600,["K"],b1

    IF b1 = 51 THEN out ' Ascii 51 = decimal 3 (When you type 3 myvar will be 51)

    goto wating ' this line is esential otherwise any key will activate the function

    out:

    HIGH PORTb.7

    PAUSE 300

    LOW PORTb.7

    goto watin
    -------------------------------------

    best regard
    kindows

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


    Did you find this post helpful? Yes | No

    Default

    check if hyperterminal settings are OK.

    In my case serial port is # 2, it could be different for your computer. The setting of snap 165 must be the same.

    Al.
    Attached Images Attached Images   
    Last edited by aratti; - 13th July 2009 at 15:42.
    All progress began with an idea

  6. #6
    Join Date
    Jul 2009
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Avery thing is same I am using USB converter [USB to serial 232] and I set up it to work in port 8 and I test it with another hardware [ customer LCD] and that is working fine.

  7. #7
    Join Date
    Jul 2009
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    plz help me.

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kindows View Post
    wating:
    SERIN PORTa.1,N9600,["K"],b1

    IF b1 = 51 THEN out ' Ascii 51 = decimal 3 (When you type 3 myvar will be 51)

    goto wating ' this line is esential otherwise any key will activate the function

    out:

    HIGH PORTb.7

    PAUSE 300

    LOW PORTb.7

    goto watin
    Your loop label is wrong. watin instead of wating

    Ioannis

  9. #9
    Join Date
    Jul 2009
    Posts
    15


    Did you find this post helpful? Yes | No

    Default Thanks fo all

    Thanks for all how help me to finalize my project its working fine now. The problem was with output time I make it before 300 only that is not enough to make the LED blinking I make it now 3000 and its working fine now.

    Thanks for all and I hope we can find good idea to be in progress [[ [progress began with an idea]]] and on that time we will wear safety glasses while programming

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


    Did you find this post helpful? Yes | No

    Default

    I am glad it is working. But.....
    You should be able to see 300 millisecond blink.
    How long does the LED stay on now? Your code says 3 seconds.
    Dave
    Always wear safety glasses while programming.

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