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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Rob Stoffels
06/15/09 09:49
Read: 219 times
Westerlo
Belgium


 
#166096 - Missunderstanding
Responding to: Erik Malund's previous message
Erik Malund said:


* Can i just do so by assigning an address to it as done in the parameter.c file?
If I read this correctly, I read that you want device a to read from device b by mov a,@dptr or var = xxxx;
this will not work, device b will not present the data in any 'stable' fashion, it will only be there during a device b read from memory (1us or less).

The traditional faulty way to parallel communicate parallel between devices is as follows
two registers: address and data
bits: read request and data available, both true low
this works till you have two simultaneous read requests (may take a second, may take a year)

I know of two methods that will work
1) a MASTER controller that, in a round robin fashion interrogates the slaves
2) a (in your case (4-controllers) quad port memory with sentinels (Cypress has those)

Erik


I think i did not describe well.
I want only the µc to communicate with the devices, what i wanted to know is that it is possible to for example assign an address to the struct and that all ellements have the corresponding address to that of the external device...

I only have a sketch schematic for now so i cant propperly visualise it :(

for example:
xdata device d11 _at_ 0x0000;

d11.par0 //can be found at 0x0000 external address
d11.par1 //can be found at 0x0001 external address

But i've tested this and this assumption is correct


Erik Malund said:
<What memory model should I choose best, do i really need the large memory specifier since, according to the data sheet enabling and disabling EXTRAM bit in the AUXR register should activate switching between internal and external memory access. I ask this question cause I would also like to keep use of the internal XRAM of the chip.
wrong again
1) the LARGE memory model does NOT set the AUXR, you need to do that in startup
2) the LARGE memory model will increase your program size dramatically and make it run far slower, use the SMALL model and the xdata qualifier for variables/MMIO you have in xdata
Erik



I now set and clear AUXR parameter in my program before and after accessing the "real xdata". and using small model. And that seems to be doing the trick...

I've seen that they use a separate file in the keil example (3 XData Areas on T89C51RD2) xbanking4xram.A51 where the first parameter is a reference to the AUXR register. Unfortunately i do not completely understand these files, is there any good reference to read that explains the use and different possibilitys?
Does this automate the setting and clearing of EXTRAM bit in AUXR when XDATA call? Won't enabling this cause you to loose your on chip XDATA?

Thanks for the help so far!






List of 19 messages in thread
TopicAuthorDate
AT89c51cc01 and External memory (keil/C51)      Rob Stoffels      06/09/09 10:54      
   Cross posted      Rob Stoffels      06/10/09 04:24      
   Is your problem with FLIP ?      David Prentice      06/10/09 04:36      
      No, think it's keil compiler      Rob Stoffels      06/10/09 05:25      
         Sounds like an error in the data sheet      David Prentice      06/10/09 06:08      
         bible time      Erik Malund      06/10/09 07:18      
            Itterations      Rob Stoffels      06/10/09 10:35      
               just won't get flashed into the µc??      Andy Neil      06/10/09 11:18      
               The compile will compile what you tell it      David Prentice      06/10/09 11:21      
                  RE: your example does not access any xdata at all      Andy Neil      06/10/09 11:31      
         RE: Rob Stoffels said:I think there is something that needs      Andy Neil      06/10/09 11:33      
            Going to try something different      Rob Stoffels      06/10/09 12:46      
               Broken Boards?      Andy Neil      06/11/09 05:42      
                  Memmory mapping question/ Bord fixed      Rob Stoffels      06/15/09 08:32      
                     If I read this correctly      Erik Malund      06/15/09 09:04      
                        Missunderstanding      Rob Stoffels      06/15/09 09:49      
                           xdata will just be whatever EXTRAM says      David Prentice      06/15/09 10:18      
                           do you have any external RAM?      Erik Malund      06/15/09 12:27      
   CC03 is working      Rob Stoffels      06/11/09 04:56      

Back to Subject List