20 303 Identifier "Swap" was not declared Atmega32_Resistor_array.mpas
20 301 "("is not valid identifier Atmega32_Resistor_array.mpas
20 304 Syntax error: Expected "end" but "(" found Atmega32_Resistor_array.mpas
20 304 Syntax error: Expected "end" but "PORTC" found Atmega32_Resistor_array.mpas
20 304 Syntax error: Expected "end" but ")" found Atmega32_Resistor_array.mpas
20 304 Syntax error: Expected "." but ";" found Atmega32_Resistor_array.mpas
0 102 Finished (with errors): 05 Aug 2022, 09:03:35 Atmega32_Resistor_array.mppav
Code: Select all
program Atmega32;
{ Declarations section }
VAR n : Byte;
begin
{ Main program }
DDRC := 0xFF;
PortC := 0x00;
DDRD.6 := 1;
PortD.6 := 0;
While True DO
Begin
For n := 0 TO 255 DO
Begin
PortC := PortC XOR n;
PORTC := Swap(PORTC);
delay_ms(2000);
PortD.6 := not PortD.6;
end;
end;
[code]