Hi all, i'm a student from germany. I got a problem with the addressing of an external bussystem. My C167 controls six LM629N (Precision Motion Controller IC) for an robot. A SN74LS138 Demux selects the LM629N. The Connections are: SN74LS138 : C167 /E1 : /CS4 A2 : A3 A1 : A2 A0 : A1 LM629N : C167 D0..D7 : D0..D7 /WR : /WRL /RD : /RD-U /PS : A0 SN74LS138 : LM629 /O0../O5 : /CS My concrete Questions: 1) How to setup the options for memoryspace with addrsel4/buscon4? 2) Wich Memorymodel should i use? 3) How can i read and write data to the LM639N. I did tones of tries with all possible options,memory-models, near far and huge declarations for pointer, addrsel/buscon settings, dpp configuration .... (for example:
#define BASIS_ADRESSE 0x50000 unsigned char readLM629(unsigned char Achse) { near unsigned char *pointer; pointer = ((near unsigned char*)(Achse*2 | BASIS_ADRESSE)); return *pointer ; }