Searching \ for '[pic] Canbus autobaud search' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Canbus autobaud search'.

Exact match. Not showing close matches.
PICList Thread
'[pic] Canbus autobaud search'
2006\05\11@122417 by Alan B. Pearce

face picon face
Has anyone done any code to make an 18F CAN chip or MCP2515 CANbus chip
search for the baudrate?

The Microchip documentation seems to say one could search for the baudrate
in listen only mode, but it seems to suggest that the way to do it is set a
baud rate, and listen for a message, if there is an error adjust the
baudrate, but no pointers on how to short circuit the process beyond
stepping the baudrate generator by one and try again. It seems to me that
there should be a more direct method once one has a message or two to
analyse, to sort out they likely baudrate, but I don't really know enough
about CAN to spot it. At the extreme I can get at the bus with a scope as a
starter, but it would be nice to just "plug in and find" as it seems
potentially easier.

Have an application coming up where I would like to reverse engineer the
data protocol, but don't know the baudrate, but want to have a chip listen
in and report the messages to somewhere I can get at them.

TIA

2006\05\11@124522 by Bob Axtell

face picon face
Alan B. Pearce wrote:
{Quote hidden}

I haven;'t done any Can bus work, but there is a generic method of doing
this:

The way I've done this is to temporarily take the monitoring PIC out of
serial mode and  measure the width
of the start bit by simply looping. Then you consult a lookup table that
can tell you what you need to be using
as the baudrate divisor. Of course, there needs to be about an hour of
testing to determine the baudrate values,
by sending something out of Hyperterminal at the various baud rates and
doing captures. There are NOT as
many possible values as you'd think.

--Bob

2006\05\11@130905 by YAP

picon face
Hi,


On 5/11/06, Alan B. Pearce <spam_OUTA.B.PearceTakeThisOuTspamrl.ac.uk> wrote:
{Quote hidden}

> -

2006\05\12@041653 by Alan B. Pearce

face picon face
>This is very hard if the bus use one of the
>"non-standard" data rates.

It wouldn't surprise me knowing the way this particular manufacturer does
things in a non-standard way.

>But if it does, one of (10,15,20,50,100,125,250,
>500,800,1000 kbps) , its easy. Just set the CAN
>circuits in to listen only mode and check if you
>see andy frames on each of the bitrates in turn.
>This is how most do it.

I was figuring this might have to be how I do it.

>For a given time quanta etc you could probably
>come up with something else also but that would
>defintly be a tiresome and very lengthy process.
>You can play with the different parameters wit
>this .intrepidcs.com/website/BitCindex.htm or
>some other bitcalculator.

http://www.intrepidcs.com/website/BitCindex.htm

Hey, that is a nice looking bit of software, and a host of other info about
CAN as well. Anyone else looking at doing CAN, I suspect this site is worth
looking at, from a 5 minute glance. They certainly seem to have put some
effort in to the calculator.

>If it's a one of use a DSO an look at one bit and you have it .

I am hoping this will be a "last resort" part. I am not sure how I can look
at "one bit" as the waveform is NRZ, which is why they do bit stuffing, to
guarantee a clocking edge for the receiving PLL to sync to. I am hoping that
the way the MChip parts work, even with an error in listen mode, it will
dump the receiver contents into the buffer so it may be possible to figure
out where a sync edge looks like it occurs, and so working from a "standard"
bit rate, zoom in on a non-standard one quicker. Least the diagrams in the
MCP2515 datasheet should help here - again to anyone looking at doing CAN
these are the best diagrams I have seen about the message format, and they
just don't put them in the 18F datasheets.

2006\05\12@050932 by Rob Hamerling

face picon face
On 5/11/06, Bob Axtell <.....engineerKILLspamspam@spam@cotse.net> wrote:

> Alan B. Pearce wrote:
> > Has anyone done any code to make an 18F CAN chip or MCP2515 CANbus chip
> > search for the baudrate?
> >

> The way I've done this is to temporarily take the monitoring PIC out of
> serial mode and  measure the width of the start bit by simply looping.

How do you determine the end of the startbit, especially when it is
followed by one or more databits with the same polarity as the
startbit?

Regards, Rob.


--
Rob Hamerling, Vianen NL (http://www.robh.nl/)

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...