abilashjoseph
Member level 1
Hi all,
i am using pic 16f877a and CCS compiler,
i am tried for a software uart. it work properly in Proteus and oshonsoft simulator.
but in board transmit section is ok but reception is not working.
receive will get only null.
like " you entered : [ ]"
no character appear there.
the code is given below
please give a solution ASAP
Thanks
the oshonsoft simulation image:
i am using pic 16f877a and CCS compiler,
i am tried for a software uart. it work properly in Proteus and oshonsoft simulator.
but in board transmit section is ok but reception is not working.
receive will get only null.
like " you entered : [ ]"
no character appear there.
the code is given below
HTML:
#include <16f877a.h>
//#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
#FUSES NOPUT //No Power Up Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD //No EE protection
#FUSES NOWRT //Program memory not write protected
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOPROTECT //Code not protected from reading
#use delay(clock=20000000,RESTART_WDT)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,errors,stream=HOSTPC,RESTART_WDT)
#use rs232(baud=9600,parity=N,xmit=PIN_C4,rcv=PIN_C5,bits=8,errors,stream=FPM)
void main()
{
char a=0;
while(1)
{
fprintf(FPM,"Press any key\r\n");
a= getch(FPM);
fprintf(FPM,"You entered : [%C]\r",a);
}
}
please give a solution ASAP
Thanks
the oshonsoft simulation image: