RS-232 confusion


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: RS-232 confusion

    definitely not rs232 and not a Manchester code , its a rtz(return to zero) stream of some sort . where does it come from and is there any identifiable start/stop sequence


    bi-phase ?

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: RS-232 confusion

    Also, RS-232 signals go from -12V to +12V. What you have there is some kind of 1-wire serial communication going on.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: RS-232 confusion

    It is one wire communication. The voltage level is 18VDC. What you see in that picture the output from a RS-232 IC. I can identify the start/stop and know what each piece of data is. The problem is, I have to do it with my oscilloscope and eyes as opposed to using a PIC to interpret it.

    Each bit is 500uS. The high/low within the 500uS bit is predetermined. In other words, it may be 200uS off and 300uS on or 400uS on and 100uS off but I know before the packets starts. The entire packet is 100mS long.

    What is the best way to get this information to a PIC where I can log it instead of staring at my oscilloscope?

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: RS-232 confusion

    if you can't identify the device then a complete transaction from line idle to send/receive and back to idle with a data translation would help . guessing seems pointless

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


    Did you find this post helpful? Yes | No

    Default Re: RS-232 confusion

    If you know it's RS232, why not send into a PC?

    Assuming you don't have a Saleae logic probe or other device capable of reading signal.

    Robert

  6. #6
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: RS-232 confusion

    If you know it's RS232, why not send into a PC?
    Richard has confirmed it's not RS-232.
    definitely not rs232
    if you can't identify the device then a complete transaction from line idle to send/receive and back to idle with a data translation would help . guessing seems pointless
    I can identify everything.

    I don't really need to convert the data into a "readable" format, all I need to do is accurately measure the on/off period in each bit. For example, if I'm able to do something like this, my job is complete:

    Bit 1 // On - 100uS / Off - 400uS
    Bit 2 // On - 350uS / Off - 150uS
    Bit 3 // On - 100uS / Off - 400uS
    Bit 100..........

    I'm using an 18F87J50 and tried using an ECCP input but was never able to get it working. Then I figured if it was some type of standard communication I'd be able to push the easy button but that's not a reality now.

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


    Did you find this post helpful? Yes | No

    Default Re: RS-232 confusion

    I got confused by this I guess.
    What you see in that picture the output from a RS-232 IC
    If you only want to know ON/OFF duration of 18v signal, why not use the signal to control the base of a transistor that would send 5v to a PIC?

    Then I would use interrupts on that pin and use a timer.

    Robert
    Last edited by Demon; - 17th March 2015 at 01:12. Reason: corrected Gate to Base

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: RS-232 confusion

    getting info here is a bit like pulling teeth , but lets assume a 48mhz clock and that timer4 is free along with a pin like portb .2
    Code:
    some vars
    bit_is var byte 
    I_data var PORTB.2    'lets call this the input
    
    a routine
    bit_test:
    bit_is =0
    t4con=0   ' timer off
    tmr4=0   ' clear timer 
    pir3.3=0  'clear timer overflow flag
    
    while ( ! i_data) : wend 'wait here till input goes high  to sync up
     while ( i_data) : wend  ' wait here till input goes low
    t4con=6     ;  prescale 16 timer on
     while ( ! i_data) : wend  ' wait here till input goes high  
     if  pir3.3 then bit_is=1  ;  offtime > 340 uS  
    else
      bit_is=0 '  the offtime < 340 uS 
    
    endif
           
     return
    it could be nicer if
    1 does the line idle high or low
    2 what does a start bit look like
    3 how many bits in a session
    4 100uS / Off - 400uS a 1 or a 0 ?

Similar Threads

  1. Arbitration of 232 signals
    By blmcali in forum Serial
    Replies: 1
    Last Post: - 13th July 2012, 04:06
  2. PIC18F2450 Rs-232
    By PlantBob in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 4th February 2011, 00:14
  3. PIC18F2450 Rs-232
    By PlantBob in forum General
    Replies: 3
    Last Post: - 17th January 2011, 18:58
  4. polling information in rs-232
    By Tondunard in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 12th February 2008, 12:32
  5. ethernet to rs-232
    By maus in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 18th April 2006, 17:44

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