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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/18/05 06:27
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#99617 - Timings
Responding to: ???'s previous message
hi,

I would suggest Little Joe to replace next code:
   movx  @dptr,a                  ;store byte to destination
   movx  a,@dptr                  ;readback byte from RAM
with this:
   movx  @dptr,a                  ;store byte to destination
   clr   a
   movc  a,@a+dptr                ;readback byte from RAM

This comes from the fact that data memory access (via MOVX) and program memory fetch have different timings.

MOVX to external memory uses /RD pin and
its "/RD low to valid data in" tRLDV is
5*tCLCL-90 (so we have 5*1000/24-90 ~= 118ns)

External program fetch uses /PSEN pin and
its "/PSEN low to valid instruction in" tPLIV is
3*tCLCL-45 (so we have 3*1000/24-45 = 80ns)

If we remember about two LS gates for /PSEN and /RD so we must add its propagation delay as well. For typical LS gate this time is about 9..15ns. We should use worst conditions so for two gates this time is 15+15=30ns. Now we have:
MOVX requires 118-30=88ns RAM
fetch requires 80-30=50ns RAM

Now the question for Jan: do we assume that RAM select time via /CS is fast enough in your puzzle? If not then in original program:
test with MOVX is passed but external fetches fail and provide corrupt data. As result MCU executes rubbish and there are may be instructions which clear P1 so both LEDs are lighted.
To avoid this behaviour test routine should be modifyed as I have already shown (with read-back via MOVC).

Regards,
Oleg

List of 40 messages in thread
TopicAuthorDate
week puzzle III            01/01/70 00:00      
   Not getting into details...            01/01/70 00:00      
      you do            01/01/70 00:00      
      see this            01/01/70 00:00      
   Well. . .            01/01/70 00:00      
   let me try            01/01/70 00:00      
      eh?            01/01/70 00:00      
   I`m confused with A15            01/01/70 00:00      
      Whooops            01/01/70 00:00      
         and I thought that was "the puzzle"            01/01/70 00:00      
            sorry            01/01/70 00:00      
         and I thought that was "the puzzle"            01/01/70 00:00      
         another trouble            01/01/70 00:00      
            And what's wrong with /CS?            01/01/70 00:00      
               sorry, my mistake            01/01/70 00:00      
   what does not happend?            01/01/70 00:00      
      And...?            01/01/70 00:00      
   explain            01/01/70 00:00      
      And...?            01/01/70 00:00      
         Answer for puzzle            01/01/70 00:00      
            I doubt?            01/01/70 00:00      
               I doubt            01/01/70 00:00      
                  I agree here            01/01/70 00:00      
                     I wonder            01/01/70 00:00      
                        autodetect            01/01/70 00:00      
               /PSEN            01/01/70 00:00      
            there is also flaw in the reasoning            01/01/70 00:00      
   Lost inverter            01/01/70 00:00      
      errta            01/01/70 00:00      
   Questions            01/01/70 00:00      
      answers to questions            01/01/70 00:00      
   Timings            01/01/70 00:00      
      Ex[plain A bit more please            01/01/70 00:00      
         intel app note says            01/01/70 00:00      
         I do            01/01/70 00:00      
         re:EA            01/01/70 00:00      
            yes no doubt about it            01/01/70 00:00      
   reset device            01/01/70 00:00      
      three legged            01/01/70 00:00      
   The solution            01/01/70 00:00      

Back to Subject List