PR 12 error code with Hi tech pro

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

PR 12 error code with Hi tech pro

Postby inn nabil » Thu Sep 25, 2014 6:49 am

hi, my project cannot be compiled in hi tech pro, but it can be compiled in hi tech lite. it gives the error "\i2c.c; 115.8 undefined identifier "RW". when i'd redefined the RW in i2c.c, my project can be compiled, but it doesnt work, the lcd is blank, and i need to use the hi tech pro for my project.
inn nabil
Freshie
 
Posts: 4
Joined: Thu Sep 25, 2014 6:35 am

Re: PR 12 error code with Hi tech pro

Postby ober » Thu Sep 25, 2014 8:06 am

What is the version of HI-TECH Pro and HI-TECH Lite? The sample code is being developed under HI-TECH Lite version v9.80.

You can verify whether the hardware is software is causing problem on the project. Load the hex code that you download from the DIY project page into the PR12. If the hardware works with the original hex code, it means something wrong with the new hex code that you compiled. If the hardware does not work, it means there is something wrong at hardware and you need to troubleshoot the hardware.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PR 12 error code with Hi tech pro

Postby inn nabil » Thu Sep 25, 2014 9:15 am

it is the same code, but compiled with different ver. of hi tech compiler.
the one that works is ver. "PRO for PIC10/12/16 MCU family (Lite) V9.60PL5" (run w/o OCG)
the one that gives error code is ver. "Compiler for PIC10/12/16 MCUs (PRO Mode) V9.83" (run with OCG)
inn nabil
Freshie
 
Posts: 4
Joined: Thu Sep 25, 2014 6:35 am

Re: PR 12 error code with Hi tech pro

Postby ober » Thu Sep 25, 2014 3:31 pm

It is out of our control that compiler change some of the registers name and cause error between version. That is why we provide the compiler version and compiler installer. Please use the correct version of compiler which is V9.80 in lite mode.

Also, as suggested, please verify the hardware with the original hex code from the product page.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PR 12 error code with Hi tech pro

Postby inn nabil » Thu Sep 25, 2014 6:28 pm

the hardware works fine after compiled with hi tech lite, the lcd can display time and date.
but after i added code for 10 more pages to display on the lcd, the compiler give this error:
{
Copyright (C) 1984-2009 HI-TECH SOFTWARE
(1273) Omniscient Code Generation not available in Lite mode (warning)
Error [1347] ; 0. can't find 0x869 words (0x869 withtotal) for psect "text193" in segment "CODE" (largest unused contiguous range 0x800)
},
after that,i wrote the code to only diplay 6 pages only, and compiled it, and it shows my program memory watch used is 7089/8192 and the lcd can displays the 6 pages.
i suspect that the code is out of program memory. then, i upgrade the hi tech lite to hi tech pro with omniscient code generation to minimize the memory used by the code/compiler. i compiled the 6 pages code with hi tech pro and got this error:
{
....\i2c.c; 115.8 undefined identifier "RW"
}
then, i've redefined the RW and compiled it and it shows my program memory watch used is 3089/8192 with omniscient code generation. but after i downloaded the hex code to the hardware, it doesn't work and display blank lcd with square pixels.

do i have to get support from the hi tech guys to solve the compiler problem or is there any other way to solve this?
inn nabil
Freshie
 
Posts: 4
Joined: Thu Sep 25, 2014 6:35 am

Re: PR 12 error code with Hi tech pro

Postby ober » Thu Sep 25, 2014 10:37 pm

Woh! 10 pages of message for LCD? Or 10 pages of code?

When you upgrade from lite mode to PRO mode, the version also upgraded to v9.83 instead of v9.80. I do not know any other differences besides the RW for I2C, but I would suggest to compile the original code (without adding any extra pages) with the v9.83 PRO version and start debugging from there, slowly add code and verify from part to part.

Of course you can also get support from HITECH as you have obtained the PRO version.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PR 12 error code with Hi tech pro

Postby inn nabil » Fri Sep 26, 2014 7:07 am

the 10 pages are the display on the lcd (10 pages x 16 x 2 characters). my project need to display various readings,states,seting n etc. on the lcd.
i did use the original PR 12 code to test and slowly add the display code one by one, page 1,page 2,page 3 until page 6, and the project runs ok in the hardware. but after i add page 7, it gives the error code in hi tech lite.
{
Error [1347] ; 0. can't find 0x869 words (0x869 withtotal) for psect "text193" in segment "CODE" (largest unused contiguous range 0x800)
}
but with the same code (6 page display), cannot be compiled in hi tech pro, with the RW register in i2c.c is not initialize.
after i've redefined the RW in i2c.c, it can be compiled and produce the hex code, but the lcd show blank page after i put it in the hardware.
are the register code different between the version of hi tech pro and hi tech lite?
inn nabil
Freshie
 
Posts: 4
Joined: Thu Sep 25, 2014 6:35 am

Re: PR 12 error code with Hi tech pro

Postby ober » Fri Sep 26, 2014 9:16 am

Since you are sure you need to use the PRO version, start using it with the original PR12 code, troubleshoot and debug from the beginning with PRO. No point to use the lite version anymore. Modify the small code program is easier to solve problem.

If the register name change like RW, the compiler will prompt error, if there is no error means there is no register name changes. The message you get when you add pages until 6 is to indicate the hex code compiled is more than 8K (program memory size of PIC16F876A) and therefore it will not be generated. Using PRO version offers high optimization of C code, reducing the code size and also execution time. But as I mentioned earlier, your PRO and LITE are in different version, and HI-TECH changes the some of the register name between version, which I do not why they do that.

I suspect the delay in LCD function is causing LCD initialization to fail and no LCD display. Try capture a few pictures of LCD after you load program to show us.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 37 guests