Search found 28 matches

by renew
13 Mar 2023 22:32
Forum: mikroC PRO for PIC General
Topic: 2-Dimensions Array as a parameter - Suspicious pointer conversion
Replies: 6
Views: 974

Re: 2-Dimensions Array as a parameter - Suspicious pointer conversion

Hi
Thanks, it works
but still
204 1505 Suspicious pointer conversion main.c
there.
by renew
12 Mar 2023 21:31
Forum: mikroC PRO for PIC General
Topic: 2-Dimensions Array as a parameter - Suspicious pointer conversion
Replies: 6
Views: 974

Re: 2-Dimensions Array as a parameter - Suspicious pointer conversion

Hi.
Sorry for the late answer.
In this case we have
1508 Implicit conversion of int to ptr main.c

Your example has the same error.
by renew
03 Feb 2023 13:21
Forum: mikroC PRO for PIC General
Topic: 2-Dimensions Array as a parameter - Suspicious pointer conversion
Replies: 6
Views: 974

Re: 2-Dimensions Array as a parameter - Suspicious pointer conversion

Thank you for the reply
I can't omit some some dimesion because I transfer all the first dimension as a string so I must to show second dimension

I tried this

Code: Select all

Write_String(62, 7, sound_menu[sound_menu_index][]);
Result
308 315 Invalid expression main.c
by renew
03 Feb 2023 04:51
Forum: mikroC PRO for PIC General
Topic: 2-Dimensions Array as a parameter - Suspicious pointer conversion
Replies: 6
Views: 974

2-Dimensions Array as a parameter - Suspicious pointer conversion

Hi, folks I have a 2 dimensions array like this const char sound_menu[3] [13] = { {"SOUND + VIBR"}, {" SOUND "}, {" VIBRATION "} }; When i transfer the second dimension into function Write_String(62, 7, sound_menu[sound_menu_index]); I obtain this message 308 1505 Suspicious pointer conversion main....
by renew
03 Feb 2023 03:43
Forum: mikroC PRO for PIC General
Topic: PIC16F18857 No access to EEPROM, failure on all sides
Replies: 6
Views: 734

Re: PIC16F18857 No access to EEPROM, failure on all sides

I am sorry !!!
NVM Module was disabled by PMD Control.
All works now
:oops:
by renew
03 Feb 2023 03:20
Forum: mikroC PRO for PIC General
Topic: PIC16F18857 No access to EEPROM, failure on all sides
Replies: 6
Views: 734

Re: PIC16F18857 No access to EEPROM, failure on all sides

From datasheet:
When read access is initiated on an address outside
the parameters listed in Table 10-3, the NVMDATH:
NVMDATL register pair is cleared, reading back ‘0’s.
by renew
03 Feb 2023 02:58
Forum: mikroC PRO for PIC General
Topic: PIC16F18857 No access to EEPROM, failure on all sides
Replies: 6
Views: 734

Re: PIC16F18857 No access to EEPROM, failure on all sides

I have found that

Code: Select all

NVMDATL = 1;
NVMDATH = 2;
Write_Integer(160, 6, NVMDATL + NVMDATH, 5);
Both registers are always zero regardless of what is was written in them before.
:x :x :x :x
by renew
02 Feb 2023 22:40
Forum: mikroC PRO for PIC General
Topic: PIC16F18857 No access to EEPROM, failure on all sides
Replies: 6
Views: 734

Re: PIC16F18857 No access to EEPROM, failure on all sides

Hi. Thank you.
That fix allows me to use EEPROM Editor tool properly.
Now I can set needed cells by values.

But I still cant read and write cells with built-in library and with my reading function.

Actually the correct address is 0xF000
by renew
02 Feb 2023 20:22
Forum: mikroC PRO for PIC General
Topic: PIC16F18857 No access to EEPROM, failure on all sides
Replies: 6
Views: 734

PIC16F18857 No access to EEPROM, failure on all sides

Hi, people. I am using PIC16F18857 this time and as usual I triedto use the built-in EEPROM library which is very easy int a; a = 5; EEPROM_Write(0x0000, a); a = EEPROM_Read(0x0000); But it does not work, the reading result is always 0. I wrote my own lib char EEPROM_Read(char a){ NVMREGS_bit = 1; /...
by renew
18 Dec 2022 00:29
Forum: mikroC PRO for PIC General
Topic: Constants aloccation in ROM by address compilator fail
Replies: 20
Views: 3479

Re: Constants aloccation in ROM by address compilator fail

Hi. I don't know what is happened, but it started to work now I just do for pic 1939 const char Cells[10] = {0x05, 0x30, 0x08, 0x10, 0x15, 0x13, 0x01, 0x04, 0x14, 0x60} absolute 0x2220; char Cells_2[10]; volatile char a; void func (void{ char i; char txt[5]; for(i=0; i<10; i++){ Cells_2[i] = Cells[i...
by renew
12 Dec 2022 16:22
Forum: mikroC PRO for PIC General
Topic: Constants aloccation in ROM by address compilator fail
Replies: 20
Views: 3479

Re: Constants aloccation in ROM by address compilator fail

Yes, you are right.
But my goal - the users should to be able to change cells during programming PIC to change some parameters of device. My device has only one button so I can't implement a menu.
I mean the cell changing method should be as easier as it's possible.
by renew
12 Dec 2022 14:39
Forum: mikroC PRO for PIC General
Topic: Constants aloccation in ROM by address compilator fail
Replies: 20
Views: 3479

Re: Constants aloccation in ROM by address compilator fail

My project is based on microchip DM164142 demo board, with usb loader . It can't to flash Flash zone cells, I tried.
I can show any info on the display, same thing as UART.
by renew
11 Dec 2022 22:44
Forum: mikroC PRO for PIC General
Topic: Constants aloccation in ROM by address compilator fail
Replies: 20
Views: 3479

Re: Constants aloccation in ROM by address compilator fail

No, don't touch a Flash zone, I know it will work. I can't use a Flash, for this reason. Pic 1855 USB downloader on pic 18877 demo board is not able to write a Flash zone, so I am forced to use programm memory zone. I have an idea to use ASM{} commands to read constants from ROM Back to the roots 🤣 ...
by renew
11 Dec 2022 12:45
Forum: mikroC PRO for PIC General
Topic: Constants aloccation in ROM by address compilator fail
Replies: 20
Views: 3479

Re: Constants aloccation in ROM by address compilator fail

Hi.
Yes, I understand, but I locate 1 char in 1 14 bit cell, it is absolutely possible. See the hex file screenshot, 1 constant in 2 bytes.
You need to return my post number 8.
I am sure that the compiler precalculates variables wich calculation based on constants.
by renew
10 Dec 2022 19:27
Forum: mikroC PRO for PIC General
Topic: Constants aloccation in ROM by address compilator fail
Replies: 20
Views: 3479

Re: Constants aloccation in ROM by address compilator fail

Hi.
The main project is using PIC16F18877 processor 4k RAM 32k ROM
But for fast test I use a special developer board with colored OLED and PIC16F1939

I have set Optimisation parameter to Zero - it does not make effect, I changed first cell to 01 but device is working as it is 05.

Go to advanced search