Searching \ for '[PIC] gyro compass.asm:882: warning: Address excee' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/languages.htm?key=asm
Search entire site for: 'gyro compass.asm:882: warning: Address excee'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] gyro compass.asm:882: warning: Address excee'
2009\05\23@213937 by Dave

flavicon
face
Hi all,
       I have been attempting to build a gyro compass for use with
aircraft
simulators from Mike Powell's book Building Simulated Aircraft
Instruments. The sample chapter with the code is available here -->
mikesflightdeck.com/Downloads/BSAI%20Sample%20Chapter.pdf
He has written his code for the PIC 16F628, I have only been able to
obtain the 16F628A which I believe to be operationally identical to it's
predecessor. The problems I am having (after removing all my typos and
errors), is the warning "gyro_compass.asm:882: warning: Address exceeds
maximum range for this processor." now the EEPROM address starts at
0x1200 for the 16F628A, so I know that isn't the problem. The problem is
when Mike puts the following lines in after the org 0x1200 line as
below:

org     0x2100          ;this is the start of EEPROM area
de     0  <-- Here is the problem and so down the page...
de     0
de     0
de     0
de     0
de     0
de     0
de     0
de     0               ;position in frame data transfer
de     "DG001 STPR V1.000"
end

I have googled this problem to little avail, if anyone could give me any
pointers it would be great.

Cheers,
       Mechdave

2009\05\23@233920 by Harold Hallikainen

face
flavicon
face
What address are you using in the org? In one place, I see 0x1200, but in
another, I see 0x2100. Microchip seems to bury the information on
initializing eeprom, but I did find in doc 33014g a reference to 0x2100.
>From that document:

org H’2100’ ; Initialize EEPROM Data
de "My Program, v1.0", 0


Here's some code I wrote for the 16f628:

       org        0x2100

       de        01, 00                        ; Default light meter scaling factor of 1

 ifdef xenon

       de        d'3'                        ; default time for custom cure 1

       de        d'5'                        ; default time for custom cure 2

       de        d'7'                        ; default time for custom cure 3

       de        d'9'                        ; default time for custom cure 4

 else

       de        d'3'                        ; minimum time for custom cure 1

       de        d'11'                        ; minimum time for custom cure 2

       de        d'15'                        ; minimum time for custom cure 3

       de        d'25'                        ; minimum time for custom cure 4

 endif

       de        low(-d'3600'),high(-d'3600'),0, RevCodeMonth, RevCodeDay ; Runtime
initialized at month/day of rev (reset during cal)

       de        0,0                        ; Lamp cycle count initialized at zero




So.... is it possible you used 0x1200 instead of 0x2100?


Good luck!

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2009\05\24@010439 by Jinx

face picon face
> Microchip seems to bury the information on initializing eeprom

Look up de in MPLAB's MPASM Assembler Help

2009\05\24@084621 by olin piclist

face picon face
Dave wrote:
> gyro_compass.asm:882: warning:
> Address exceeds maximum range for this processor.

It's only a warning.  MPASM has lots of misplaced warnings for things that
are perfectly legitimate, although I don't remember this one specifically.
Maybe that's because you used the archaic ORG instead of CODE.

Try doing it right and using CODE, then you have the opportunity to give the
section a meaningful name while you're at it.  If that doesn't work, you can
disable the warning.  You should probably also double check that the EEPROM
region is correctly defined in the linker file (although that has nothing to
do with the warning).

{Quote hidden}

Something doesn't smell right here.  How are you making sure that the EEPROM
initial values defined above line up to the known offsets?  I don't see any
labels, but it's probably important that the string "DG001..." start at byte
9 of the EEPROM.  Either there is a lot you're not telling us, or this is
really bad code and you need to go back and read the MPASM/MPLIB/MPLINK
manual again.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...