Friday, April 25, 2014

Microchip based CAN Interface - Part II

Since I had built my microchip prototype PCB I barely had time to test it, or even write code for it. Over the months I would get friendly reminders from people if I had completed it yet (thanks Justin ;) ) and I had to keep saying no. I finally got some time to work on it (especially after getting some help in the form of a benchtest setup) and started to run into some (now) obvious design failures over the last couple of monhs. I'll be frank and just post them here for all to see:

1) Peripheral Pin Select Blindness - aka Don't speed through the datasheets!
The DSPic33 supports Peripheral Pin Select, which means you can specify on which pins (out of a list) you want your CAN Transceiver (or other peripherals) to work. I had simply blindly picked a couple of pins that looked good 'layout' wise, without reading the details in the datasheet.
Turns out that some of the Peripheral Pins are Output, and Others are Input Only.. Guess what this blind dumb-ass did? Yup, have inputs as output and vice-versa. Now as far I know that's a problem ;_ So I fixed that with some wire jumps for now - and ordered some new PCBs.. because after all - what else could go wrong right? WRONG - OOPS - another issue:

2) Apparent Inappropriate Part Selection.
For the CAN Transceiver portion I always liked the 8 pin Melexis TH8056 as I had used that with the ELM329 as well. I have a bunch of them so why not use them for this build as well? Well - the ELM329 runs on 5 volts and that 5V is connected to the RX Leg of the TH8056. Guess what voltage the DSPic33 Runs off? 3.3v... So the TH8056 does not want to receive anything. While the TH8056 datasheet states the 'logic pins support 3.3v' (like their Mode0/1 pins) they seem to explicitly specify on another page that the voltage on RxD needs to be 5V.. I tried several different scenarios and it indeed does NOT seem to work with 3.3v (If I'm just being an idiot - feel free to post a comment with how to get it to work since I'd love to salvage the boards I already made). So with that problem facing me right now it leads me to:

3) Terrible Customer Service from Melexis.
What further really irritates me is that when I reached out to Melexis for some clarification on their datasheet and basically asked "can the TH8056 work (or be made to work) with 3.3v on that RxD pin instead of 5V" instead of a simple yes/no or have a technical person give a little insight with perhaps a schematic tweak to get it work you get the sales vultures saying they can't help you because you need to first provide your life's story, company, units per year, market information, where your product is being 'manufactured', where is it being sold, etc etc..
Seriously?? I'm just a guy with barely 10 square inches of space in my kitchen to solder some sh!t together for myself, asking for technical information about your chip - don't give me your BS sales drivel, just give me a f*ckin' answer! Digging through old emails I actually noticed I had tried to ask them similar information a couple of years back and got the same BS request for more information before they could answer - when I did respond in detail with what i was working , etc etc on they surprisingly didn't even bother responding since I'm not a million unit+ customer.. 

So a big middle finger to Melexis - they can keep their TH8056s and shove it.. I'm moving to the Freescale MC33897s.. yes they are 14 pin (8 pins got discontinued a long time ago) but at least I know for a fact they work on 3.3v..


So where does that leave me - well looks like I'll be making a new prototype PCB - yet again - but hopefully this will be (one of) the last.

New Blog for Projects

So I've decided that I'm going to post more about my projects (electronics, software etc) here instead of keeping them on my car blog. That way everything that relates is all together and it will be easier for me to keep track of things. If there are posts that could fit on either I can always copy & paste it to the other blog as well.

To start with I've copied over all of the electronics / GMLan / CAN Bus posts etc here already - I have kept the same dates as the original postings to keep historical perspective.