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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/25/06 23:04
Read: times


 
#115033 - address/data wiring is still wrong
Responding to: ???'s previous message
Unless I'm missing sometihng ... you've missed the point of the latch in the address/data paths on P0. There's a signal called ALE, which is ADDRESS LATCH ENABLE. You're supposed to connect that to the "GATE" or Latch Enable (LE) signal on the '373 or '573 latch, whichever you choose, and the "Q" outputs from the latch will contain the ADDRESSES, hence the name, "address latch."

Now, the signals coming from P0 are addresses while ALE is HIGH, and data when it's LOW, which is most of the time.

Therefore, the bus that you've drawn, and labelled AD[0..7] should be relabelled D[0..7] and the bus that you've drawn and labelled D[0..7] should be A[0..7]. I think that will help you to understand what's going on in this circuit, assuming you mean it to be a memory-mapped I/O arrangement. If you don't intend that, then you have a lot of revision work to do.

Now, I'm working from your schematic, so I am assuming all your ADC signals not marked as active-low are positive-going. If that's not the case, then you'll have to operate on the logic accordingly.

It can be made to work with the divide-by two-configured flipflop in the ALE path to the ADC, by writing twice to the ADC. However, it will not work properly in any case, so long as you connect ALE and CLOCK together. START is intended, IIRC, to be the WRITE ENABLE function on this device, and you must not write it during a conversion. Hence, you must generate its start-conversion command by writing to it at a specific address, which latches its internal address multiplexer to that channel, steering the input to the converter, of which there is only one, and, somewhat prior to generating the EOC, (END OF CONVERSION) strobe, which you can poll if you have nothing else for the 8031 to do, until it becomes "true" or you can use that as an interrupt. If you leave the Output Enable floating, you'll never be able to read the converted value. Therefore, you must invert (e.g. with 74HC04) the RD strobe, unless the symbol is wrong, in which case you may not need to do that, in order to gate the outputs ON.

As for generating a proper START and ALE signal, I suggest you AND the inverted WR signal with A15 and drive both ALE and START with that, (use whatever address you like, but ensure that it doesn't affect anything else) and assume that the device is written at 0x8000 through 0x8007. Now connect A2, A1, and A0 directly from the address latch to the ADC. You can drive CLOCK with ALE as you've shown, but don't try to drive ALE and START with that same signal.

I don't know what that flipflop on the ALE line was intended to do, but I suspect it was intended to lengthen the ALE to the ADC. Writing twice would have made it work, OK, but not in the configuration shown. You are operating slowly enough that you don't need that flipflop.

Keep it simple, is the watchword. Since there's no external RAM and no other external I/O, you don't need a decoder, aside from the simple logic I've mentioned. You read the ADC at any address you like, but probably should not do so at the same address range, 0x800n through 0xFFFnas that at which you write it. You must latch the ADC's internal MUX address when you initiate a conversion, but I don't know whether you have to latch the address on a read. I'll let you look that up in the datasheet.

I hope this helps ... I'm getting confused ... It's been a long time since I used one of these ADC's.

RE



List of 61 messages in thread
TopicAuthorDate
Interfacing A/D with 8031            01/01/70 00:00      
   what does the read the ADC code look lik            01/01/70 00:00      
      planning ..            01/01/70 00:00      
         I hope you mean flash/eprom            01/01/70 00:00      
            Thank you            01/01/70 00:00      
               well, i don't either            01/01/70 00:00      
                  Thanks Erik ..            01/01/70 00:00      
   There might be some problems            01/01/70 00:00      
      Some time ..            01/01/70 00:00      
      3 micro?            01/01/70 00:00      
         Yep ... you're right!            01/01/70 00:00      
      Explain a few things ...            01/01/70 00:00      
         updated but not finished schematic            01/01/70 00:00      
            Interrupt            01/01/70 00:00      
            address/data wiring is still wrong            01/01/70 00:00      
   Keep you updated ..            01/01/70 00:00      
      just a recomme3ndation            01/01/70 00:00      
   the ALE f/f is wrong, use MMIO            01/01/70 00:00      
      new chip ..            01/01/70 00:00      
         a lot            01/01/70 00:00      
   a few mins ..            01/01/70 00:00      
      if you are going to use the 87            01/01/70 00:00      
         i will            01/01/70 00:00      
            you will not need the 373            01/01/70 00:00      
               Different ...            01/01/70 00:00      
                  get rid of that @#&$# ALE F/F            01/01/70 00:00      
                     I apologize ...            01/01/70 00:00      
                        a "fun idea"            01/01/70 00:00      
                           Much thanx ...            01/01/70 00:00      
                              This could have been simpler            01/01/70 00:00      
                                 Thats what i thought!            01/01/70 00:00      
                           updated schematic            01/01/70 00:00      
                              you forgot to attach the ALE to the 7474            01/01/70 00:00      
                                 ALE shouldnt exist ....            01/01/70 00:00      
                                    Yup, that's right ...            01/01/70 00:00      
                                 oh ...            01/01/70 00:00      
                                    FINAL PLANS ...            01/01/70 00:00      
                                       Re: FINAL PLANS            01/01/70 00:00      
                                          Thank you            01/01/70 00:00      
                                          8051 pin configuration            01/01/70 00:00      
                                             a) it is impossible, b) why do you not f            01/01/70 00:00      
                                       just one comment            01/01/70 00:00      
                                          Liverpool USA?            01/01/70 00:00      
                                             New York?            01/01/70 00:00      
                                                Morrisville = Liverpool?            01/01/70 00:00      
                                          I live in ...            01/01/70 00:00      
   one more thought            01/01/70 00:00      
      updated schematic            01/01/70 00:00      
         get rid of the RC reset, use a superviso            01/01/70 00:00      
            found out ..            01/01/70 00:00      
               no, 666kHz            01/01/70 00:00      
                  WOW ...            01/01/70 00:00      
                     if you were serious about this ...            01/01/70 00:00      
                        a $2 LPC3xx would do nicely            01/01/70 00:00      
                           Definitly..            01/01/70 00:00      
                           That's not quite what I said, Erik            01/01/70 00:00      
                              huge problem ...            01/01/70 00:00      
                                 I see how this is confusing            01/01/70 00:00      
                                 Erik's right ... it's a poor spec'            01/01/70 00:00      
                                    knowledge            01/01/70 00:00      
                                       First lesson            01/01/70 00:00      

Back to Subject List