i was connecting rs232 DB9 to PIC16f877A and using hyperterminal to show the data. it only work when i keep on switching on and off power supply. it was no respond when i switch on the powerr supply constanly. anyone can tell me what is the problem ? below is my programming code.
unsigned short temp_res;
void main() {
USART_Init(19200);
ADCON1 = 0;
TRISA = 0xFF;
do {
temp_res = ADC_Read(2) >> 2;
USART_Write(temp_res);
Delay_ms(100);
} while (1);
}
unsigned short temp_res;
void main() {
USART_Init(19200);
ADCON1 = 0;
TRISA = 0xFF;
do {
temp_res = ADC_Read(2) >> 2;
USART_Write(temp_res);
Delay_ms(100);
} while (1);
}