Computer Display?


Closed Thread
Results 1 to 30 of 30

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Hi Ed,
    A link to the datasheet for the sensor in question, or at least a part number would be a good idea to post. Somehow Norm knew or assumed its output was RS232, something you didn't say in your first post, so my question is: Is it?

    If the sensor is indeed outputting async serial it may be doing so at TTL levels and your PC may not like that (even though it usually works for short distances) so you may need a MAX232 driver or something.

    A diagram showing how you have it connected would be nice as well.

    But again, without even knowing what type of sensor you're talking about it's just guesses.

    /Henrik.

  2. #2
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Hi Henrik!
    The sensor is the infamous MS5541-CM and I believe the protocol is SPI. Basically the sensor to a 3v to 5v converter to the PIC then from the PIC to a MAX232-cpe to the computer. At short distances from the 3-5v converter the sensor readings are "normal", that is you will accurately read room temperature for example. As the cable from the 3-5v converter becomes longer the room temperature reading becomes abnormal such as -1434C. First cable was a shielded 6-wire, 22 gauge cable. Then I tried a ribbon cable with signals on every other wire with ground at one end only for the wires inbetween the signal wires to avoid cross talk and any ground loops.

    Best, Ed

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


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Hi Ed,
    OK, so the problem is not with the cable to the PC then....

    More questions:
    1) The sensor needs an external clock of 32.768kHz (typically), how are you feeding it that clock signal? Thru the same cable?
    2) The maximum SPI clock frequency (not the same as above) is 500kHz, what frequency are you using and are you using the MSSP module in the PIC or SHIFTIN/SHIFTOUT?

    Again, a diagram showing what you have and exactly how it's connected really does make it a lot easier when trying to help. What's that 3-5V converter for example?

    /Henrik.

  4. #4
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Ramius

    If it's the RS232 cable to the PC you are trying to lengthen try setting the RS232 baud rate slower.
    As a rule reliability goes up when the baud rate is slower.

    Norm
    Last edited by Normnet; - 7th August 2013 at 18:59.

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Ed,

    Sometimes that 3v/5v converter for the communication lines are not needed. Are you converting the SPI lines to 3v going into the sensor? For a long cable there are already losses. Try your setup without the DC/ DC converter.

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  6. #6
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Quote Originally Posted by rsocor01 View Post
    Ed,

    Sometimes that 3v/5v converter for the communication lines are not needed. Are you converting the SPI lines to 3v going into the sensor? For a long cable there are already losses. Try your setup without the DC/ DC converter.

    Robert
    A 5 volt pullup resistor also can help when not using a 3v/5v converter.

    Norm

  7. #7
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Hi All!
    Basically the sensor goes into a TXB0104 at 3v and from the TXB0104 at 5v into the PIC. I have been trying to extend the 5v side from the TXB0104 to/from the PIC with Shiftin and Shiftout. This has clearly been a problem for others after several hours of searching the internet and no one seems to have published a solution. From the PIC 18F1320 through a MAX232CPE into Com1 using the ICD in PicBasic Pro you can see all the readings. While very difficult to do I did manage to place a 47mfd tant. cap to the back of the sensor so it could not be any closer/shorter! Attached is the drawing. Ed
    Attached Images Attached Images  
    Last edited by Ramius; - 8th August 2013 at 03:17.

Similar Threads

  1. Two Versions of MPASM in the Same Computer???
    By rsocor01 in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 11th July 2011, 21:24
  2. PIC16F877A interface with computer
    By jonil22 in forum Serial
    Replies: 4
    Last Post: - 19th February 2008, 21:29
  3. Computer crash and PBP V2.45
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2008, 21:57
  4. Some HID devcie on one computer
    By Shamir in forum USB
    Replies: 4
    Last Post: - 19th February 2007, 07:52
  5. read signal from computer
    By menhwa in forum Serial
    Replies: 1
    Last Post: - 18th February 2006, 05:28

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