PDA

View Full Version : WHat is happening.HELP



B_dancer
- 14th May 2010, 00:39
Hello i am student and i have a little problem.I use PIC18f4680 and with a DB9 cable i connct it to PC.In general i use hyperterninal to see what sends and receives.Everything was ok until
i wrote this program which i think is very simple.
____________________________________________
#include <18F4680.h>
#fuses HS
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)

void main()
{ char c ;

puts("GIVE LETTER");
c = getc();

if (c=='A')
{
puts( "GEORGE" );

}
else if(c=='B')
{
puts( "JIM" );
}
else
{
putc(c);
}
}
----------------------------------------------------------------------

i dont get any build options but i dont see the names in the hyperterminal screen when i press the letters A or B.I only see the "give Letter" phrase. WHATS wrong.Plz Help me.

Thank you

ScaleRobotics
- 14th May 2010, 01:50
Hello B_dancer,

This is a PicBasic forum, and we normally do basic with our PicBasic compiler. You might have better luck on one of the C forums.

Walter