I am having a slight Problem with the putchar function . when i say putchar(0x0A) it put 0x0D & 0x0A both but i only need 0x0A i tried writing putchar myself but dose not seem to work what i did was void putbyte(char mydata) { while(!TI) { TI=0; SBUF=mydata; } } please point out the mistake and any other way to solve my problem
Well.. you called it 'putbyte', amongst other things. If you are trying to replace the default putchar() so that it'll work with printf() and so on you need to do something like this: char putchar(char c) { while(!TI); TI=0; SBUF=c; return(c); }
hi Stefan , I would again like to thank you , as i implemented what you suggested and its working great thank you again Ajay
View all questions in Keil forum