Jump to content
Sign in to follow this  
lalle

RS232 getchar() problem

Recommended Posts

Hi!

 

Im working on a small robot, now when i tried to send commands to it (It == 16F84 @ 10MHz) it dosnt work.

 

I could putchar('m'); without any problems, but i cant read any chars,

 

while(1) {

 putchar(getchar());

}

 

(echo) dosnt work, i also tried to power up a lamp...

 

Nothing hapends, any ideas?

 

Mvh

Lars

Share this post


Link to post
Share on other sites

Consider performing more testing using putch();

 

eg

while( 1 )

{

   for ( int i = 65; i < 82; i++ )

      putch( i );

}

 

Make sure that you get a to z, just testing with single character could work with some port parameters wrong.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Howdy!

 

Well not tested that code, but i know that it works, i have an printf-function (char pointer), so the output is working as it should.

 

Could it be some error in my MAX233-circuit?

 

Cheers,

lale

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...