Tiny412 Compilerfehler

  • 1
  • 2
  • 3
  • 4
  • Page 1 of 4
golf
Benutzer
Avatar
Gender:
Location: Donauwörth
Age: 70
Posts: 250
Registered: 11 / 2009
Subject:

Tiny412 Compilerfehler

 · 
Posted: 06.01.2022 - 08:11  ·  #1
Hi Merlin,

ich bekomme einen Compilererror bei einem kleinen Programm, wenn ich im Programm das ungenutzte DACarray ausklammere ?

I get a compiler error with a small program if I exclude the unused DACarray in the program?

golf

program Tiny412_1;

{$NOSHADOW}
{ $WG} {global Warnings off}

Device = Tiny412, VCC=3.3;
{
Define_Fuses
// Override_Fuses;
NoteBook = A;
COMport = USB;
LockBits0 = [];
FuseBits0 = [];
FuseBits1 = [];
FuseBits2 = [];
}
Import Serport; //, I2Cport; //, ; // SysTick,

From System Import LongWord;


Define

//OSCType = OSC16M; // Interner 16MHz-Takt
OSCType = OSC20M; // Interner 20MHz-Takt
//OSCType = OSCULP32K; // Interner Ultra-Low-Power 32K-Takt
//OSCType = XOSC32K; // Externer 32K-Takt
//OSCType = EXTCLK, nnnnnnnnn; //Externer Taktgeber mit angegebener Frequenz

//SysTick = 10; {msec}
StackSize = $0010, iData;
FrameSize = $0020, iData;

SerPort = 115200, Stop1; // an PC oder an GPS-Normal Platine, je nach bestückten Widerständen
TxBuffer = 64, iData;
RxBuffer = 16, iData;

Implementation
// const

{$EEPROM}
var

structconst
Version: string[3] = '1.0';

{$IDATA}

{--------------------------------------------------------------}
{ Type Declarations }
type

{--------------------------------------------------------------}
{ Const Declarations }

const

CRC_Polynom: longword = $00016F63;

DACArray: array [0..1] of word = ( (2173),(2295) ); // ohne Array Compilerfehler !


{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}

var
ch: char;
w:word;
b2:byte;
bool:boolean;


SSCL1[@PortA,3] : bit; //
SSDA1[@PortA,6] : bit; // benutzt beim bitbang für Änderung der I2C-adresse des MCP4728 und für den NCD2400_I
SI2C1ack[@PinA,7] : bit; //

SoftI2C1_Ack:boolean;
{
NCD2400Iwert :word;
NCD2400Qwert :word;
NCD2400wert :word;
}
{--------------------------------------------------------------}
{ functions }


//-------------------------------------------------------------------------------------------------------------------------------------------
{
procedure SoftI2C1start;
begin
SSCL1:= true; udelay_1(5); //SSCL1[@PortC,0]: bit;
SSDA1:= false; udelay_1(5); //SSDA1[@PortC,1]: bit;
end;
//---------------------------------------------------------------------------------------------------------------
procedure SoftI2C1writebyte(data: byte);
var
bitz: byte;
begin
bitz:=7; // 8 relevante Bits werden gesendet
repeat
SSCL1:= false; udelay_1(3); //
SSDA1:= bit(data,(bitz)); udelay_1(5);
SSCL1:= true; udelay_1(5);
dec (bitz);
until bitz=255;

// (ACK Phase)
SSCL1:= false; udelay_1(3); //
SSDA1:= true; udelay_1(5);
SSCL1:= true; udelay_1(5); //
SoftI2C1_Ack:= SI2C1ack; //SI2C1ack[@PinC,1]: bit;
SSCL1:= false; udelay_1(5); //

end;
//--------------------------------------------------------------------------------------------------------
procedure SoftI2C1stop;
begin
SSDA1:= false; udelay_1(5); //SoftI2CStop()
SSCL1:= true; udelay_1(3); //SoftI2CStop()
SSDA1:= true; udelay_1(5); //SoftI2CStop()
end;
//---------------------------------------------------------------------------------------------------------------------

procedure NCD2400IsetWert; // über eigene Softi2C 1. $C0, 2. config1= $0xxxxxxbit8, 3. config2 = bits 7..0 write volatile register
begin
SoftI2C1start;
SoftI2C1writebyte($C0); //(I2CAdrNCD2400_I); // $C0 shr 1 = $60 , $60 gilt nur beim avrco-treiber !!!!!!!!
SoftI2C1writebyte(hi(NCD2400Iwert)); // nur bit 0 ist dabei genutzt , max wert ist 511
SoftI2C1writebyte(lo(NCD2400Iwert)); //
SoftI2C1stop;
end;
}

{--------------------------------------------------------------}
{ Main Program }
{$IDATA}

begin

DDRA:= %11011000; //
EnableInts;

SSCL1:= true;
SSDA1:= true;

loop

endloop;

end Tiny412_1.
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: Tiny412 Compilerfehler

 · 
Posted: 06.01.2022 - 10:09  ·  #2
Thanks for feedback golf.

I'll check it out.

====================

Danke für die Rückmeldung, Golf.

Ich werde es mir ansehen.
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: Tiny412 Compilerfehler

 · 
Posted: 06.01.2022 - 10:40  ·  #3
Hi Golf.

I get no such error. Did you download latest beta?

If you did, and you still get the error please send me your complete project.

Thanks
==========================================
Hallo Golf.

Ich bekomme keinen solchen Fehler. Hast du die neueste beta heruntergeladen?

Wenn ja und der Fehler immer noch auftritt, senden Sie mir bitte Ihr komplettes Projekt.

Vielen Dank
golf
Benutzer
Avatar
Gender:
Location: Donauwörth
Age: 70
Posts: 250
Registered: 11 / 2009
Subject:

Re: Tiny412 Compilerfehler

 · 
Posted: 06.01.2022 - 15:53  ·  #4
hi Merlin,
sorry for the trouble
i have reinstalled the program and everything is ok.

golf
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: Tiny412 Compilerfehler

 · 
Posted: 06.01.2022 - 17:06  ·  #5
No problem golf.

Are you using ISP3-X to program your board?
golf
Benutzer
Avatar
Gender:
Location: Donauwörth
Age: 70
Posts: 250
Registered: 11 / 2009
Subject:

Re: Tiny412 Compilerfehler

 · 
Posted: 06.01.2022 - 18:59  ·  #6
no,
I don't have an isp3-x.
So far I have only done minimal tests with the Tiny412 and used the Atmel ICE for programming.
Only hex file, so far without Eeprom.

nein, ich habe keinen isp3-x.
Ich habe bisher nur minimale Tests mit dem Tiny412 gemacht und den Atmel-ICE zum Programmieren genutzt.
Nur hex-file, ohne Eeprom bisher.

golf
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: Tiny412 Compilerfehler

 · 
Posted: 06.01.2022 - 19:18  ·  #7
Thank you golf.

There is another user also using Atmel ICE for programming. He is using EEPROM and reports that EEPROM file (*.eep) needs to have an offset of zero even though EEPROM starts at $1400. I have prepared a new version that makes this change and will put it on the Beta page as an alternative to the current one.

I have not yet had a response about whether the ISP3-X also needs this offset variation.

I you, or anyone else, get a chance to test downloading to EEPROM and/or user page I would appreciate any feedback.

Many thanks.

==================================

Danke, Golf.

Es gibt einen anderen Benutzer, der ebenfalls Atmel ICE für die Programmierung verwendet. Er verwendet EEPROM und berichtet, dass die EEPROM-Datei (*.eep) einen Offset von Null haben muss, obwohl EEPROM bei $1400 beginnt. Ich habe eine neue Version vorbereitet, die diese Änderung vornimmt, und werde sie als Alternative zur aktuellen Version auf die Beta-Seite stellen.

Ich habe noch keine Antwort auf die Frage erhalten, ob der ISP3-X auch diese Offset-Variante benötigt.

Wenn Sie oder jemand anderes die Möglichkeit hat, das Herunterladen ins EEPROM und/oder die Benutzerseite zu testen, wäre ich für jede Rückmeldung dankbar.

Vielen Dank!

Übersetzt mit www.DeepL.com/Translator (kostenlose Version)
golf
Benutzer
Avatar
Gender:
Location: Donauwörth
Age: 70
Posts: 250
Registered: 11 / 2009
Subject:

Re: Tiny412 Compilerfehler

 · 
Posted: 07.01.2022 - 09:18  ·  #8
hi merlin,
I programmed the Eeprom with the ICE. That looks good.
The Eeprom was changed by the main program.
document.eep is the Eeprom that has been read back

ich habe mit dem ICE das Eeprom programmiert. Das sieht gut aus.
Das Eeprom wurde durch das Mainprogram geändert.
document.eep ist der zurückgelesene Eeprominhalt
You must be logged in or your permissions are to low to see this Attachment(s).
  • 1
  • 2
  • 3
  • 4
  • Page 1 of 4
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   137   151 · Page-Gen-Time: 0.035221s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI