Jump to content
Sign in to follow this  
makro2

RS232 -problem, please help!

Recommended Posts

I just found rs232 example from exaples -section.

 

Putchar doesn't work at all... i can only receive last two chars (byteu, bytel)... If there is more data to send, always the last two is only sent.

 

There the links to the example code:

http://www.picant.com/c2c/examples.html

http://www.picant.com/c2c/examples/rs232/SerialCom.c.html

http://www.picant.com/c2c/examples/rs232/SerialCom.h.html

http://www.picant.com/c2c/examples/rs232/test232.c.html

http://www.picant.com/c2c/examples/rs232/test232.h.html

 

 

My code:

while (1)

 {

spi_outp(32+8, 8);

spi_inp(8);

putChar(bytel);

 

if (bytel==4)

                                        {

             spi_outp(56, 8);

spi_inp(16);

 

putChar(65);

putChar(byteu);

             putChar(bytel);

                                                   

                                                   while (getTxByteCount() != 0);

 

             delay_ms(200);

                                        }

 

 

}

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...