odd? network problem


Closed Thread
Results 1 to 4 of 4
  1. #1
    d1camero's Avatar
    d1camero Guest

    Default odd? network problem

    I have a 2400baud 8N1 inverted serial connection between a 12F675 (slave) and a 16F676 (master) devices. The are two wires: one for Tx, and one for Rx. The master sends a command, the slave receives it, understands it and replies - no problem. BUT this only works when I have a logic analyzer hooked up to the master transmit wire.

    The other odd problem is that when the slave replies, the master does not trigger off the WAIT of the SERIN2.

    Looking at all this data with the logic analyzer, it all seems OK.

    FYI both the 12F675 and 16F676 are using internal oscillators.

    I suspect I need a pull-up resistor somewhere...

    thanks
    Don

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    What pins are you using... if you hit one with open drain then the answer is you'll probably need a pull-up, otherwise not required. If you check with a scope and data is going pretty much rail to rail then the logic levels are fine. You're skating on thin ice is you're using internal oscillators with serial comms...

  3. #3
    d1camero's Avatar
    d1camero Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks for the reply. The data sheets do not indicates that any of the ports I am using are open drain:

    On the 16f676 (master):
    * portc.1 for Tx - RC1/AN5
    * portc.2 for Rx - RC2/AN5

    On the 12F675 (slave):
    * gpio 4 for Tx - GP4/AN3/T1G/OSC2/CLKOUT
    * gpio 2 for Rx - GP2/AN2/T0CKI/INT/COUT


    I did have one problem: I did not have ANSEL and CMCON set correctly for the master - setting this correctly solved the second problem about the master not triggering off the WAIT on SERIN2.

    But I still have the problem between the Tx (portc.1) on the master, and the Rx (gpio 2) on the slave - it only works with the Logic analyzer OR scope connected.

    The signal under the scope goes from rail to rail (0v to +5v), however, I notice that after the last signal, there is not a straight drop off, but an inverse drop 1ms in length, like a capacitor draining?? I only have an analog scope, so this is a fleeting signal. I try this on other data lines, and I do not see the curve.

    Also note: that on the 12F675 slave, I have external interupts enabled on the GP2 pin. I do not have a handler, I use it only to see if data has come in on the Rx pin.

    Suggestions of where I should look?

    thanks
    Don

  4. #4
    d1camero's Avatar
    d1camero Guest


    Did you find this post helpful? Yes | No

    Default

    Bruce solved it for me:

    <i>
    Sounds like line capacitance. Put a 10K pull-down from ground to the bus. I.E. from ground to the TX/RX line. Should take care of any settling problems.

    Regards,

    -Bruce
    </i>

Similar Threads

  1. Problem to compile my program
    By wagner in forum Off Topic
    Replies: 5
    Last Post: - 7th July 2008, 20:17
  2. Problem with ASM IRQ using FSR0 on PIC18F252
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th March 2008, 20:48
  3. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  4. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 04:36
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59

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