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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
09/23/12 22:16
Read: 1350 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
.db instr does not work like before with movx A,@dptr      Rick Gebhardt      09/23/12 22:16      
   Brain Fade ?      Jim Granville      09/23/12 22:57      
      memory access      Rick Gebhardt      09/24/12 01:30      
         Did you ever try the Maxim/Dallas DS89C4x0?      Richard Erlacher      09/24/12 10:18      
   Handle the dptr with care...      Kai Klaas      09/24/12 10:38      
      Dallas, Dptr, and DB      Rick Gebhardt      09/24/12 21:36      
         not really      Erik Malund      09/25/12 08:50      
            Perhaps what he means is ...       Richard Erlacher      09/25/12 11:28      
               Make no mistake...       Kai Klaas      09/25/12 12:44      
                  and also the XMEGA      Jim Granville      09/25/12 23:36      
                     XMEGA ADC      Maarten Brock      09/26/12 03:00      
                        I agree...      Kai Klaas      09/26/12 17:18      
               those samples that Andy and others were expecting       Andy Neil      09/25/12 15:13      
            Is it 2007 already??      Andy Neil      09/25/12 15:17      
               That's why I refer to them as MAXIM/DALLAS       Richard Erlacher      09/25/12 21:52      
                  Part Numbers ?      Jim Granville      09/25/12 23:29      
                     None in particular ...       Richard Erlacher      09/26/12 16:01      

Back to Subject List