CrazyEngineers
  • I have a device that sends a stream of data to an ECU. The data is NOT RS232, it is simple async 8N1, with a logic '0' represented by 12v and a '1' = 0v.

    What I wish to do is emulate this device using a PIC, but be able to send the ECU any hex word I choose. For testing purposes I have been playing with the following, in an attempt to do this:


    Cls
    For sec_code = 65535 To 0 Step -1
    Print At 1, 1, Dec sec_code
    Print At 2, 1, HEX sec_code
    RSOut HEX sec_code
    DelayMS 10
    Next


    I've tried this at 300baud 8N1, inverted. The 5v output from the pic I've used to trigger an opto, which then switches the 12v sent to the ECU input.

    But I can't seem to make the ECU respond to my data. (Surprisingly enough).

    Any ideas / suggestions on how to convert the 5v serial data O/P from the PIC into the 12v input that the ECU needs?

    [​IMG]

    Cheers,
    Chrisall.
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • reachrkata

    MemberJun 19, 2008

    Hi Chrisall,

    The simplest way I would say is to use a rail-to-rail Opamp in comparator configuration. Connect V+ to 12V, V- to 0, In- also to 0 and finally IN+ to the 5V serial data.
    This should do the trick.

    -Karthik
    😁
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register