ATmega128
Program consists of different subroutines.
Subroutines are called by symbols/
Next 'for' does not work!!!
Code: Select all
procedure Buf_string;
var
i :byte;
begin
FileName := '';
UART2_Write_Text('Buf_string'); // tst
UART2_Write(13);UART2_Write(10); // tst
for i:=8 to rxlen-2 do
FileName := FileName + chr(RxBuf[i]);
FileName := '123456789';
UART2_Write_Text(FileName); // tst
UART2_Write(13);UART2_Write(10); // tst
end;
//;************** end Buf_string **************
Main
...
// 'fg' - file get date, time
if ((CMDhi ='f')and(CMDlo ='g')) then //
begin
if rxlen >10 then //
Buf_string; //
end;
Did:
SPH := 0x0F; // Set stack pointer to top of RAM
SPL := 0xE0;
and worked.
Now it does not help:
SPH := 0x0F;
SPL := 0xE0;
is written or not.