Hi
Am using the full licence version of "MikroPascal for AVR 4.0.0.2"
That will be fantastic & having fresh minds will pave the way of improving the compiler.
At least things are going into a positive direction.
A nice recommendation if there can be a way of porting the generated assembler code to AVRStudio for stimulation.
Detailed Statistics
Procedures (Details) Window is Missing.
Any chance this maybe added back into the program ?
See below are some of the problems I have encounter in the past.
Kind Regards
Ken
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[1] Accessing the value of Array[x] Of String[x] Is Not Working
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This short program will not compile
Code: Select all
program Constant_Array_Of_String;
{ MCU : ATmega16
Oscillator : 10 MHz, External
SW : mikroPascal for AVR 4.02 Full Version }
var
Day : String[3];
Temp : Byte;
const
Day_Of_Week : array[1..7] of String[3] =
('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
{ M A I N P R O G R A M }
begin
Temp := 0;
for Temp := 1 to 7 do
begin
Day := Day_Of_Week[Temp];
end;
end.
The error message I received is
0:17 E-9 Error in ASM code: Address is out of range "69" R17
Assigning the array of string as part of const is fine.
But when it hit the line 'Day := Day_Of_Week[Temp]', it complained.
Details:
http://www.mikroe.com/forum/viewtopic.php?t=12315
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[2] Bug in Adc_Read(0) with ATtinyxx
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This short program will not compile with any of the ATtiny series.
Code: Select all
program SLA_Charger;
{
MCU : ATtiny13
Oscillator : Internal, 9.6 MHz
SW : mikroPascal for AVR 4.02 Registered Version
Date : 23/10/07
}
Var
Voltage : Integer;
begin
Voltage := Adc_Read(0); // read ADCB(0)
end.
The error message I received is
13:14 E-3 Identifier 'Adc_Read' was not declared SLA_Charger.apas
13:24 E-3 Identifier ')' was not declared SLA_Charger.apas
Yet if I use the ATmega8, it does compiled without any error.
Is there something I miss or is there a bug in the compiler ?
From the support team
Unfortunately, current compiler version doesn't support all ATtiny modules; ADC feature is not supported.
We will support it in next compiler release, but for now we can not say when will that be precisely.
Details:
http://www.mikroe.com/forum/viewtopic.php?t=12080
Will the above be supported in the next version as these are quite common to use ATtiny chips with ADC facilities ?
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------