engineer khan
Member level 3
I m using c18 compiler pic18f452 I wanna display a character on hyperterminal it dosent display,its okay on proteus virtual terminal but not on actual hardware
my code is
I tried it by different ways changing baudrate values config value but still it doesnt work,plz help
my code is
I tried it by different ways changing baudrate values config value but still it doesnt work,plz help
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #include<P18F452.h> #pragma config OSCS=OFF #pragma config OSC=HS #pragma config WDT=ON #pragma config BOR=ON #pragma config BORV=45 #pragma config PWRT=OFF #pragma config LVP=OFF #pragma config DEBUG=OFF void delay(unsigned int time); void main(void){ TXSTA=0x20; SPBRG=64; TXSTAbits.TXEN=1; RCSTAbits.SPEN=1; TXSTAbits.BRGH=1; while(1){ TXREG='G'; while(PIR1bits.TXIF==0); delay(10); } } void delay(unsigned int time){ int i,j; for(i=0;i<135;i++) for(j=0;j<time;j++); }
Last edited by a moderator: