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.
I have used the following code to send a display string to an RS232 port. It always worked in Keil Microvision2. Now in microvision5 it does not.
DispString (“Abcdefg\n”); Void DispString ( unsigned char *gp) { unsigned char i; For (i=0; *(gp+i) != ‘\n’; i++) { putChar (*(gp+i) ); } }
So why does the above DispString not work..?? I get no error messages. However if I change (“Abcdefg”) to (‘Abcdefg’) I get error message …. > too many characters in character literal – extra leading characters ignored.. Can anyone explain and tell me what is the correct way in #5 (and maybe why it doesn't ?) Thanks. Bhal
Please find AND READ a tutorial on C programming. Your questions suggest that you would benefit from something for absolute beginners.