Microcontroller › PIC › serial communication using PIC18f4550 › when i loaded my code, when i
when i loaded my code, when i enterd any character through keybord the output is not in proper format , its giving like this —
— .
—
my code is : #include “C:Program FilesPICCProjectsNew FolderpradUART.h”
#include <stdio.h>
//#include <18f452.h>
#use rs232(baud=9600,xmit=pin_c6,rcv=pin_c7)
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=2000000)
void main(void)
{
unsigned char k;
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_oscillator(False);
while(1)
{
k= fgetc();
fputs(k);
printf(“41H”);
// TODO: USER CODE!!
};
}