??? 12/17/08 06:27 Read: times |
#160985 - complier issue Responding to: ???'s previous message |
I am interfacing wiznet(wiz830mj) with c8051f340
external memory interfacing mapping the wiznet above 0x2000 following code is to set one of the register of wiznet. Data want to write in 0x200c but it is going and storing in 0x2000d //c-code #define SHAR5 0X200c typedef unsigned int uint16 typedef unsigned char uint8 volatile uint16 xdata *wiznet; void SIL_WRITE(uint16*,uint8); /In main function wiznet= ((uint16 xdata *)SHAR5); SIL_WRITE(wiznet,0x01); //SIL_WRITE FUNCTION void SIL_WRITE(uint16 *addr1,uint8 data1) { *addr1 = data1; return; } 0896 90 00 04 MOV DPTR,#0004H 0899 74 20 MOV A,#20H 089B F0 MOVX @DPTR,A 089C A3 INC DPTR 089D 74 0C MOV A,#0CH 089F F0 MOVX @DPTR,A //Dptr is getting address 0x200c 08A0 90 00 04 MOV DPTR,#0004H 08A3 E0 MOVX A,@DPTR 08A4 FE MOV R6,A 08A5 A3 INC DPTR 08A6 E0 MOVX A,@DPTR 08A7 AA 06 MOV R2,06H 08A9 F9 MOV R1,A 08AA 7B 01 MOV R3,#01H 08AC 7D 01 MOV R5,#01H 08AE 12 0B 8D LCALL 0B8DH 0B8D 75 AE FF MOV AEH,#FFH 0B90 AF 05 MOV R7,05H 0B92 E4 CLR A 0B93 8F F0 MOV F0H,R7 0B95 12 0A B1 LCALL 0AB1H 0B98 22 RET 0AB1 BB 01 0A CJNE R3,#01H,0AH 0AB4 89 82 MOV 82H,R1 0AB6 8A 83 MOV 83H,R2 0AB8 F0 MOVX @DPTR,A 0AB9 E5 F0 MOV A,F0H 0ABB A3 INC DPTR 0ABC F0 MOVX @DPTR,A 0ABD 22 RET please anybody assist in this Thanku Geetha |
Topic | Author | Date |
complier issue | 01/01/70 00:00 | |
What is SIL_WRITE? | 01/01/70 00:00 | |
Incomplete | 01/01/70 00:00 | |
just a guess | 01/01/70 00:00 | |
cross posted at SILabs forum | 01/01/70 00:00 | |
What do you expect... | 01/01/70 00:00 | |
complier issue | 01/01/70 00:00 | |
Extension fron one to two bytes | 01/01/70 00:00 | |
You are right Sir.. | 01/01/70 00:00 | |
RTFM | 01/01/70 00:00 | |
Erik, I meant wiznet registers!! | 01/01/70 00:00 | |
Big picture | 01/01/70 00:00 | |
I understand.. | 01/01/70 00:00 |