Send 12v Serial Data from PIC to ECU

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

  • reachrkata
    reachrkata
    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
    😁

You are reading an archived discussion.

Related Posts

hi i am rupoc please any one tell me how to interface steper motor to computer😕
Well this is basically reagrding the post ive made for the polluted sea thing, So could you give a list of substances which act as absorbents towards the impurities present...

Hi

Hi This Is Arun...live In Delhi But Currently Doin Btech Frm Jaipur....i Reallly Want Help Frm You Guyz..........i Wana Become Successful In Life....i Hope To Get Help From U Guyz........
What is the difference between a computer science engineering and information technolgy??????? If i m asked such a question by interviewer what should i say???????
hello evry 1,i am new 2 robotics ,can ne1 pls explain me what goes into the making of a simple autonomous robot:smile: