Impakt wrote:What about if i want to use the select monitor pins only for datalogging? I understand that these pins are 12 and 13 on the OBD-II connector.
No, that's incorrect, you've missed what Colby has told you about the K-line. The only Subarus that use pins 12 and 13 on the 16 pin DLC plug are a small number of the old SSM1 compatible cars. The vast majority use ISO9141-2 compatible signalling, which uses pin 7 for both Tx and Rx, and that's the interfacing scheme that all the development around these parts has been done around.
Can i use the MAX232 in this case?
That's a moot point seeing as your assumptions about pins 12 and 13 are likely to be wrong (as you haven't told us what car you want to talk to, we don't know for sure!). If you want to interface with a car that uses the K-line, you may end up using a MAX232 or similar to do some level shifting, but by fixating on this chip you're missing what really needs to be done.
If you do have a K-line car, there are a number of different ways of creating the interface. As Colby says, you don't need optos, and indeed there are a couple of one-chip solutions around nowadays that will do most of the hard work for you.