Датчики объема. Адреса CAN + 0x80

This commit is contained in:
Dimas 2025-07-28 18:14:03 +03:00
parent 6d250bb68a
commit 111ec362b4
12 changed files with 774 additions and 791 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@ PHYSICAL MEMORY PARAMETERS
BOOT LOADER PARAMETERS
Table Type: SERIAL PORT (SCI 8 bit Mode)
Entry Point: 0x0000b456
Entry Point: 0x0000b42a
OUTPUT TRANSLATION MAP
@ -21,9 +21,9 @@ OUTPUT TRANSLATION MAP
--------------------------------------------------------------------------------
OUTPUT FILES: D:\project2833\GIT\UKSS_23550_2\bin\UKSSTMS320F28335.bin [b0..b7]
CONTENTS: 00000000..00007237 BOOT TABLE
.cinit : dest=0000b5ab size=000001f2 width=00000002
.text : dest=00008000 size=000035ab width=00000002
CONTENTS: 00000000..000071df BOOT TABLE
.cinit : dest=0000b57f size=000001f2 width=00000002
.text : dest=00008000 size=0000357f width=00000002
ramfuncs : dest=0000c13c size=0000002b width=00000002
.econst : dest=0000c000 size=00000111 width=00000002
.switch : dest=0000c168 size=00000028 width=00000002

Binary file not shown.

Binary file not shown.

View File

@ -16,7 +16,6 @@
float ADC_table[ADC_MAX];
int prev_ok[ADC_MAX];
int ADC_skip[TPL_MAX];
float MesPerSec;
unsigned int COUNT_ONE_CANAL;
@ -195,10 +194,8 @@ interrupt void adc_isr(void)
cwnt_ok[i] = 0;
}
if(ADC_skip[++cownt_cans]) cownt_cans++;
if( cownt_cans >= TPL_CANS+2)
cownt_cans=0;
if(++cownt_cans>= TPL_CANS+2)
cownt_cans = 0;
}
fin:

View File

@ -1,5 +1,4 @@
extern float ADC_table[];
extern int ADC_skip[];
extern float MesPerSec;
void setup_adc(void);

View File

@ -43,8 +43,8 @@
//-----------------------------------------------
//-----------------------------------------------
#define TPL_INV 7
#define TPL_FLT 6
#define TPL_INV 8
#define TPL_FLT 8
#define TPL_ENG 8
#define TPL_MAX (TPL_INV + 2)

View File

@ -79,14 +79,14 @@ void InitCan(int Port, int DevNum)
ECanRegs->CANMD.bit.MD0 = 0; // Ïåðåäà÷à
ECanMboxes->MBOX0.MSGID.all = 0;
ECanMboxes->MBOX0.MSGID.bit.IDE = 1; // extended id
ECanMboxes->MBOX0.MSGID.bit.STDMSGID = (CanDevAdr <<2 ) + (1<<10);
ECanMboxes->MBOX0.MSGID.bit.STDMSGID = ((0x80+CanDevAdr) <<2 ) + (1<<10);
// 1 àùèê
ECanRegs->CANMD.bit.MD1 = 1; // Ïðèåì
ECanMboxes->MBOX1.MSGID.all = 0;
ECanMboxes->MBOX1.MSGID.bit.IDE = 1;
ECanMboxes->MBOX1.MSGID.bit.AME = 1; // Ìàñêà
ECanMboxes->MBOX1.MSGID.bit.STDMSGID = (CanDevAdr << 2); // ó ïðèåìà ïðèîðèòåò âûøå
ECanMboxes->MBOX1.MSGID.bit.STDMSGID = ((0x80+CanDevAdr) << 2); // ó ïðèåìà ïðèîðèòåò âûøå
ECanaLAMRegs.LAM1.all = 0x000FFFFF;
// 2 àùèê
@ -94,7 +94,7 @@ void InitCan(int Port, int DevNum)
ECanMboxes->MBOX2.MSGID.all = 0;
ECanMboxes->MBOX2.MSGID.bit.IDE = 1; // extended id
ECanMboxes->MBOX2.MSGID.bit.AME = 1; // Ìàñêà
ECanMboxes->MBOX2.MSGID.bit.STDMSGID = (0x1F << 2);
ECanMboxes->MBOX2.MSGID.bit.STDMSGID = (0x9F << 2);
ECanaLAMRegs.LAM2.all = 0x000FFFFF;
// âûáèðàåì òîëüêî 3 àùèêa äëà ðàáîòû, îñòàëüíûå çàïðåùàåì

View File

@ -19,8 +19,6 @@ int TPL_CANS=0; //
int tpl_cans=0;
int cal_addr=0;
//int adcurr;
FLAG chk,sig;
int sens_type[SIZE];
@ -30,7 +28,7 @@ float Kt[2];
FILTERBAT def_FILTERBAT = DEF_FILTERBAT;
FILTERBAT adc_filter[ADC_MAX];
float out_filter[DAT_MAX];
float out_filter[ADC_MAX];
unsigned int CanPowse=CANPOWSE,CanGO=0;
unsigned int Caliber_time=0;
@ -145,8 +143,6 @@ void Init_sensors()
okay.bit.Ignor=1;
okay.bit.Imit=1;
for(i=0;i<TPL_MAX;i++) ADC_skip[i]=0;
for(i=0;i<SIZE;i++)
{
sens_type[i]=0;
@ -164,14 +160,7 @@ void Init_sensors()
tpl_cans = TPL_CANS*2; cal_addr = tpl_cans; cans = TPL_CANS + 2;
for(i=0;i<tpl_cans;i++) sens_type[i] = TERMO_AD;
if(Mode==adr_FLT1 || Mode==adr_FLT2)
{
ADC_skip[1]=1;
sens_type[2]=0;
sens_type[3]=0;
cans--;
} }
}
if(Desk==dsk_BKSD)
{

View File

@ -35,7 +35,7 @@ void Default_params()
modbus[i] = 0;
}
LastMode = 0x255; // ÷òîá âûçâàòü àâòîêàëèáðîâêó
LastMode = Mode;
Protokol = PROTOKOL;
if(Desk == dsk_PULT)
@ -86,8 +86,8 @@ void Default_params()
for(i=0;i<start_data;i++)
if(sens_type[i] == TERMO_AD)
{
sens_hi_edge[i] = 70;
sens_lo_edge[i] = 60;
sens_hi_edge[i] = 80;
sens_lo_edge[i] = 70;
} }
if(Desk==dsk_BKSD)

View File

@ -1,7 +1,7 @@
; Code Composer Project File, Version 2.0 (do not modify or remove this line)
[Project Settings]
ProjectDir="D:\project2833\23550_2\"
ProjectDir="D:\project2833\GIT\UKSS_23550_2\"
ProjectType=Executable
CPUFamily=TMS320C28XX
Tool="Compiler"