Hi, On 5/11/06, Alan B. Pearce wrote: > > 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 > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist This is very hard if the bus use one of the "non-standard" data rates. 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. 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. If it's a one of use a DSO an look at one bit and you have it . /Ake -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist