I am using following sample code for serial, but in debug serial window accept input but output from programme is not showing in serial. Also If i only enable REN=1; beside of SCON=0x50; then it shows in serial window output Please Help me in this regards
#include "reg_c51.h" char uart_data; void main (void) { SCON = 0x50; // REN=1; TMOD = TMOD | 0x20 ; TH1 = 0xFD; TL1 = 0xFD; ES = 1; EA = 1; TR1 = 1; while(1); } void serial_IT(void) interrupt 4 { if (RI == 1) { RI = 0; uart_data = SBUF; //TI=1; SBUF = uart_data; } else TI = 0; }