PDA

View Full Version : How to use DT_INT with 12F683



Dick Ivers
- 11th February 2012, 16:54
I think this is an old issue that's been discussed before but I can't seem to re-create the solution.

Using device 12F683

When I INCLUDE "DT_INTS_14.bas" the program compiles but there is an error message saying "No access to RAM at $70, change to $20 SYSTEM" . I've seen this before, and I thought the answer was to comment out $70 and un-comment $20 . When I do this,and at the same time change the name of the INCLUDE to "DT_INTS_14 test.bas, the compiler cannot open the INCLUDE. What is wrong?

Darrel Taylor
- 11th February 2012, 18:37
Using $20 is right, and you'll need wsave1 at $A0.
But I don't get the part about changing the name of the include.

Dick Ivers
- 11th February 2012, 19:41
Darrell,
Yes, you are right of course and the mods are working.
I thought it would be best to save the modified file under a different name for future use with the same chip. That seems to be a bad idea, or was done incorrectly. In any case, thanks.
Dick

Darrel Taylor
- 11th February 2012, 20:24
Either you have a very old version of DT_INTS-14, or you're doing it in the wrong place.
You shouldn't modify the include file.

Make sure you have the latest version.
http://www.darreltaylor.com/DT_INTS-14/downloads.htm

added by Archangel 08/26/2015 http://web.archive.org/web/20130518051309/http://www.darreltaylor.com/DT_INTS-14/downloads.htm


Then in your program, copy the variables from the include and uncomment the wsaves you need for that program.

;-- Place a copy of these variables in your Main program -------------------
;-- The compiler will tell you which lines to un-comment --
;-- Do Not un-comment these lines in the include --
;---------------------------------------------------------------------------
;wsave VAR BYTE $20 SYSTEM ' location for W if in bank0
;wsave VAR BYTE $70 SYSTEM ' alternate save location for W
' if using $70, comment wsave1-3
' --- IF any of these three lines cause an error ?? ------------------------
' Comment them out to fix the problem ----
' -- Which variables are needed, depends on the Chip you are using --
;wsave1 VAR BYTE $A0 SYSTEM ' location for W if in bank1
;wsave2 VAR BYTE $120 SYSTEM ' location for W if in bank2
;wsave3 VAR BYTE $1A0 SYSTEM ' location for W if in bank3
' --------------------------------------------------------------------------

Dick Ivers
- 11th February 2012, 21:09
Darrell,
I did as you suggested. It makes sense as a way to keep track of the variables in different programs. However, I now get this message:
"Wrong version of ReEnterPBP.bas -Ver 3.4 or higher req'd"
The file I downloaded is dated August 13, 2010

Dick

Darrel Taylor
- 11th February 2012, 22:49
That version of ReEnterPBP is in the download.

Extract both files in the .zip to your PBP folder.
And make sure you don't have a ReEnterPBP.bas or DT_INTS-14.bas file in your project folder.

Dick Ivers
- 12th February 2012, 00:01
Darrell,

You are right again. I forgot to delete the old ReEnterPBP.bas from the project file. Yes, I did delete the old DT_INTS-14.bas file.
It all works now.
Dick