When becomes MicroPascalAVR a real working compiler?

Post your requests and ideas on the future development of mikroPascal for AVR.
Post Reply
Author
Message
ThomasW69
Posts: 3
Joined: 17 Dec 2007 20:21

When becomes MicroPascalAVR a real working compiler?

#1 Post by ThomasW69 » 18 Dec 2007 16:17

Former I used BascomAVR but because Iam more familiar with Pascal than Basic I tried Micropascal AVR. After some days of checking the functions and the examples I determines that there ar many many bugs and illogical error messages. Many funtions do not work as they are describes in the manual or the help file.

Example 1:
SPI advanced initialisation on ATMEGA2561. In the manual you can read

Spi_Init_Advanced(MASTER_OSC_DIV4, DATA_SAMPLE_MIDDLE, CLK_IDLE_LOW, LOW_2_HIGH);

I you try to wrtie that you will get an error message that MASTER_OSC_DIV4 is not declared. After some hours of searching I found the correct parameters of that function by viewing the file SPI_const.mcl in the uses directory with an external HEX-Editor.

Spi1_Init_Advanced(_SPI_MASTER,_SPI_FCY_DIV4,_SPI_CLK_LO_LEADING);

is working but you won't find this in the manual!

Example 2:
The Ord function does not work anyway. Also the so called solution in
http://www.mikroe.com/forum/viewtopic.p ... hlight=ord does not work on ATMEGA2561.

Example 3:
Records.

Code: Select all

type
TFontInfo = record
	CharWidth:byte;
	CharHeight:byte;
	CellWidth:byte;
	CellHeight:byte;
 end;

const
  FontInfo : array[2] of TFontInfo;
this gives an Error ' Expected "=" but found";"'
Thats ok. But you have no possibility to initialize that array of records as a constant.
If you want to set that constant by adding a "=(" and you will get an error that the Expression is to complex. You can define it as a variable but then you have to set the values step by step. Wirh large records such as menus this is frustrating. See that exaple

Code: Select all

var Fontinfo: array[2] of TFontInfo;

begin
Fontinfo[0].Charwidth:=5;
Fontinfo[0].CharHeight:=8;
Fontinfo[0].Cellwidth:=6;
Fontinfo[0].CellHeight:=9;
Fontinfo[1].Charwidth:=8;
Fontinfo[1].CharHeight:=14;
Fontinfo[1].Cellwidth:=9;
Fontinfo[1].CellHeight:=15;
....
end;
Example 4:
Uses declarations:
I have a project where the main program is in Main.apas. This uses an other unit called grafik.apas. Both units are in the same project directory. and grafik.apas is located in the uses of main.apas. When compiling i will get the error "E-44 error occured while compiling grafik" "E-7 file 'grafik' not found". Why?
10 minutes ago it worked and also re-starting the program does not solve this problem.

Example 5:
PWM

Pwm_Init(PWM_PHASE_CORRECT_MODE, PWM_PRESCALER_256, PWM_NON_INVERTED, duty);

does not work on ATMEGA2561. It gives an Error "E-3 PWM_INIT was not declared" and I don't know how to initialise PWM on that controller. There is no help available.

Post Reply

Return to “mikroPascal for AVR Wish List”