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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/24/12 04:16
Read: times


 
#188428 - .db instr does not work like before with movx A,@dptr
Clearly I'm missing something here. Can't see it, Maybe someone knows what's going on.
I've been program for years using intels 8031 and the Atmel AT89C51 with .db and movx A,@dptr instructions and no problems.
Now with the 89S52 and the AT89LP6440, I can't get anything to work with .db statements.

Here's a program that would have worked with the 89C51 but won't with the 89S52 or 89LP6440:
.org H'00
ljmp start

.org H'20
.db 1,2,3,4,5,6,7,8, 1,2,3,4,5,6,7,8 (16 bytes)

start: mov dptr,#H'20 (89C51's internal ram 0..FF)
mov R7,#H'10 (A51 compiler uses H'10)
loop: movx A,@dptr
mov P1,A (with leds on P1 and a delay, I could see the bytes)
inc dptr
djnz R7,loop
done: sjmp *
I've read everything I could find on this, every single code example with the AT89LP6440 from atmels web site and the internet, plus everything about the different mem types from atmels 89LP6440.pdf file. They just don't mention this problem.
I want to put a 256 byte sine table in flash, transfer it to Eram, then update that waveform live with sliders. I worked with the 6440 dac circuit for a week without any output. I finally put a DAC0800 at P1. It works fine. I still have no idea if anyone in this world has the 6440 dac working.







List of 17 messages in thread
TopicAuthorDate
.db instr does not work like before with movx A,@dptr            01/01/70 00:00      
   Brain Fade ?            01/01/70 00:00      
      memory access            01/01/70 00:00      
         Did you ever try the Maxim/Dallas DS89C4x0?            01/01/70 00:00      
   Handle the dptr with care...            01/01/70 00:00      
      Dallas, Dptr, and DB            01/01/70 00:00      
         not really            01/01/70 00:00      
            Perhaps what he means is ...             01/01/70 00:00      
               Make no mistake...             01/01/70 00:00      
                  and also the XMEGA            01/01/70 00:00      
                     XMEGA ADC            01/01/70 00:00      
                        I agree...            01/01/70 00:00      
               those samples that Andy and others were expecting             01/01/70 00:00      
            Is it 2007 already??            01/01/70 00:00      
               That's why I refer to them as MAXIM/DALLAS             01/01/70 00:00      
                  Part Numbers ?            01/01/70 00:00      
                     None in particular ...             01/01/70 00:00      

Back to Subject List