[Ovmsdev] J1850 support research

Mark Webb-Johnson mark at webb-johnson.net
Tue May 26 10:34:23 HKT 2020


Craig,

Given only two free full expansion pins on the ESP32 (plus the EGPIOs), I think this would be difficult to use another SPI bus to communicate. You are correct in that there can only be one master. Our current SPI bus used to talk to CAN2, CAN3, and EGPIO is also kind of busy.

Using CAN might be difficult because the CAN buses are not present on the internal expansion connector. You could route them out and in the DA26 expansion, but that seems complicated.

You could do your bridge as an SPI slave. That only needs one line (chip select), leaving one free for an interrupt back to the ESP32 if you needed that. Alternatively, just async serial protocol on the EXP1/EXP2 pins.

Regards, Mark.

> On 24 May 2020, at 6:18 AM, Craig Leres <leres at xse.com> wrote:
> 
> I've been doing some research on a possible J1850 expansion board; I've
> looked at the (nice!) work that Mark and Marko have done on TPMS and
> SWCAN expansion boards.
> 
> It looks like the TPMS expansion adds the k-line (LIN bus) to the
> previously unused pin 1 of the DB9. I think I can also use pin 1 for the
> J1850 bus.
> 
> The J1850 protocol chip I'm using (HIP7010) uses SPI as does the SWCAN
> board. The ESP32 docs say there are four SPI devices. Two are used for
> flash tasks leaving HSPI and VSPI. I believe ovms uses HSPI for SPI ram
> access and VSPI is used to run the can buses (and SWCAN when present).
> 
> The problem I see is that the HIP7010 must be SPI master; unlike I2C I
> don't think you can have more than one SPI bus master.
> 
> I think this means my best approach is to build a J1850 to canbus
> protocol bridge and just encapsulate J1850 frames in can frames? I think
> I could still feed the J1850 bus on pin 1 of the DB9. This way the
> protocol bridge would only need the HD25 connector to do everything:
> J1850, 5V, vehicle 12V (needed by the J1850 transceiver), and can bus lines.
> 
> Am I correct in talking myself out of an expansion board?
> 
> 		Craig
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev



More information about the OvmsDev mailing list