UPDI Prog. 4808(4809)

Ist es bisher jemanden gelungen einen 4808 zu prog.?

tbegle
Benutzer
Avatar
Gender: n/a
Age: 64
Posts: 150
Registered: 01 / 2018
Subject:

UPDI Prog. 4808(4809)

 · 
Posted: 06.03.2022 - 18:32  ·  #1
Hallo Power User,
mein Compiler bleibt überal hängen! (F!) obwohl ich praktisch fast nichts mehr deklariert habe!
Hat bei jemanden schon irgend etwas funktioniert oder bin ich zu blöd? (eine ehrliche Antwort bitte)

program TB_4808_01;
{$NOSHADOW}
{ $WG} {global Warnings off}
Device = Mega4808, VCC=5.0;
Define_Fuses
// Override_Fuses;
NoteBook = A;
Supply = 5.0, 100;
LockBits0 = [LockB0, LockB2, LockB6, LockB7];
FuseBits0 = [];
FuseBits1 = [];
FuseBits2 = [FREQSEL1];
FuseBits3 = [];
FuseBits4 = [CRCSRC0, CRCSRC1];
FuseBits5 = [SUT0, SUT1, SUT2];
FuseBits6 = [];
FuseBits7 = [];
ProgMode = UPDI;
Import SysTick, SerPort, SerPort2, ADCPort; // SoftPWM F!, SPIdriver F!, I2Cport F!, BeepPort F!,
From System Import Float;
Define
SysTick = 10; {msec}
StackSize = $0064, iData;
FrameSize = $0064, iData;
SerPort = 9600, Stop1; {Baud, StopBits|Parity}
RxBuffer = 8, iData;
TxBuffer = 8, iData;
SerPort2 = 115200, Stop1; {Baud, StopBits|Parity}
RxBuffer2 = 8, iData;
TxBuffer2 = 8, iData;

ADCchans = 4, iData; ADC's noch nicht getestet!
ADCpresc = 64;

// I2Cport = PortF F!
// I2Cdat = 2;
// I2Cclk = 3;

// SoftPWMport = PortD; {use PortD for PWM output}
// SoftPWMtimer = Timer0, 10; {use timerx, PWM cycle time msec}
// SoftPWMres = 16; {PWM resolution is 16 points}
// SoftPWMchans = 1, 5; {x channels, bity is the first bit}

// SPIpresc = 0; F!
// SPIOrder = LSB;
// SPICPOL = 0;
// SPICPHA = 0;
// SPI_SS = true;
// BeepPort = PortD, 4; F!
Implementation
{$IDATA}
{--------------------------------------------------------------}
{ Type Declarations }
type
{---------------------------- F! -----------I2C(TWI) F!-----------------------}
{ Const Declarations }
BH1750 : byte = $23; // Helligkeits Sensor (LUX) ($E8
// -------------------------- F!---------------------------------------------------
WoDay : Array[0..6] of string[3]=('So.','Mo.','Di.','Mi.','Do.','Fr.','Sa.');
// -----------------------------------------------------------------------------
{ Var Declarations }
{$IDATA}
Sig [@PortA,6] : bit; // MINI Buzzer (D07)
// ---------------------------- ok! ---------------------------------------
bef, x,pu_f,vol,t_As,play,xi,count,com,n,aaf1,aaf2,sw14,sw58,m,ik : byte;
{--------------------------------------------------------------}
{ functions }
procedure InitPorts;
begin
PortA := %00111100; F!
end InitPorts;
{--------------------------------------------------------------}
{ Main Program }
{$IDATA}

begin
InitPorts;
EnableInts;
loop

endloop;
end TB_4808_01.

Überlauf beim Programmer Aufruf dsc >200 - erledigt 30 uralt Atmel beseitigt

Gruss
Rudi Ratlos ( T.Begle)
golf
Benutzer
Avatar
Gender:
Location: Donauwörth
Age: 70
Posts: 250
Registered: 11 / 2009
Subject:

Re: UPDI Prog. 4808(4809)

 · 
Posted: 07.03.2022 - 06:50  ·  #2
Hallo Rudi,
ich denke, da kann Dir nur Merlin weiter helfen. Der Compiler kennt den 2. Serport wohl noch nicht.Weiter fehlen noch die Worte const und var.


I think only Merlin can help you there. The compiler probably doesn't know the 2nd serport yet.
The words const and var are also missing.
golf
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: UPDI Prog. 4808(4809)

 · 
Posted: 07.03.2022 - 09:44  ·  #3
Hello Rudi

I am in touch with Toni over this.

Which version of compiler are you using?

As golf says, you are missing const and var key words.

in v5.11.08 Serports 1-3 are known to work at 9600 baud. I expect them to work at all baud rates. Serport4 is not tested because 4808 only has 3 ports. I have not yet had chance to test on 4809, but I expect it to work. ADC? Rolf did some work on that I believe but I have not tested it. My current focus is TWI/I2C.

Most other drivers are disabled for UPDI.

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

Ich bin diesbezüglich mit Toni in Kontakt.

Welche Version des Compilers verwenden Sie?

Wie Golf sagt, fehlen Ihnen die Schlüsselwörter const und var.

In v5.11.08 sind die Serports 1-3 dafür bekannt, bei 9600 Baud zu funktionieren. Ich erwarte, dass sie bei allen Baudraten funktionieren. Serport4 ist nicht getestet, weil die 4808 nur 3 Ports hat. Ich hatte noch keine Gelegenheit, 4809 zu testen, aber ich erwarte, dass es funktioniert. ADC? Ich glaube, Rolf hat daran gearbeitet, aber ich habe es nicht getestet. Mein derzeitiger Schwerpunkt ist TWI/I2C.

Die meisten anderen Treiber sind für UPDI deaktiviert.


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

Re: UPDI Prog. 4808(4809)

 · 
Posted: 08.03.2022 - 06:55  ·  #4
Hallo Rudi,

'Der Compiler kennt den 2. Serport wohl noch nicht.'
Das war falsch von mir. Der Serport2 wird schon compiliert, mein dsc-File war zu alt.

'The compiler probably doesn't know the 2nd serport yet.'
That was wrong of me. Serport2 is already being compiled, my dsc file was too old.
tbegle
Benutzer
Avatar
Gender: n/a
Age: 64
Posts: 150
Registered: 01 / 2018
Subject:

Re: UPDI Prog. 4808(4809)

 · 
Posted: 12.03.2022 - 13:33  ·  #5
Hallo,
schade dass anscheinend alle Aktivitäten bezüglich UPDI (der AT-Mega) Prog. an Merlin hängen bleiben, der nur peripher mit der ELAB Entwicklung involviert ist.
Gibt es für die UPDI eine roadmap?
Gruss
Toni

Hello,
it's a pity that apparently all activities concerning UPDI (the AT-Mega) prog. are left to Merlin, who is only peripherally involved with the ELAB development.
Is there a roadmap for the UPDI?
Greetings
Toni
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: UPDI Prog. 4808(4809)

 · 
Posted: 12.03.2022 - 15:26  ·  #6
With great respect Toni, miparo has also done crucial work for UPDI. Without him the ELab programmers would not have been able program these chips at all.

ELab is now a community project. Embedded drivers have to be down to me. I will do them in the order I am asked to do them. But I will only do them one at a time.

Writing drivers in AVRco Pascal is perfectly possible if anyone wishes to undertake that project, and to be honest it would be my preferred approach, but would not satisfy your desire to port existing code to UPDI.

If I had not have been diverted to porting embedded drivers to UPDI, I would have been developing these AVRco Pascal drivers, and extending AVRco Pascal to support them, since they could easily be public domain and anyone could add to the library. (Record functions were a first step in this direction, the idea being that a driver could be encapsulated in a record).

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

Mit großem Respekt Toni, miparo hat auch für UPDI entscheidende Arbeit geleistet. Ohne ihn wären die ELab-Programmierer gar nicht in der Lage gewesen, diese Chips zu programmieren.

ELab ist jetzt ein Gemeinschaftsprojekt. Die eingebetteten Treiber müssen von mir kommen. Ich werde sie in der Reihenfolge machen, in der ich darum gebeten werde. Aber ich werde immer nur einen nach dem anderen machen.

Das Schreiben von Treibern in AVRco Pascal ist durchaus möglich, wenn jemand dieses Projekt in Angriff nehmen möchte, und um ehrlich zu sein, wäre dies mein bevorzugter Ansatz, würde aber nicht Ihren Wunsch erfüllen, bestehenden Code nach UPDI zu portieren.

Wenn ich nicht mit der Portierung von Embedded Treibern auf UPDI beschäftigt gewesen wäre, hätte ich diese AVRco Pascal Treiber entwickelt und AVRco Pascal erweitert, um sie zu unterstützen, da sie leicht öffentlich zugänglich sein könnten und jeder die Bibliothek erweitern könnte. (Record Funktionen waren ein erster Schritt in diese Richtung, die Idee war, dass ein Treiber in einem Record gekapselt werden kann).

Übersetzt mit www.DeepL.com/Translator (kostenlose Version)
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   109   123 · Page-Gen-Time: 0.020544s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI