Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

I really need help with 8051

Hi, community!

I'm trying to make 8051 communicate with any device using MOVX command. I made a circuit (MCS with 245.ms10) which consists of MCU, address latch (2 triggers 373N), data 3-state buffer (245N) and RAM. Here is the code I execute:

 

mov dptr, #0f055H
mov A, #0AAH
M1:
movx @dptr, A
jmp M1

 

It worked strange. Sometimes nothing happened, sometimes FFH was written into 000H address of RAM, sometimes 0AH was written into 005H address of RAM. It depended on digital simulation option (Ideal or Real) and pull up resistors presence (R1, R2). I tried to run simulation without RAM, but still didn't get the correct time diagram on DataOut and AddrOut buses! I connected oscilloscope to DIO bits and found out that it's something wrong with signal levels. I tried to increase delay between moments when WR and CS become L (I used two NOR elements), to decrease MCU frequency - nothing helped.

 

It never worked well until I deleted data buffer. I thought that the only change this buffer made was a 20ns delay between the moment when data appears on port0 and the moment when data appears on RAM pins. Plus 10ns for the 2AND element. But still ~WR signal on RAM supposed to become H 10ns earlier then buffer goes in Z state.

 

Question: why simulation runs well without buffer and doesn't work with 245?

Two files in attachment: circuit with 245 and without it.

 

I really need this buffer - it protects the MCU from genius users.

 

Any help is welcome!

Download All
0 Kudos
Message 1 of 3
(3,486 Views)

Start by making  your data pointer from mov dptr, #0f055H to mov dptr, #f055H.  Your initial code exceeds the 16 bit address bus limit.



Signature: Looking for a footprint, component, model? Might be here > http://ni.kittmaster.com
0 Kudos
Message 2 of 3
(3,442 Views)
Thanks for answering, but it's not the problem! 1. Without buffer this code run well. 2. When I delete the first zero in #0f055H, I get a message about an error in this line.
0 Kudos
Message 3 of 3
(3,412 Views)