BUSY line technique


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    Right, I forgot about the pull-up resistor. It will take care of pulling the line back HIGH when the pin changes to input, even better, one less step.

    Revised:

    - all PICs define BUSY LINE pin as INPUT.

    - pull-up resistor on BUSY LINE.

    - to transmit, a PIC checks if BUSY LINE is HIGH (available), BUSY LINE pin set LOW (busy). Pin is automatically set as OUTPUT by PBP LOW command.

    - once finished transmitting, BUSY LINE pin is set as INPUT.

    - pull-up resistor pulls BUSY LINE back to HIGH (available).

    Thanks Ron!

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default

    I think that if the pin was low and then this pn is made input the buffer inside pic will read as low if no previous read ia made. So one must read the pin twice. If I am wrong please someone correct me.

    Ioannis

  3. #3
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis
    I think that if the pin was low and then this pn is made input the buffer inside pic will read as low if no previous read ia made. So one must read the pin twice. If I am wrong please someone correct me.

    Ioannis

    The pull up resistors will bring the line high

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default

    Yes, the line will be high, but the buffer inside the PIC? It will be revised when the port is read again.

    I 'll tey to find it in the datasheet. There was a note about this.

    Ioannis

  5. #5
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hello Robert,

    I am currently using the scheme of the BUSY line in two systems I have developed. However I am using a single pin serial line. What I have done is created a system with a master board and 20 slaves. I have a busy line that is normally high. When a slave has a message for the master it first checks that the busy line is not low then makes the busy line low, sends its data to the master. The slave clears the low on the busy line. The master makes the busy line low just before it receives the data. It will keep the line low until the end user acknowledges the event received. The it clears the busy line allowing new data to be sent. To prevent crashes of data, each slave must wait 10ms before sending any data. The first board waits 10ms the next 20ms and so forth. The likely hood of two signals coming at the same time is virtually nill but why take the chance. Waiting 200ms isn't going to hurt anything.

    I keep all of the slaves serial pins as inputs until the SEROUT2 command is used then as soon as they are finished sending I make the pin and input again.

    All of the slaves are plugged into a card cage backplane so I'm not running cables all over.
    In one system I am using a 16F877A for the master and 16F872 for slaves. In the other system, a 18F452 is the master (needed more memory) and the slaves are 16F74's. One system has more things to do than the other.

    Hope this helps you out.

    BobK
    Last edited by BobK; - 3rd December 2005 at 12:37.

Similar Threads

  1. Replies: 0
    Last Post: - 2nd February 2009, 23:23
  2. Using input from Switch to control a loop
    By MrRoboto in forum mel PIC BASIC
    Replies: 9
    Last Post: - 2nd February 2009, 05:02
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Errors In MPLAB 8.02
    By HOTLNC in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 4th June 2008, 13:52
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

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