The Elektor Forum will close. See also this link. From Friday March 1st it is no longer possible to log in to the forum. However, the content of the forum will remain visible until the end of March. As of April 1st the forum will definitely go off the air.

LIN

OBD, CAN, EV, RV

Postby vvvv » Tue Feb 23, 2010 12:00 am

I'm retired now and scrapping the bottom of the barrel.Since my effort to reward ratio is now minimum,I have to carefully choose which projects to persue.Already crossed of FPGA and CAN since they are extrememy non-trivual technologies which require a massive amount of effort and most important I cannot see any 'end product'

What I never knew was the existance of the LIN networked system used in car electronics for the simple things like side mirror and seat adjust.It uses a pseudo RS232 single line bus to connect upto 15 PIC's.Each PIC having a unique ID single byte address.A 'Master' mode PIC then can address any single PIC and send 2 bytes of data,which the other PIC's will ignore.A very simple way to have a network of PIC's.

The only draw back is that the MCP201 (the LIN bus driver) requires a 12 volt battery- no supprise since the technolgies are used in cars.Maplin supply minature 12 volt batterys but I suppose I could use a DC-DC convertor to generate the 12 volts.

So I am in the process of designing a LIN network using a PIC24 master and just 2 PIC18 slave nodes.Anybody out there who has played with LIN? MICROCHIP have a cheap LIN analyser which is on my shopping list.

Yet to decide what to use my design for.Usual thing I do -research,design and then find a use for it -but not always! Called botton up design as opposed to top down.

Regards,must now take my medicine.
vvvv
 
Posts: 48
Joined: Thu Jan 02, 2014 10:36 am

Postby vvvv » Thu Feb 25, 2010 12:00 am

had to change out the slave PIC18's for PIC24's.Didn't realize that abaud is used for automatic baud recognition after 55H is received.Using internal RC oscillator.The PIC18's don't have this facility - all to save the cost of a crystal.

Project is stopped since Farnell's have run out of MCP201 LIN drivers.I suppose that Toyota has snapped them all up.!
vvvv
 
Posts: 48
Joined: Thu Jan 02, 2014 10:36 am

Postby vvvv » Wed Mar 17, 2010 12:00 am

Meanwhile had a look at multidrop MAX485.Looks good to me since 132 slave units can be supported and one's own comms protocol can be invented.


Found a MAX485 master and slave example on the Mikroelektronica website and downloaded the MicroCpro compiler.I was astonished to find that the library routines are inaccesible and hidden.When I single stepped the program and encountered a call or goto instruction for a library routine,it was just ignored and the program counter stepped to the next instruction.

If I want to design and build a standalone project how is it possible? or do I have to tie a Microelektronica development board to it?
vvvv
 
Posts: 48
Joined: Thu Jan 02, 2014 10:36 am

Postby phonoplug1 » Thu Mar 18, 2010 12:00 am

Yeah, I bet you got to buy something from them. You know what they say, 'there ain't no free lunch'...
phonoplug1
 
Posts: 44
Joined: Thu Jan 02, 2014 10:37 am

Postby anneo » Sat Mar 20, 2010 12:00 am

Hi,multi-v,as one retired to another you shout change that name!
It's just like,it starts with a v, uh,vvvv, I don't remember.
But more serious,Mikroelektonika.There programs are usefull to see how things can be done,but not to use as it is.They use all sorts of "instructions" that doesn't exist.In fact it's a call to a macro or subroutine in an #include-file.Sometime easy like RZ for return if zero,replacement for BTFSC STATUS,Z ; RETURN.
Things get more complicated if they do a CALL with a variable as agument,but PIC only does CALL adres(literal or label).
I dont now if it"s somethings for you,but I use only assembly without include-files.Yes,even my brother acuses me of triing to invent the wheel again,but like that I now exactly what is happening.Without all sorts of things going on behind my back.
For controling en communicating over a distance you can try doing that with IR (integrated receivers are rather cheap) or over the net with the X10 protocol.All that can very well be implemented in even simple PIC-processors.
Till next time perhaps,don't forget your pil!
Anne
anneo
 
Posts: 1339
Joined: Thu Jan 02, 2014 10:36 am


Return to Automotive Electronics

Who is online

Users browsing this forum: No registered users and 1 guest