EmbeddedRelated.com
Forums

Port B for RS232

Started by M G June 27, 2007
Hello,

I am using RCM3100.
I am able to send characters from Rabbit and view them on Hyperterminal.
But I am not able to receive the characters sent from PC to Rabbit.

The code I am using given below.

#define BINBUFSIZE 15

#define BOUTBUFSIZE 15

#ifndef _232BAUD

#define _232BAUD 115200

#endif

serBopen(_232BAUD);

serBwrFlush();

serBrdFlush();

for(;;)

{

costate {

for (;;)

{

// serBputc (cOut); // Send lowercase byte

while ((nIn1=serBgetc()) == -1); // Wait for echo

serBputc (toupper(nIn1)); // Send the converted upper case byte

// while ((nIn2=serCgetc()) == -1); // Wait for echo

printf ("Serial B sent %c\n",toupper(nIn1));

waitfor (IntervalMs(500));

}

}

Can any one help me in setting up the rabbit to receive characters sent from
other device on Serial port B?

Thanks
M G wrote:
> Hello,
>
> I am using RCM3100.
> I am able to send characters from Rabbit and view them on Hyperterminal.
> But I am not able to receive the characters sent from PC to Rabbit.
>
> The code I am using given below.
>
> #define
>
> BINBUFSIZE 15 #define BOUTBUFSIZE 15
>
> #ifndef
>
> _232BAUD #define _232BAUD 115200 #endif
>
> serBopen(_232BAUD);
>
> serBwrFlush();
>
> serBrdFlush();
>
> for
>
> (;;)
>
> {
>
> costate {
>
> for (;;)
>
> {
>
> // serBputc (cOut); // Send lowercase byte while ((nIn1=serBgetc()) => -1); // Wait for echo serBputc (toupper(nIn1)); // Send the converted
> upper case byte // while ((nIn2=serCgetc()) == -1); // Wait for echo
> printf ("Serial B sent %c\n",toupper(nIn1));
>
> waitfor (IntervalMs(500));
>
> }
>
> }
>
> Can any one help me in setting up the rabbit to receive characters
> sent from other device on Serial port B?
>
Do you have hyperterminal set for no handshaking?
------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------
Rabbit libs: http://www.shdesigns.org/rabbit/
today's fortune
How can you think and hit at the same time?
-- Yogi Berra
I have found Hyperterm a bit cranky in the past. One thing that has
helped me in the past is to turn off the flow control in the
hyperterm settings.

Hope that helps
Joel

--- In r..., "M G" wrote:
>
> Hello,
>
> I am using RCM3100.
> I am able to send characters from Rabbit and view them on
Hyperterminal.
> But I am not able to receive the characters sent from PC to Rabbit.
>
> The code I am using given below.
>
> #define BINBUFSIZE 15
>
> #define BOUTBUFSIZE 15
>
> #ifndef _232BAUD
>
> #define _232BAUD 115200
>
> #endif
>
> serBopen(_232BAUD);
>
> serBwrFlush();
>
> serBrdFlush();
>
> for(;;)
>
> {
>
> costate {
>
> for (;;)
>
> {
>
> // serBputc (cOut); // Send lowercase byte
>
> while ((nIn1=serBgetc()) == -1); // Wait for echo
>
> serBputc (toupper(nIn1)); // Send the converted upper case byte
>
> // while ((nIn2=serCgetc()) == -1); // Wait for echo
>
> printf ("Serial B sent %c\n",toupper(nIn1));
>
> waitfor (IntervalMs(500));
>
> }
>
> }
>
> Can any one help me in setting up the rabbit to receive characters
sent from
> other device on Serial port B?
>
> Thanks
>
> > I am using RCM3100.
> > I am able to send characters from Rabbit and view them on
> > Hyperterminal.
> > But I am not able to receive the characters sent from PC to
> > Rabbit.

So you know that the PC can receive characters, and that the Rabbit can
send them. That's a good start.

Try connecting the Rabbit Tx and Rx lines: this will verify that the
Rabbit can also receive data.

Then try connecting the PC Tx and Rx lines: this will verify that the
PC can also send data.

If you have standard 9-pin D connectors, it's really easy to use a
staple or paper clip to short pins 2 and 3. :)

Kelly
Thank you. I have changed the hyperterminal flow control to "None" and it is
working fine.

Thanks
On 6/28/07, jjbaumert wrote:
>
> I have found Hyperterm a bit cranky in the past. One thing that has
> helped me in the past is to turn off the flow control in the
> hyperterm settings.
>
> Hope that helps
> Joel
>
> --- In r... , "M G"
> wrote:
> >
> > Hello,
> >
> > I am using RCM3100.
> > I am able to send characters from Rabbit and view them on
> Hyperterminal.
> > But I am not able to receive the characters sent from PC to Rabbit.
> >
> > The code I am using given below.
> >
> > #define BINBUFSIZE 15
> >
> > #define BOUTBUFSIZE 15
> >
> > #ifndef _232BAUD
> >
> > #define _232BAUD 115200
> >
> > #endif
> >
> > serBopen(_232BAUD);
> >
> > serBwrFlush();
> >
> > serBrdFlush();
> >
> > for(;;)
> >
> > {
> >
> > costate {
> >
> > for (;;)
> >
> > {
> >
> > // serBputc (cOut); // Send lowercase byte
> >
> > while ((nIn1=serBgetc()) == -1); // Wait for echo
> >
> > serBputc (toupper(nIn1)); // Send the converted upper case byte
> >
> > // while ((nIn2=serCgetc()) == -1); // Wait for echo
> >
> > printf ("Serial B sent %c\n",toupper(nIn1));
> >
> > waitfor (IntervalMs(500));
> >
> > }
> >
> > }
> >
> > Can any one help me in setting up the rabbit to receive characters
> sent from
> > other device on Serial port B?
> >
> >
> >
> > Thanks
>
hello Scott Henion,
Thank you very much now iam getting proper results.Its the matter of Delay.

can plz help in one more problem iam getting the following errror
ERROR DKENTRY.LIB : Out of root code space, try moving code to XMEM.

can you please help in this.

thanks & Regards
Swati Davari
Scott Henion wrote:
M G wrote: Hello,

I am using RCM3100.
I am able to send characters from Rabbit and view them on Hyperterminal.
But I am not able to receive the characters sent from PC to Rabbit.

The code I am using given below.
#define
BINBUFSIZE 15 #define BOUTBUFSIZE 15 #ifndef
_232BAUD #define _232BAUD 115200 #endif serBopen(_232BAUD);
serBwrFlush();
serBrdFlush();
for
(;;) {
costate {
for (;;) {
// serBputc (cOut); // Send lowercase byte while ((nIn1=serBgetc()) == -1); // Wait for echo serBputc (toupper(nIn1)); // Send the converted upper case byte // while ((nIn2=serCgetc()) == -1); // Wait for echo printf ("Serial B sent %c\n",toupper(nIn1)); waitfor (IntervalMs(500));
}
}
Can any one help me in setting up the rabbit to receive characters sent from other device on Serial port B?

Do you have hyperterminal set for no handshaking?

------ | Scott G. Henion| s...@shdesigns.org | | Consultant | Stone Mountain, GA | | SHDesigns http://www.shdesigns.org | ------ Rabbit libs: http://www.shdesigns.org/rabbit/ today's fortune How can you think and hit at the same time? -- Yogi Berra

---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.