PIC16F19176 EEprom Error

49 views
Skip to first unread message

flyway38

unread,
Nov 27, 2022, 7:19:18 AM11/27/22
to jallib
Hello to all,

Am starting this new project based on PIC16F19176.
Am including Pic_Data_Eeprom lib but compiler gives me this error:

Compilation started at :27/11/2022 12:06:11
jal jalv25r6 (compiled Oct 29 2021)
generating p-code
[Error] (lib/pic_data_eeprom.jal) [Line 194]  "_eeprom_data" not defined
[Error] (lib/pic_data_eeprom.jal) [Line 194]  ')' expected (got '_eeprom_data')
[Error] (lib/pic_data_eeprom.jal) [Line 194]  '=' expected (got ')')
[Error] (lib/pic_data_eeprom.jal) [Line 194]  'end' expected (got ')')
[Error] (lib/pic_data_eeprom.jal) [Line 194]  {procedure starts at C:\JALLIB~1\lib/pic_data_eeprom.jal:190}
[Error] (lib/pic_data_eeprom.jal) [Line 194]  unexpected token: ")"
Compiler CommandLine:  C:\JALLIB~1\compiler\jalv2.exe "C:\Users\Filipe Santos\Desktop\NotasTecnicas\_Projecto - ParquimetrosTelemetricos\Desenvolvimento\PIC\16f19176_serial_hardware.jal" -s "C:\JALLIB~1\lib" -no-variable-reuse  

Errors :6       Warnings :0

Any help here will be very appreciated.
Thank you.

Greetings,
Filipe Santos.

flyway38

unread,
Nov 27, 2022, 7:25:02 AM11/27/22
to jallib
It seems none of these definitions (in Pic_Data_Eeprom Lib) are defined in Pic's Lib file:
-- EEPROM data byte.
if defined(EEDATL) then
   alias _EEPROM_DATA is EEDATL
elsif defined(EEDAT) then
   alias _EEPROM_DATA is EEDAT
elsif defined(EEDATA) then
   alias _EEPROM_DATA is EEDATA
elsif defined(NVMDAT) then
   alias _EEPROM_DATA is NVMDAT
end if


In Pic's Lib have found this definitions:
-- ------------------------------------------------
var volatile byte   NVMDATL                   at { 0x81C }
var volatile bit    NVMDATL_NVMDAT0           at NVMDATL : 0
var volatile bit    NVMDATL_NVMDAT1           at NVMDATL : 1
var volatile bit    NVMDATL_NVMDAT2           at NVMDATL : 2
var volatile bit    NVMDATL_NVMDAT3           at NVMDATL : 3
var volatile bit    NVMDATL_NVMDAT4           at NVMDATL : 4
var volatile bit    NVMDATL_NVMDAT5           at NVMDATL : 5
var volatile bit    NVMDATL_NVMDAT6           at NVMDATL : 6
var volatile bit    NVMDATL_NVMDAT7           at NVMDATL : 7
-- ------------------------------------------------
var volatile byte   NVMDATH                   at { 0x81D }
var volatile bit    NVMDATH_NVMDAT8           at NVMDATH : 0
var volatile bit    NVMDATH_NVMDAT9           at NVMDATH : 1
var volatile bit    NVMDATH_NVMDAT10          at NVMDATH : 2
var volatile bit    NVMDATH_NVMDAT11          at NVMDATH : 3
var volatile bit    NVMDATH_NVMDAT12          at NVMDATH : 4
var volatile bit    NVMDATH_NVMDAT13          at NVMDATH : 5
-- ------------------------------------------------

Not sure how to proceed with corrections here.
Any ideas will be great.
Thank you.

FS

Rob CJ

unread,
Nov 27, 2022, 7:35:30 AM11/27/22
to jal...@googlegroups.com
Hi Filip,

Correct. This PIC you are using has different register and also - if I am right - a way to write EEPROM data in words instead of bytes.

So the currently library needs an update to support your chip.

At this moment I am working on trying to solve compiler issue#25 but partly succesful so far. If I get stuck (and it seems I currently am) I can give it a try to update the EEPROM library. Of course you can also give it a try yourself.

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens flyway38 <fsfo...@gmail.com>
Verzonden: zondag 27 november 2022 13:25
Aan: jallib <jal...@googlegroups.com>
Onderwerp: [jallib] Re: PIC16F19176 EEprom Error
 
--
You received this message because you are subscribed to the Google Groups "jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallib+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/29d685d9-fda5-4afa-b1ae-b7ceadf17b8en%40googlegroups.com.

flyway38

unread,
Nov 27, 2022, 7:59:56 AM11/27/22
to jallib
Hi Rob,

Thank you for your feedback.
Its ok, can wait.
To try to solve it myself will need some hints.. In this case will keep this thread updated until final solution.
But if you get your hands on this issue, just let me know.
Thank you very much.

Cheers,
Filipe Santos.

Rob CJ

unread,
Nov 27, 2022, 10:27:23 AM11/27/22
to jallib
Hi Filipe,

I will update the library. I will let you know when it is available.

Kind regards,

Rob


Verzonden: zondag 27 november 2022 13:59
Aan: jallib <jal...@googlegroups.com>
Onderwerp: Re: [jallib] Re: PIC16F19176 EEprom Error
 

Rob CJ

unread,
Nov 27, 2022, 11:02:12 AM11/27/22
to jallib
Hi Filipe,

The update was quite simple. Attached the new library and a sample program. 

I tested it and it works OK.

The updated library and new sample file will be in the next bee-package.

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens Rob CJ <rob...@hotmail.com>
Verzonden: zondag 27 november 2022 16:27
16f19176_data_eeprom.jal
pic_data_eeprom.jal

flyway38

unread,
Nov 27, 2022, 2:52:08 PM11/27/22
to jallib
Hi Rob,

Thank you very much.
Just one question...
Why these new lines;
OSCFRQ_HFFRQ = 0b110                     -- Fosc 32 -> 32 MHz
and
pragma eedata 129,130,131,132            -- initial contents
Only to understand it.
Thank you once again.

Cheers,
Filipe Santos.

Rob CJ

unread,
Nov 28, 2022, 2:10:13 AM11/28/22
to jal...@googlegroups.com
Hi Filipe,

The first line is to set the internal oscillator at 32 MHz.

The second line is to set some default values in the Eeprom before the program begins just to test if they are overwritten by the programs.

Met vriendelijke groet,
Rob Jansen

From: jal...@googlegroups.com <jal...@googlegroups.com> on behalf of flyway38 <fsfo...@gmail.com>
Sent: Sunday, November 27, 2022 8:52:08 PM
To: jallib <jal...@googlegroups.com>
Subject: Re: [jallib] Re: PIC16F19176 EEprom Error
 

flyway38

unread,
Nov 28, 2022, 6:20:01 AM11/28/22
to jallib
Hello Rob,

Thanks for your information.
Still about first line, one last question.
What about this code;
OSCCON2 = 0x00                     -- 32 MHz and no division
Was using it. Should I delete it?

Cheers,
FS

Rob CJ

unread,
Nov 28, 2022, 12:55:00 PM11/28/22
to jallib
Hi Filipe,

I think there are various ways to set the clock (although not always very clear) and in this setup I used:

HFINT32 = 0x0                     -- HFINTOSC with OSCFRQ= 32 MHz and CDIV = 1:1

I am not sure if OSCCON2 has any impact but you can leave it out.

Kind regards,

Rob


Verzonden: maandag 28 november 2022 12:20

flyway38

unread,
Nov 28, 2022, 1:28:33 PM11/28/22
to jallib
Hey Rob,

Yes, it seems there some cloudy weather over that definition :D.
Thank anyways.

Cheers,
FS
Reply all
Reply to author
Forward
0 new messages