/* Set timing for .5Mbits/ sec */
CANBTR0 = 0xC2; /* SJW=4,BR Prescaler= 3(24MHz CAN clk) */
CANBTR1 = 0x1C; /* Set time quanta: tseg2 =2,tseg1=13
(16 Tq total including sync seg (=1)) */
I believe that there are a number of different settings that can achieve the same result from my recollection of reading the datasheet. Have you scoped the outputs from the two settings and compared them?
What is leading you to question the existing setting?
And you still haven't posted what your problem is with the alpha code. Is there a reason why you don't want to help debug the code? That is a really annoying attitude; if everyone did that, the development would have been a disaster.
racingmini_mtl wrote:And you still haven't posted what your problem is with the alpha code. Is there a reason why you don't want to help debug the code? That is a really annoying attitude; if everyone did that, the development would have been a disaster.
Jean
I post it later in topic with bugs of alpha code. In shortly - all coils work in same time.
What about CANBTR0 and CANBTR1?
On oscilloscope i can see something on CAN (packets). But i cant sniff it on my CAN-USB dongle. If i understand - problem in speed of CAN.
Sounds good Peter. 20ms should be ok. Check your "mainloop time" - this is the time in microseconds that each mainloop pass is taking. So long as the mainloop time is significantly less than 20ms you'll be ok. I've only seen it anywhere close (10ms?) when testing the code with all options enabled and a 60-2 and high rpms.
jsmcortina wrote:Sounds good Peter. 20ms should be ok. Check your "mainloop time" - this is the time in microseconds that each mainloop pass is taking. So long as the mainloop time is significantly less than 20ms you'll be ok. I've only seen it anywhere close (10ms?) when testing the code with all options enabled and a 60-2 and high rpms.
James
Right now the gauge shows 23 ms at 7300 rpm (60-2 & cam)
If I turn off CAN broadcasting, it doesn't really change from 23 ms.
At 1000 rpm mainloop is about 12ms, with or without CAN broadcast turned on.
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
jsmcortina wrote:Sounds good Peter. 20ms should be ok. Check your "mainloop time" - this is the time in microseconds that each mainloop pass is taking. So long as the mainloop time is significantly less than 20ms you'll be ok. I've only seen it anywhere close (10ms?) when testing the code with all options enabled and a 60-2 and high rpms.
James
Right now the gauge shows 23 ms at 7300 rpm (60-2 & cam)
If I turn off CAN broadcasting, it doesn't really change from 23 ms.
At 1000 rpm mainloop is about 12ms, with or without CAN broadcast turned on.
Oops, I can't read.
It is 2.3ms
Sorry!
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
For some reason, I do not have the 120 ohm resistor in my MS3 (V3.0 board, followed all instructions in the manual). My rpm gauge is lagging behind by about 1 - 2 seconds. Is it because the resistor is missing? The gauge cluster has the resistor installed and as I understand it, you need a resistor on each side of the bus to act as a terminator. I will check this for myself later, just wanted to get confirmation.
I have an ABS computer that I would like to receive the data from and pass to the vss to get speedo to work. Which part of the code do I have to modify to make this work. I am [also] a poor programmer but am continuously learning!