News:

;) This forum is the property of Proton software developers

Main Menu

DS1307 Library

Started by AlbertoFS, Apr 18, 2023, 10:32 AM

Previous topic - Next topic

AlbertoFS

This old DS1307 code could be useful.
73's de EA3AGV

Dolci

Hi AlbertoFS,

error Line 61: Cannot locate include D:/MyIncFiles/GIE_SaveRestore.inc

AlbertoFS

The GIE_SaveRestore.inc file is included.
It is my computer path. Just delete D:/MyIncFiles
73's de EA3AGV

Dolci

after commenting the D;/MyIncFiles another error came.

ASM ERROR:Error[115] C:\.... Duplicate level ("FSR0H" or redefining symbol that cannot be redifined)

please be patient for senior citizen ;D

AlbertoFS

#4
Hi Dolci,
I see I forgot delete D:/MyIncFiles in the 3 libraries.
I compile the same files and I do not have this error. (FSR0H) My compiler is V3.7.5.5
There is only one definition in every library.
You must enable and compile one library only.
I run the files again in Proteus and work fine.
I will try to check again.
Alberto
73's de EA3AGV

Dolci

I'm using latest Positron. When I tried to 3.7.5.5 it comfiles without error

Tried the Proteus and works fine.

Thank you Alberto. Now I will try to understand how it works.

top204

#6
The problem lies with the line of code:

Dim FSR0 As FSR0L.Word        ' Combine FSR0L\H into a single 16-bit register

Which will make the SFRs FSR0 and FSR0H, and FSR0H is already in the assembler's headers for many devices, so the assembler will see multiples of it and give the error.

Whenever creating a 16-bit SFR from two 8-bit SFRs, give it a name that does not already exist in the assembler's header. For example:

Dim wFSR0 As FSR0L.Word        ' Combine FSR0L\H into a single 16-bit register

Then whenever the 16-bit SFR is required, use the name wFSR0.