Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/17/06 03:55
Read: times


 
#122400 - P89C668 iap pass, pass, then fail
hello, all. i'm an 8051'er by hobby, but that doens't mean i haven't read the "bible," the device's data sheet and the errata (plus an461). i've read all, multiple times, but apparently i'm having trouble comprehending something somewhere and i'm ready to focus my search via your help (or try a recommendation you may have). my first post here, little nervous, but here goes...

i'm using assembly to program device P89C668HBA via Flash Magic v 3.23.120. my inits routine loads SFR AUXR with 01h and SFR SUXR1 with 00h.

my code's first subroutine is to start looking at code mem location 30H for FFh. if byte eq FFh, load dptr with initial data storage location (0200h). if 30h neq FFh, then check 32h, then 34h, etc, for byte = FFh. once found, use the two previous bytes for dph and dpl.

next, log data via iap to this data storage location until loop is complete.

once loop is complete and data is logged, start looking for FFh at code 30h and, when found, store dptr via iap there. this dptr will be the next location for data storage once device power is cycled. that way i don't lose any data until i extract data and erase device blocks via Flash Magic.

my results:
inital run after programming - no problems. data set #1 is logged starting at code mem 0200h and when finished, dptr is stored at code mem 30h, 31h.
2nd run after programming - no problems. data set #2 is logged after/behind initial data set #1 and dptr is stored at code mem 32h, 33h.
3rd run after programming - iap write error. the correct dptr is loaded but the first data point of data set #3 is never written...code jumps to my iap write error routine.

any ideas what might causing this iap write error? i've tried using a different P89C668HBA but get the same results. i'm sure it's an error/omission in my code somewhere, but i'm stumped. any help would be apprectiated. (if you really like torture, i can provide my semi-commented .asm code or the hex file.) i'm looking forward to this "professional forum" (ref: Forum Rules) lending a helping hand to this hobbyist.

thank you for your time,

-chris

List of 12 messages in thread
TopicAuthorDate
P89C668 iap pass, pass, then fail            01/01/70 00:00      
   Is it address sensitive?            01/01/70 00:00      
   You do know, I hope            01/01/70 00:00      
      iap and data storage            01/01/70 00:00      
         no, not that            01/01/70 00:00      
            so store to xdata first...            01/01/70 00:00      
               If you heard what I thought I said ...            01/01/70 00:00      
                  clarification            01/01/70 00:00      
   real data            01/01/70 00:00      
      incremental flash dumps            01/01/70 00:00      
         And the error is...            01/01/70 00:00      
            success!            01/01/70 00:00      

Back to Subject List