o by the way... i'm using PORTA.0 for input and PORTA.1 for output
o by the way... i'm using PORTA.0 for input and PORTA.1 for output
Dave
Always wear safety glasses while programming.
sorry i should have included more of the code. i already took care of turning everything to digital and turning the comparators off. made no difference. as i said the PIC communicates properly between two pc's. i connected one pc to the serial interface i have setup for the pic and then i used another max233 to connect another pc to my porta input and out and was able to send bytes between the pcs without a problem.
thanks,
Jordan
Looking back at your first post and I am still not clear on a few things.
ECU to PC = YES
PIC to PC = YES
ECU to PIC = NO
You may want to look at the PBP manual, I can not find 38400 as a baud rate and 6 is 9600 for SERIN/SEROUT.Others have talked about using a PIC with an ECU, I have not done so, beyond basic serial com I can not help. So the best I can suggest at this point is to double check the baud rates and if the data is true or inverted.o btw the ECU operates at 38400 baud rate thast why theres a 6 there.
Dave
Always wear safety glasses while programming.
i was under the impression teh baud rate was simply a calculation, (1000000 / baud) - 20
when i connected a PC to PORTA.0 and PORTA.1 it was able to send and recieve data at 38400 baud rate. actually now that u mention it, the one thing i DON't know is if the ECU wants the data true or inverted. i imagine true. how would i set it to inverted? the microcode reference suggests bit 14, but i'm confused how to set bit 14 ?
thanks,
Jordan
Here is some info on Baud Rate. http://francis.courtois.free.fr/jc1/...BitFormat.html
The formula you are looking at from the manual is for figuring bit time in microseconds.
In the back of the manual, Appendix A, there is a table for SREIN2/SEROUT2.
Will receive at 9600,Driven, True, no parity.Code:SERIN2 PORT?.?,84,[your DATA]
Dave
Always wear safety glasses while programming.
You got it while I was replying.
I do not think I was much help, Now I am confused
Would you mind posting the code that works so maybe I can learn something?
Dave
Always wear safety glasses while programming.
Bookmarks