??? 12/04/06 09:10 Read: times Msg Score: -1 -1 Message Not Useful |
#128897 - How to post code Responding to: ???'s previous message |
Yes sir you are right that this was the mistake by me but in future i will remember .
But my code is that : #include<reg51.h> #include "uart.h" unsigned int xdata buff[BUFF_SIZE] = {'P','R','I','Y','A','N','K','A'}; main() { unsigned char i = 0; for(i=0 ; i<20 ; i++) UART_putchar(buff[i]); SBUF = ' '; while(TI!=TRUE); TI =FALSE; while(1) { } } //sends character on UART unsigned char UART_putchar(unsigned char c) { SBUF = c; while(TI!=TRUE); TI =FALSE; return c; } This is the program which is working properly means its output : PRIYANKA But using char datatype its output is different: RRYYNNAA And it takes lot of space using int datatype, and how do i know that those ram i am using that this chip is perfect and this is not faulty.. and i also check my hardware connection that these all are connected in right connection.. Priyanka |