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.
Hello everybody, iam working on cygnal(sillabs)microcontrollers.i would like to write different data everytime starting from the memory location 0x20 of ram,can any one suggest me how to do it. eg:for ox20 address ---->>write 0xf9 0x21 ------->>write 0x40 like 20 locations john void main() { unsigned int i=0; unsigned char data *dp,data1[20]; printf("enter the data to write "); for(dp=0x20;dp!=0x80;dp++) { scanf("%d",&data1[i]); *dp =data1[i]; printf("*dp=%d",*dp); printf("add=%d",dp); } }
[Please remember to use pre tags around posted source code...] What you really should be doing is position an array _at_ address 0x20, and just scanf() right into that, by passing
array + i
hello mr hans bernahrd thanks for your kind reply. your idea really helped me regards john