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.
iam working with cygnal microcontrollers c8051f124,we are generating our own protocol using pwm . i have actually implemented my project in 2 phases,1in c and another in assembly. in the c file iam doing uart communication . once the programe runs the displays menu on pc in that menu 2 nd option iam writing to code memory.ie i have to enter 10 byte information on the menu and this 10 byte information i have to write it code memory. now iam able to write to code memory only when iam defining the string as unsigned char code test_string[]="1111111"; but i need in this form scanf("%s",test_string); i tried this but test_string shows value 00 when i putted in watch kindly plz help how to use scanf()in this type case waiting for ur valuable information. regards ramesh
"if any one knows solution plz put a reply." The solution is for you to look up scanf() in the manual and find out whether it does whatever it is you want it to do. If you then think it can do what you want it to do but you cannot get it to work post the non-working code together with a clear description of: 1) what you expect it to do 2) what it actually does and hopefully someone will be able to help you. Please note that using SMS style abbreviations makes it much harder to understand your english. Stefan
Please note that using SMS style abbreviations makes it much harder to understand your english. Since when is Stupid Monkey $#|+ considered english? Erik
Hello iam performing serial communication using cygnal microcontroller.as soon as i will execute code , the user gets menu as mentioned above.when the user goes to option 2 , ie to perform flash / ram reading and writing ,iwant to give some data from the menu that data will write into ram/flash or any memory area , can u please suggest me how to get the data into any variable . here i used scanf statement to input the data but in keil c the variable is not holding the data what i entered from the menu . only technical comments(solution) are invited Thanking you ramesh
u need 2 lrn 2 use scanf() rite. 4 ur xampl code below, u need 2 use sscanf() insted.
unsigned char code test_string[10]; printf("ENTER THE SHORT MESSAGE 10 byte length"); gets(test_string); scanf("%x",test_string);
mr erik i really confused are u a civilized monkey