Pic16f84a Question ?


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007
    Posts
    25

    Default Pic16f84a Question ?

    Hi All .

    I Have A Litle Problem Here , And Am Sure I Will Find The Answer Here . The Problem Is :
    Am Using Picbasic Pro Compiler .
    I Need To Read Portb Value . And Then Send It Serially To Another Pic .

    The Problem Is When I Connect My Pic16f84a It Send The Value Continuously Without Stop . And I Dont Need That I Need When I Make Pin 0 High Then Send "1" And When I Make Pin 7 High Send "128"
    Etc . .
    So What Can I Do For That ?

    Thanks .

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Here's a little pseudo code for you

    OldValue var byte

    repeat
    if oldvalue <> PortB then
    oldvalue = PortB
    SendInteger PortB
    endif
    forever

    Sendinteger is a function to send the numeric value of PortB as a string.

    With the above code, you will send only when there is a change from the previous value.

    Good Luck

  3. #3
    Join Date
    Jun 2007
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    and what about pic basic ?

    i neverd used pseudo befor .

    thanks

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Pseudo code shows the logic. You have to implement it in PicBasic or any language you choose.

Similar Threads

  1. pic18f4550 & pic16f84a serially ?
    By amenoera in forum Serial
    Replies: 0
    Last Post: - 1st March 2008, 10:51
  2. Serial Communication Using PIC16F84A
    By fazan83 in forum GSM
    Replies: 9
    Last Post: - 22nd January 2007, 02:56
  3. Question for a math guru
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 22nd November 2006, 09:45
  4. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 06:49
  5. PIC16F84A - Quick question
    By samuelbarber in forum mel PIC BASIC
    Replies: 1
    Last Post: - 29th June 2005, 14:32

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