Search found 17 matches

by JARETAMAR
07 Dec 2006 20:08
Forum: mikroPascal General
Topic: How do I program a seconds-clock?
Replies: 3
Views: 2456

I developed a unit called Cron for my PIC16F648A running at 3.58 MHz. It trigger an interrupt each 1 mS. Sorry, but the comments are in spanish... Unit Cron; Implementation Var RecTMR1L, RecTMR1H : Byte; // Para el cron�etro Cont_Cron, Fin_Cron : Word; // Para el cron�etro procedure Inicializar_Cron...
by JARETAMAR
07 Dec 2006 00:11
Forum: mikroPascal General
Topic: Simple code that crashes IDE
Replies: 3
Views: 2247

Simple code that crashes IDE

Hi: I found that the following code crashes Mikropascal IDE v6.0.0.2 Steps to reproduce this bug: 1 - Create a new project 1 - Replace the blank program with the following code 2 -Wait for some seconds for Mikropascal crash (possible memory allocation problem) program Crasher; // This simple code cr...
by JARETAMAR
29 Nov 2006 17:19
Forum: mikroPascal General
Topic: Passing String as parameter
Replies: 1
Views: 1721

Passing String as parameter

Hi I can't pass a string as a function parameter. See my code: program Test; function MyFunc (Text:string[5]): Word; begin Result := StrToWord(Text); end; begin end. When I tried to compile this code I received the following error: "3:31 E-43 Array parameter must be passed by reference" Does any kno...
by JARETAMAR
24 Feb 2006 12:02
Forum: mikroPascal General
Topic: attached in my CRC16 unit.
Replies: 3
Views: 2392

Another CRC16 unit code...

Hi Here it go my CRC16 code. It is based in a Turbo Pascal code: Unit CRC16; (* Note: Your crc variable must be initialized to 0, before * using tis routine. *) (* Portions of this code were translated to Turbo Pascal (tm) V4.0 * in March, 1988 by J.R.Louvau * Translated to Mikropascal (tm) V3.2 on ...
by JARETAMAR
11 Feb 2006 19:59
Forum: mikroPascal General
Topic: Calling a pin by a name
Replies: 3
Views: 2580

Possible solution...

Peter: Mikropascal has a limited bit variable managment. You can use it into conditional clauses: if PORTA.1 = 0 then ..... or in assignements: PORTA.1 = 1 I had to solve this problem earlier. I used a function to set easily a pin. For example: Program Test; function Fuel (Value : Byte); begin if Va...
by JARETAMAR
03 Feb 2006 11:59
Forum: mikroPascal General
Topic: Reading tables in mikroPascal
Replies: 1
Views: 1716

Example

You may be could use the following code as reference: Unit CRC16; (* Note: Your crc variable must be initialized to 0, before * using tis routine. *) (* Portions of this code were translated to Turbo Pascal (tm) V4.0 * in March, 1988 by J.R.Louvau * Translated to Mikropascal (tm) V3.2 on December, 2...
by JARETAMAR
24 Jan 2006 02:10
Forum: mikroPascal General
Topic: When a new Mikropascal release ?
Replies: 4
Views: 2886

When a new Mikropascal release ?

Does any know when Mikroelektronika expects release a new Mikropascal version?

Tks
by JARETAMAR
12 Jan 2006 01:46
Forum: mikroPascal General
Topic: Problem in the address computation
Replies: 2
Views: 1971

More info...

I need a sample code that can be compilled to help you...
by JARETAMAR
08 Jan 2006 05:10
Forum: mikroPascal General
Topic: "P16-bootloader, 20Mhz and LCD on PORTB" - problem
Replies: 3
Views: 2394

More details

You forget to include the LCD controller that you are using...... I guess that the problem would be a speed problem. If you see the timing diagram for write/read to/from a LCD controller you will see that it needs small delays that you probably forget to include in your source code. When the PIC was...
by JARETAMAR
04 Jan 2006 03:05
Forum: mikroPascal General
Topic: debug error
Replies: 3
Views: 2175

I tested this source code. This code seems not to be functional. I think it was wrote to show how include assembler routines into a Mikropascal source code. The author omitted the definition of the constants: Address Variable 015 main_global_fullbittime 0016 main_global_haserror 0017 main_global_hal...
by JARETAMAR
30 Dec 2005 05:14
Forum: mikroPascal FAQ
Topic: From Asm to Pascal
Replies: 3
Views: 9857

Pascal equivalent

The following is the equvalent pascal code: Var TmpRX : Byte; begin // Check4Data repeat repeat FSR := SSPSTAT; // test op data until INDF.BF = 1; // ReadData ; Check data indien bit 0 = 1 Led aan TmpRX:= SSPBUF; // lees rx buffer and zet in Tmp until TmpRx <> 0; // Test of data <> 0 end.
by JARETAMAR
30 Dec 2005 04:54
Forum: mikroPascal General
Topic: Variable parameter Bug
Replies: 2
Views: 1998

Variable Parameter Fix

That solves the problem.....

Thanks for you help !!!!! :P

Antonio
by JARETAMAR
29 Dec 2005 18:17
Forum: mikroPascal General
Topic: Variable parameter Bug
Replies: 2
Views: 1998

Variable parameter Bug

When I pass a variable parameter to a procedure it some times returns erroneous values. See the following code: // Bug: Procedures with variable parameters problem // Tested on PIC18F452 / PIC16F84 / PIC16F87x program Test; var Value : Word; procedure Increment (Var V : Word; I : Byte); begin V := V...
by JARETAMAR
28 Dec 2005 11:50
Forum: mikroPascal General
Topic: Array Problem (Part II)
Replies: 3
Views: 3039

My original code...

I ommited the microcontroller model: PIC18F452. The following is the original code on which I discover the bug..... // Bug detected on PIC18F452 / PIC16F87x / PIC16F84A Program Table; { crctab calculated by Mark G. Mendel, Network Systems Corporation} Const crctable: ARRAY[0..255] OF WORD = ( $0000,...
by JARETAMAR
27 Dec 2005 17:21
Forum: mikroPascal General
Topic: Array Problem (Part II)
Replies: 3
Views: 3039

Array Problem (Part II)

I found problems . The next code shows the bug:

Code: Select all

Program Test;
Var
  Numbers: Array[1..300] of Byte;
  Index , Value: Byte;
Begin
  Index:=200;
  Numbers[Index]:=33;
  Value:=Numbers[200]; //Value is not 33 (bug ?)
  Numbers[200]:=33;
  Value:=Numbers[200]; //Works fine
End.
Thanks.

Go to advanced search