Help guys...communication issue, I think?


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Help guys...communication issue, I think?

    Robert,
    The chips are tranceivers...if you power them down they won't be able to receive either.
    The PIC will never get any queries to send any data because the receiver is powered down, you might as well throw out the tranceiver all together... ;-)

    Chris,
    Can't say why it appears to work in some situations. Perhaps one driver is slightly "stronger" than the other (don't think so though).

    /Henrik.

  2. #2
    Join Date
    Dec 2005
    Location
    Salt Lake City, Ut, USA
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Help guys...communication issue, I think?

    Hey guys,

    I actually did give the power down thing a thought for a moment, but as Henrik pointed out...1 step forward, two steps back

    No problem on the mysterious 887 board operation, as I'm reworking the boards now. I do, however, have one more quick question for ya Henrik... I should be ok to still run the MAX3081 on the 232 to 422 master board, correct? My thought is, I shouldn't need to (or wouldn't want to) enable or disable the Rx and Tx lines at the master... Is my thinking correct on that one?

    BTW: The new boards will have the MAX3086 on 'em, of course with the sacrifice of my heartbeat led output Oh well, small price to pay.

    Thanks again guys,
    Chris

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Help guys...communication issue, I think?

    Hi Chris,
    I should be ok to still run the MAX3081 on the 232 to 422 master board, correct?
    Lets stop and think about that for a minute....

    Finished thinking?

    If ANY one of the drivers on the bus (doesn't matter which one) is enabled it will "occupy" the bus. There can only be ONE enabled driver on the bus at any given time or they will end up fighting each other.

    All receivers on all devices shouls be enabled at all times. The transmitter on each device should be enabled when, and only when, that specific device is about to put data onto the bus. If two or more transmitters are enabled at the same time there will be conflicts.

    /Henrik.

    EDIT: OK, hold on, brainfart on my behalf here. You're running full duplex so please disregard the above. Yes, you can keep the transmitter on the RS232<->RS422 converter enabled all the time. Doh.....
    Last edited by HenrikOlsson; - 13th October 2013 at 09:22.

  4. #4
    Join Date
    Dec 2005
    Location
    Salt Lake City, Ut, USA
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Help guys...communication issue, I think?

    Cool Henrik,

    I have to say that your brainfart wasn't near as big as mine! Doh, I designed, built and stuffed the boards with those 3081's Oh well, ya gotta crack a few eggs to make an omelet right... I'll check back with progress when I get the new boards whipped up.

    Thanks a ton,
    Chris

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Help guys...communication issue, I think?

    Have you read this?

    http://www.picbasic.co.uk/forum/showthread.php?t=17282

    I was able to have a master PIC talk to multiple slave PICs at 115200. The trick is to have slaves enable usart transmit only when spoken to by the master.

    I assigned each slave an ID (used in the data stream). The master would wait for a reply when necessary or keep on working.

    A calling-all-slaves ID can be used to have them all do something, but they can't reply.

    So no need for any comm IC, just straight PIC to PIC connections.

    Robert

  6. #6
    Join Date
    Dec 2005
    Location
    Salt Lake City, Ut, USA
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: Help guys...communication issue, I think?

    Hey Robert,

    I actually did try that trick in my posted code above, but I just revisited it just to make sure and bummer...no love If you can take a glance at my code above and double check the technique I used, that would be awesome. Heck, maybe I'm not using it correctly?

    Thanks again,
    Chris

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Help guys...communication issue, I think?

    Check the code for slaves in this post:

    http://www.picbasic.co.uk/forum/show...809#post116809

    That's all I needed to do. Master TX to slave RXs, slave TXs to master RX, I think I had pull-ups at master.

    I'm having a hard time with your code (sick, not feeling right).

    I'd suggest making a copy of your program and strip everything except USART logic. Then post that stripped code if you have problems.

    Keep it simple; talk to slave 1, wait for reply, talk to slave 2, wait for reply.

    You can also use a MAX232 and listen in with your PC and see exactly what is sent. That helped me a lot.

    Robert
    Last edited by Demon; - 14th October 2013 at 02:04.

Similar Threads

  1. Replies: 5
    Last Post: - 25th May 2013, 17:33
  2. Replies: 16
    Last Post: - 1st March 2013, 09:22
  3. Hey guys, will this work?
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 15th May 2009, 14:48
  4. guys pls help me in mp lab
    By darylbrown2005 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 9th March 2009, 17:58
  5. Guys pls let me know
    By darylbrown2005 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 8th March 2009, 20:49

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