chrisall
Member • Jun 16, 2008
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?
Cheers,
Chrisall.
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?
Cheers,
Chrisall.