Exact match. Not showing close matches.
'[PIC] gyro compass.asm:882: warning: Address excee'
I have been attempting to build a gyro compass for use with
simulators from Mike Powell's book Building Simulated Aircraft
Instruments. The sample chapter with the code is available here -->
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
org 0x2100 ;this is the start of EEPROM area
de 0 <-- Here is the problem and so down the page...
de 0 ;position in frame data transfer
de "DG001 STPR V1.000"
I have googled this problem to little avail, if anyone could give me any
pointers it would be great.
|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:
de 01, 00 ; Default light meter scaling factor of 1
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
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
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?
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
> Microchip seems to bury the information on initializing eeprom
Look up de in MPLAB's MPASM Assembler Help
> 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).
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
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
- New search...