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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/19/06 12:33
Read: times


 
#120572 - Well I'm confused!
Responding to: ???'s previous message

Rishab, you have not been able to describe your hardware connections to us. All we know is that P0..7 to the 8155 AD0..7 are reversed! What about ALE, *RD *WR,IO/M and *CE? You have mentioned that you have used P2.7 & 6 but not told us exactly how they are connected. If we assume you have P2.7 connected to *CE and P2.6 connected to IO/M then the addresses would work as follows:

0000h-3fffh ram
4000h-7fffh io

One would most likely use the 8155 as a multiplexed bus device as the 8051 has a compatible bus. You could control ALE on the 8155 yourself, then you would have to output the address on P0, then toggle ALE, then read or write the data whilst controlling *RD & *WR via your code. This would be the harder way to do it unless you have a compelling reason to do so.

In your code the line
mov dptr,#0c0000h ;address of control word

Has one too many '0's! As well as the wrong address.

The control word to make PORTC output I think should be 30h as non bit reversed it is 0ch. This would be a write to address 4000h

To write to PORTC register the address would be 40C0h.

Use MOVX rather than MOVC. You cannot write using MOVC!
For example:

RIOT_CMD_STATUS equ 4000h
RIOT_PORTC equ 40C0h

mov dptr,#RIOT_CMD_STATUS
mov a,#30h ;cmd for PORTC as output (bits are reversed)
movx @dptr,a ;write to RIOT

mov dptr,#RIOT_PORTC
mov a,#0
movx @dptr,a


You are not using a compiler, you are using an assembler. There are fundamental differences. Whilst we understand what you mean, it is always wise to use the correct terms so everyone understands.


Hopefully this clear things up a little.









List of 98 messages in thread
TopicAuthorDate
interfacing 8155            01/01/70 00:00      
   First step            01/01/70 00:00      
      what IS 8155?            01/01/70 00:00      
         a RIOT            01/01/70 00:00      
            I just had a look            01/01/70 00:00      
               It is older,            01/01/70 00:00      
               it can SEEM to you all you like, but ...            01/01/70 00:00      
                  It is NMOS            01/01/70 00:00      
                     Yes, it's NMOS, but that's no problem            01/01/70 00:00      
                     Also in CMOS            01/01/70 00:00      
                     Waferscale PSM, uPSD            01/01/70 00:00      
                  Proud to be a dummy from time to time...            01/01/70 00:00      
                     \'help\' and \'help\'            01/01/70 00:00      
                     Sadly, one can't tell the difference            01/01/70 00:00      
                        Old man's rant!            01/01/70 00:00      
                           not all, but most            01/01/70 00:00      
                           True            01/01/70 00:00      
                        I can't sit back anymore            01/01/70 00:00      
                           advice that do not coddle you you should try to ge            01/01/70 00:00      
                           Every Enginner            01/01/70 00:00      
                           It's the same old thing ...            01/01/70 00:00      
                              communication            01/01/70 00:00      
                                 The communication problem's yours, too            01/01/70 00:00      
                              I did, several times, and in all cases (s)he was            01/01/70 00:00      
                                 Well, your boss was clearly a moron            01/01/70 00:00      
                                    1.000.000 miles off target            01/01/70 00:00      
                                       Try Google ... it\\\'s straighten you out            01/01/70 00:00      
                                          I'd be that anyway            01/01/70 00:00      
                                             Nevertheless, you've no business in this case            01/01/70 00:00      
                                                if the OP is on the road to perdition or the road            01/01/70 00:00      
                                       That's one mile, to great precision.            01/01/70 00:00      
                                          based on which side of 'the pond' you write to.            01/01/70 00:00      
                  in fact ther is/was            01/01/70 00:00      
      elaboration            01/01/70 00:00      
         code            01/01/70 00:00      
            you're going to get into trouble            01/01/70 00:00      
         Erik, why do you always do this?            01/01/70 00:00      
            answered in my other responses today            01/01/70 00:00      
               Isn't it obvious?            01/01/70 00:00      
                  Here is an issue: if, when questioned on the choic            01/01/70 00:00      
   It begs the question            01/01/70 00:00      
   PLZ SEE THIS            01/01/70 00:00      
      DON'T SHOUT!            01/01/70 00:00      
         what dont shout???            01/01/70 00:00      
            ALL CAPS = Shouting            01/01/70 00:00      
               but i tried with memory mapped            01/01/70 00:00      
                  Well I'm confused!            01/01/70 00:00      
                     If you know the history ...            01/01/70 00:00      
                  You're still guessing            01/01/70 00:00      
                  Clearly, more information is needed!            01/01/70 00:00      
                     How to post schematics & code            01/01/70 00:00      
                        the problem is ...            01/01/70 00:00      
                           Then            01/01/70 00:00      
                              Better way            01/01/70 00:00      
                                 Google says            01/01/70 00:00      
                  Ok            01/01/70 00:00      
                     The secret of good interfacing...            01/01/70 00:00      
            XBY(ADDRESS) - incomplete?            01/01/70 00:00      
   connection            01/01/70 00:00      
      How about IO/M?            01/01/70 00:00      
      Missing Connection            01/01/70 00:00      
      two things that do not jive            01/01/70 00:00      
         ! - / *            01/01/70 00:00      
         Jive Bunny            01/01/70 00:00      
            not at atll, as long as there is a notation of \'tr            01/01/70 00:00      
            If the OP had considered the signal levels, he wou            01/01/70 00:00      
               Actually Erik...            01/01/70 00:00      
                  YES I misread - no excuse.            01/01/70 00:00      
   it is amzing to me            01/01/70 00:00      
      It doesn't matter whether it is old or new            01/01/70 00:00      
         I'm sure you have not            01/01/70 00:00      
            Of that there can be no doubt ...            01/01/70 00:00      
         But is it worth it?            01/01/70 00:00      
            Yes ... but ... and it's a big BUT ...            01/01/70 00:00      
               not that suggestion, but this one            01/01/70 00:00      
               Programmer??            01/01/70 00:00      
                  and for the rest ...            01/01/70 00:00      
                  Hogwash!            01/01/70 00:00      
                     no need to wash the hog            01/01/70 00:00      
                        Really?            01/01/70 00:00      
                           nitpicking            01/01/70 00:00      
                              Once again you demonstrate your narrow view            01/01/70 00:00      
                                 your "narrow view" takes you outside the audience            01/01/70 00:00      
                                    Why Indians like 8155/8255            01/01/70 00:00      
                                       I/O expansion is not pantyhose, one size does            01/01/70 00:00      
                                          Didn\'t you read the previous post?            01/01/70 00:00      
                                             whatever, you say you can not get me to say that w            01/01/70 00:00      
                                          of course I did not, i answered without reading th            01/01/70 00:00      
   And with all these many highly on-topic posts...            01/01/70 00:00      
      I do not, do any of you?            01/01/70 00:00      
         What would YOU suggest? ... be specific            01/01/70 00:00      
   thanks a lot            01/01/70 00:00      
      Sorry, but            01/01/70 00:00      
      Current Technology            01/01/70 00:00      
      the typical response            01/01/70 00:00      
         This has happened before.            01/01/70 00:00      
      What an unfriendly reply after all our efforts...            01/01/70 00:00      
         Not so sure...            01/01/70 00:00      

Back to Subject List