Hello mkroelektronika team .....
i am using pic16f886 to compile a project ... but i get const truncated error.If i delete 2 or 3 lcd8_Cmd commands ther error becomes ok.
My ram is around 50 % used .and flash rom is also around 50 % used .
Please suggest me whaT TO DO .....
USING MIKROC V8.2.....
const truncated error....
-
- Posts: 619
- Joined: 05 Jul 2008 06:05
- Location: Thailand
Re: const truncated error....
Can you post your code?
Re: const truncated error....
i am sending you the somplete project in mikroc v8.2.......
please compile and check it out.....
Thanks for ur precious time....
please compile and check it out.....
Thanks for ur precious time....
- Attachments
-
- triple timer4.rar
- (136.86 KiB) Downloaded 179 times
Re: const truncated error....
hello dear,
I have ported the code in mikroc pro v3.2 .
I still get some errors regarding lcd display.not working properly some garbage values coming .
Though i get this message from compiler in message box :
IRP bit must be set manually for indirect access to 'txt' variable timer.c
IRP bit must be set manually for indirect access to 'txt2' variable timer.c
Please let me know what exactly this error means.How to correct this error.
I am sending the project of this ported code also .
Please help...
I have ported the code in mikroc pro v3.2 .
I still get some errors regarding lcd display.not working properly some garbage values coming .
Though i get this message from compiler in message box :
IRP bit must be set manually for indirect access to 'txt' variable timer.c
IRP bit must be set manually for indirect access to 'txt2' variable timer.c
Please let me know what exactly this error means.How to correct this error.
I am sending the project of this ported code also .
Please help...
- Attachments
-
- TIMER 4 PRO.rar
- (90.58 KiB) Downloaded 165 times
- tihomir.losic
- mikroElektronika team
- Posts: 2138
- Joined: 02 Dec 2009 14:16
- Location: Serbia
- Contact:
Re: const truncated error....
Hello,jatin wrote:Though i get this message from compiler in message box :
IRP bit must be set manually for indirect access to 'txt' variable timer.c
IRP bit must be set manually for indirect access to 'txt2' variable timer.c
Pointers with PIC16 are “near”: they carry only the lower 8 bits of the address. Compiler will automatically clear the 9th bit upon startup, so that pointers will refer to banks 0 and 1.
To access the objects in banks 2 or 3 via pointer, user should manually set the IRP, and restore it to zero after the operation.
The stated rules apply to any indirect approach: arrays, structures and unions assignments, etc.
EXAMPLE:
From datasheet for PIC16F887:
IRP: Register Bank Select bit (used for indirect addressing).
1 = Bank 2, 3
0 = Bank 0, 1
Before access to component of an array need to set IRP to 1, and after access, manually return to 0.
Best regards,
Losic Tihomir
mikroElektronika [Support team]