Code: Select all
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)) */
Moderators: jsmcortina, muythaibxr
Code: Select all
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)) */
stevevp wrote:CANBTR0 = 0x1D
CANBTR1 = 0x1C
see http://www.port.de/cgi-scripts/tq.cgi?c ... point=87.5
yellow lines are optimal
Code: Select all
if (flash4.can_bcast1 & 0x04) {
id = 0x561;
val = (((outpc.clt - 320) * 5) / 9)/10;
valclt = val + 40;
valrpm = outpc.rpm/32;
dataLen = 0x08;
data[0] = 0x00;
data[1] = 0x00;
data[2] = 0x00;
data[3] = (unsigned char)valclt;
data[4] = 0x00;
data[5] = 0x00;
data[6] = (unsigned char)valrpm;
data[7] = 0x00;
ECANSendMessage(id, data, dataLen, MSG_STD);
}
If you have code to contribute that will extend the CAN broadcast support, then yes please.acab wrote:jsmcortina, is it real to rewrite broadcast module for future add other dashboards? I can write code for Fial\Alfa\Lancia dashboards. Alreade have code for VW, Audi, Seat dashboard...
I add working code, that i correct little on based code and it work. Check earler post.jsmcortina wrote: If you have code to contribute that will extend the CAN broadcast support, then yes please.
James
It is much easier and less error prone if you send the source code you have to James instead of telling him to check the previous posts. So if you have working code, send the changed source code files to him.acab wrote:... Check earler post.
racingmini_mtl wrote: It is much easier and less error prone if you send the source code you have to James instead of telling him to check the previous posts. So if you have working code, send the changed source code files to him.
Jean
Code: Select all
--- ms2_extra_can.c 2013-01-31 01:13:12.000000000 +0000
+++ /home/jsm/Downloads/ms2_extra_can.c-acab 2013-05-22 18:28:54.000000000 +0100
@@ -23,7 +23,7 @@
/* Set Can enable, use IPBusclk (24 MHz),clear rest */
CANCTL1 = 0xC0;
/* Set timing for .5Mbits/ sec */
- CANBTR0 = 0xC2; /* SJW=4,BR Prescaler= 3(24MHz CAN clk) */
+ CANBTR0 = 0x1D; /* SJW=4,BR Prescaler= 3(24MHz CAN clk) */
CANBTR1 = 0x1C; /* Set time quanta: tseg2 =2,tseg1=13
(16 Tq total including sync seg (=1)) */
CANIDAC = 0x00; /* 2 32-bit acceptance filters */
wow, sorry, i forget about it. No, leave only 500kbit. i use 50kbit only for testing on table.jsmcortina wrote:Changing CANBTR0 breaks all other CAN comms though?JamesCode: Select all
--- ms2_extra_can.c 2013-01-31 01:13:12.000000000 +0000 +++ /home/jsm/Downloads/ms2_extra_can.c-acab 2013-05-22 18:28:54.000000000 +0100 @@ -23,7 +23,7 @@ /* Set Can enable, use IPBusclk (24 MHz),clear rest */ CANCTL1 = 0xC0; /* Set timing for .5Mbits/ sec */ - CANBTR0 = 0xC2; /* SJW=4,BR Prescaler= 3(24MHz CAN clk) */ + CANBTR0 = 0x1D; /* SJW=4,BR Prescaler= 3(24MHz CAN clk) */ CANBTR1 = 0x1C; /* Set time quanta: tseg2 =2,tseg1=13 (16 Tq total including sync seg (=1)) */ CANIDAC = 0x00; /* 2 32-bit acceptance filters */
Hello everyone, this is my first post here and I am writing from Italy.acab wrote:Proof here
But i get bug - 92-95* celsius didnt work fine. show only 90*. 95 or hight - work fine
Yes, i see that zone.alfa147-16-120 wrote: acab, the temperature gauge in the instrument cluster has a "dead zone" at 90°C, I believe this is intentional and due to instrument cluster design, not to your code.
I think that coolant temperature always at 90°C makes the "common user" more comfortable.
Also, my educated guess is that, to create the "dead zone", shown temperatures between 80°C and 100°C would not be real too.
They would be higher than real in range 80-90°C, and lower in the range 90-100°C.
Code: Select all
if(engine_status_msg_buffer[3] > ((uint8_t)130)) { // there is a gap on 90C
engine_status_msg_buffer[3] += 10;
}
Hello there, Been wanting to know How's the CAN communication with MS3 and E46 progressing so far?acab wrote:James, can you check that and fix code in next releases?
Just checking in to see if anyone has come across this issue.tottestad wrote:Has there been any further developements on this? I Have a 2001 boxter I'd like to get the cluster working via Megasquirt pro ultimate. Ive managed to get the tach to work, setting 0x280*4 but nothing else. The coolant doesnt seem to work by setting 0x289 on.