We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear all, The Siemens Profibus Controller (SPC3), connected to a T89C51RD2 via P0 (multiplexed) and P2, has in its first few addresses registers/latches which I have to set in order to start using it. I believe the SPC to be wired to begin at 0x8000, as the output from P2.7 is inverted before being put into SPC3. In the options for target, I've set: memory model: small code rom: small off chip xdata memory: start: 0x8000 size: 0x600 The rest of the options are left blank. In STARTUP.A51 I've set: XDATASTART EQU 8000H XDATALEN EQU 600H and in code: AUXR = 0x0E; Suppose the address of the register that i'm trying to read is 04H in the SPC. Why does putchar(XBYTE[0x0004]) (or putchar(XBYTE[0x8004]) for that matter) not work? (ie. it outputs the value of the address, '04', and not its contents) I later used a for-loop to output XBYTE[0x0000] through to XBYTE[0xFFFF], which always seem to return the last 2 hex-digits of every address. I've also set the xdata in 'options for target' and Startup.A51 to 0x0000 with size 0x000 to the same effect. Did i miss out or misunderstand something? Any help would be greatly appreciated.