this is my code for serial communication using 8051 iam trying to send letter B on serial port but iam not getting any thig on heperterminal though all setting are ok .so not getting what the problem is.
ORG 000H MOV TMOD,#20H MOV TH1,#0FAH MOV SCON,#50H SETB TR1 MOV A,#'B' ACALL DELAY A_1: MOV SBUF,A H_1: JNB TI, H_1 CLR TI SJMP A_1 DELAY: MOV R0,#255 L1: DJNZ R0,L1 MOV R1,#255 L2: DJNZ R1,L2 RET end
WRONG!!! NOTHING without comments can be called 'code'
void main(void) { printf("No comments, but action is obvious?\n"); }
Another silly statement
That's not even code. I'd call it pseudo-code pretending to be C.
Obvious ? Where's your printf going to ? UART ? Screen ? Some other interface ? How is anyone supposed to know ? Where's your printf coming from ? A library ? Did you roll your own ?
"Did you roll your own ?"
I don't indulge in such disgusting habits!
extern void My_Function_To_Send_String_To_Uart_At_9600_Baud(char *); void main(void) { My_Function_To_Send_String_To_Uart_At_9600_Baud("No comments, but action is obvious?\n"); }