send and receive data using pic 16f84a


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57

    Default send and receive data using pic 16f84a

    Need Help

    I write the serout and serin command to send data from PIC to another PIC

    can anyone tell me, how to solve it, thank you

    i am try many way to solve it , but still cant solve it

    i am using PIC16F84A model try a simple code below

    TX DATA


    INCLUDE "modedefs.bas"
    DEFINE OSC 4

    loop:
    IF PORTB.0=0 Then
    GoSub led_on
    Else
    GoSub led_off
    EndIF
    GoTo loop


    led_on:
    SerOut PORTB.1,N2400,[$FF,$FF,"OK","A"]
    Return

    led_off:
    SerOut PORTB.1,N2400,[$FF,$FF,"OK","B"]
    Return

    End



    RX DATA

    INCLUDE "modedefs.bas"
    DEFINE OSC 4
    dataon VAR BYTE
    led1 VAR PORTB.1
    led2 VAR PORTB.2

    Loop:

    SerIn PORTB.0,N2400,["OK"],dataon
    IF dataon="A" Then led_on
    IF dataon="B" Then led_off
    GoTo Loop

    led_on:
    High led1
    Low led2
    GoTo Loop

    led_off:
    Low led1
    High led2
    GoTo Loop

    End

    after i on the supply and push the switch the led does not light

    to see the led light on/off how could be???

    really need a help

    thank you

  2. #2
    win_832001's Avatar
    win_832001 Guest

    Default Snang je

    Projek ko tu xyah la nak gune serin seout... buat mcm aku je. ko gune concept parallel. mcm kite baljo digit dlu tu... klu xblh tanye laban lah..!!

    -AiLiF-

Similar Threads

  1. Send data PIC to PC
    By konter in forum Off Topic
    Replies: 6
    Last Post: - 25th December 2009, 22:04
  2. Send data to PC USB
    By konter in forum Off Topic
    Replies: 2
    Last Post: - 18th December 2009, 21:57
  3. send data from VB 6 to PIC 16f84
    By win_832001 in forum Serial
    Replies: 2
    Last Post: - 9th March 2006, 14:21
  4. send and receive data using pic 16f84a
    By PoTeToJB in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2006, 20:12
  5. how to send data from VB to PIC 16f84
    By win_832001 in forum Serial
    Replies: 0
    Last Post: - 25th February 2006, 16:15

Members who have read this thread : 1

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