EmbeddedRelated.com
Forums

BL4S200 Single-Board Computer - sample program for uarts, file i/o

Started by jleslie48 August 21, 2009
Hello All,

Please forgive me not Reading the *** manual, but I find interactive discussions far more productive. I'm about to have one the above mentioned boards delivered and I was hoping for a program that I could use to demonstrate the UART and File I/O capabilities of this micro-processor.

Your basic the program writes out "I'm alive" on a uart, reads back characters from the uart, and writes them to a file on the card. Is there a canned example program out there to this end?

TIA,

Jleslie

You won't get very far then. There are
many examples that come with DC. You'll
have to read the manual to find them.
________________________________
From: jleslie48
To: r...
Sent: Friday, August 21, 2009 8:53:13 AM
Subject: [rabbit-semi] BL4S200 Single-Board Computer - sample program for uarts, file i/o

Hello All,

Please forgive me not Reading the *** manual, but I find interactive discussions far more productive. I'm about to have one the above mentioned boards delivered and I was hoping for a program that I could use to demonstrate the UART and File I/O capabilities of this micro-processor.

Your basic the program writes out "I'm alive" on a uart, reads back characters from the uart, and writes them to a file on the card. Is there a canned example program out there to this end?

TIA,

Jleslie
Ok then, I just took a look. Whats the STDIO window? If I config a rabbit with demo1.c, how do I hook up my laptop (that doesn't have dynamic c on it) to look see the output of the STDIO window? am I supposed to hook up {xyz} to hyperterminal and I will be able to see STDOUT?

It wasn't until page 15 of the manual that the term "the STDIO window" was used, it is still not defined, nor is it defined anywhere in the manual, Nor is the concept of "the STDIO window" a standard term in any programming environment I have ever worked with. They use the term like its common knowledge, but it is not.

It appears to me that "the STDIO window" is a function that works only in conjunction with the Dynamic C programming environment, which means I can't use it, hence I was looking for a more general UART that I could write to that does not require the dynamic C environment.

--- On Fri, 8/21/09, Steve Trigero wrote:

From: Steve Trigero
Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample program for uarts, file i/o
To: r...
Date: Friday, August 21, 2009, 1:07 PM


You won't get very far then. There are
many examples that come with DC. You'll
have to read the manual to find them.

From: jleslie48
To: rabbit-semi@ yahoogroups. com
Sent: Friday, August 21, 2009 8:53:13 AM
Subject: [rabbit-semi] BL4S200 Single-Board
Computer - sample program for uarts, file i/o


Hello All,

Please forgive me not Reading the *** manual, but I find interactive discussions far more productive. I'm about to have one the above mentioned boards delivered and I was hoping for a program that I could use to demonstrate the UART and File I/O capabilities of this micro-processor.

Your basic the program writes out "I'm alive" on a uart, reads back characters from the uart, and writes them to a file on the card. Is there a canned example program out there to this end?

TIA,

Jleslie
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.59/2310 - Release Date: 08/17/09 18:04:00
Google "STDIO" and you will get more than thee million hits. Read the Wikipedia article. Buy the book "The C Programming language" by Kernighan & Ritchie. It is one of the suggested ref books on the Rabbit site.

___________________________________

Ok then, I just took a look. Whats the STDIO window? If I config a rabbit with demo1.c, how do I hook up my laptop (that doesn't have dynamic c on it) to look see the output of the STDIO window? am I supposed to hook up {xyz} to hyperterminal and I will be able to see STDOUT?

It wasn't until page 15 of the manual that the term "the STDIO window" was used, it is still not defined, nor is it defined anywhere in the manual, Nor is the concept of "the STDIO window" a standard term in any programming environment I have ever worked with. They use the term like its common knowledge, but it is not.

It appears to me that "the STDIO window" is a function that works only in conjunction with the Dynamic C programming environment, which means I can't use it, hence I was looking for a more general UART that I could write to that does not require the dynamic C environment.

--- On Fri, 8/21/09, Steve Trigero wrote:

From: Steve Trigero
Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample program for uarts, file i/o
To: r...
Date: Friday, August 21, 2009, 1:07 PM

You won't get very far then. There are
many examples that come with DC. You'll
have to read the manual to find them.

________________________________

From: jleslie48
To: rabbit-semi@ yahoogroups. com
Sent: Friday, August 21, 2009 8:53:13 AM
Subject: [rabbit-semi] BL4S200 Single-Board Computer - sample program for uarts, file i/o

Hello All,

Please forgive me not Reading the *** manual, but I find interactive discussions far more productive. I'm about to have one the above mentioned boards delivered and I was hoping for a program that I could use to demonstrate the UART and File I/O capabilities of this micro-processor.

Your basic the program writes out "I'm alive" on a uart, reads back characters from the uart, and writes them to a file on the card. Is there a canned example program out there to this end?

TIA,

Jleslie

*** FLAME ALERT ***
stdio is a term standardized all the way back to K&R.
And a Window? Come on! How obvious is that?
You do know what an IDE is?
And if you don't know what K&R is, you are most likely incapable of
asking worthy questions.
.....
As to how to "hook up ...", if you were familiar with K&R and the DC
IDE, then you should guess that invoking your program FOO with a
command in the form of "FOO argument_list
<>output_device" should work; subsequent confusion
could be cleared up by (now worthy) conversation.

(s) Derek
(who was a TA for a professor of computer science for 8 years...)
At 10:41 8/21/2009 -0700, you wrote:
>Ok then, I just took a look. Whats the STDIO window? If I config a
>rabbit with demo1.c, how do I hook up my laptop (that doesn't have
>dynamic c on it) to look see the output of the STDIO window? am I
>supposed to hook up {xyz} to hyperterminal and I will be able to see STDOUT?
>
>It wasn't until page 15 of the manual that the term "the STDIO
>window" was used, it is still not defined, nor is it defined
>anywhere in the manual, Nor is the concept of "the STDIO window" a
>standard term in any programming environment I have ever worked
>with. They use the term like its common knowledge, but it is not.
>
>It appears to me that "the STDIO window" is a function that works
>only in conjunction with the Dynamic C programming environment,
>which means I can't use it, hence I was looking for a more general
>UART that I could write to that does not require the dynamic C environment.
>
>--- On Fri, 8/21/09, Steve Trigero wrote:
>
>From: Steve Trigero
>Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample
>program for uarts, file i/o
>To: r...
>Date: Friday, August 21, 2009, 1:07 PM
>
>You won't get very far then. There are
>many examples that come with DC. You'll
>have to read the manual to find them.
>From: jleslie48
>To: rabbit-semi@ yahoogroups. com
>Sent: Friday, August 21, 2009 8:53:13 AM
>Subject: [rabbit-semi] BL4S200 Single-Board Computer - sample
>program for uarts, file i/o
>
>Hello All,
>
>Please forgive me not Reading the *** manual, but I find interactive
>discussions far more productive. I'm about to have one the above
>mentioned boards delivered and I was hoping for a program that I
>could use to demonstrate the UART and File I/O capabilities of this
>micro-processor.
>
>Your basic the program writes out "I'm alive" on a uart, reads back
>characters from the uart, and writes them to a file on the card. Is
>there a canned example program out there to this end?
>
>TIA,
>
>Jleslie
I know the stdio.h the "stdio WINDOW" is not the same thing.

--- On Fri, 8/21/09, Moore, Robert wrote:

From: Moore, Robert
Subject: RE: [rabbit-semi] BL4S200 Single-Board Computer - sample program for uarts, file i/o
To: r...
Date: Friday, August 21, 2009, 6:32 PM


Google "STDIO" and you will get more than thee million hits. Read the Wikipedia article. Buy the book "The C Programming language" by Kernighan & Ritchie. It is one of the suggested ref books on the Rabbit site.

____________ _________ _________ _____

Ok then, I just took a look. Whats the STDIO window? If I config a rabbit with demo1.c, how do I hook up my laptop (that doesn't have dynamic c on it) to look see the output of the STDIO window? am I supposed to hook up {xyz} to hyperterminal and I will be able to see STDOUT?

It wasn't until page 15 of the manual that the term "the STDIO window" was used, it is still not defined, nor is it defined anywhere in the manual, Nor is the concept of "the STDIO window" a standard term in any programming environment I have ever worked with. They use the term like its common knowledge, but it is not.

It appears to me that "the STDIO window" is a function that works only in conjunction with the Dynamic C programming environment, which means I can't use it, hence I was looking for a more general UART that I could write to that does not require the dynamic C environment.

--- On Fri, 8/21/09, Steve Trigero wrote:

From: Steve Trigero

Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample program for uarts, file i/o

To: rabbit-semi@ yahoogroups. com

Date: Friday, August 21, 2009, 1:07 PM

You won't get very far then. There are

many examples that come with DC. You'll

have to read the manual to find them.

____________ _________ _________ __

From: jleslie48

To: rabbit-semi@ yahoogroups. com

Sent: Friday, August 21, 2009 8:53:13 AM

Subject: [rabbit-semi] BL4S200 Single-Board Computer - sample program for uarts, file i/o

Hello All,

Please forgive me not Reading the *** manual, but I find interactive discussions far more productive. I'm about to have one the above mentioned boards delivered and I was hoping for a program that I could use to demonstrate the UART and File I/O capabilities of this micro-processor.

Your basic the program writes out "I'm alive" on a uart, reads back characters from the uart, and writes them to a file on the card. Is there a canned example program out there to this end?

TIA,

Jleslie
When you learn to program in C stdio.h is probably the first library you
will ever use.

Even helloworld.c uses it

In Dynamic C debug information can be sent to the STDIO window.

To do what you are looking for will will require serial port programming.

Thanks

Duncan

From: r... [mailto:r...] On
Behalf Of Alan Matheson
Sent: Friday, August 21, 2009 4:45 PM
To: r...
Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample program
for uarts, file i/o

STDIO is the default device to which output is directed, traditionally a
terminal and from which input is recieved, traditionally a keyboard. It is
common knowledge. Might pay to start by reading up on the fundamentals of
computing followed by reading the Dynamic C manual.

Alan Matheson

----- Original Message -----

From: Jonathan Leslie

To: r...

Sent: Saturday, August 22, 2009 5:41 AM

Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample program
for uarts, file i/o
Ok then, I just took a look. Whats the STDIO window? If I config a rabbit
with demo1.c, how do I hook up my laptop (that doesn't have dynamic c on it)
to look see the output of the STDIO window? am I supposed to hook up {xyz}
to hyperterminal and I will be able to see STDOUT?

It wasn't until page 15 of the manual that the term "the STDIO window" was
used, it is still not defined, nor is it defined anywhere in the manual, Nor
is the concept of "the STDIO window" a standard term in any programming
environment I have ever worked with. They use the term like its common
knowledge, but it is not.

It appears to me that "the STDIO window" is a function that works only in
conjunction with the Dynamic C programming environment, which means I can't
use it, hence I was looking for a more general UART that I could write to
that does not require the dynamic C environment.

--- On Fri, 8/21/09, Steve Trigero wrote:
From: Steve Trigero
Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample program
for uarts, file i/o
To: r...
Date: Friday, August 21, 2009, 1:07 PM

You won't get very far then. There are
many examples that come with DC. You'll
have to read the manual to find them.

_____

From: jleslie48
To: rabbit-semi@ yahoogroups. com
Sent: Friday, August 21, 2009 8:53:13 AM
Subject: [rabbit-semi] BL4S200 Single-Board Computer - sample program for
uarts, file i/o

Hello All,

Please forgive me not Reading the *** manual, but I find interactive
discussions far more productive. I'm about to have one the above mentioned
boards delivered and I was hoping for a program that I could use to
demonstrate the UART and File I/O capabilities of this micro-processor.

Your basic the program writes out "I'm alive" on a uart, reads back
characters from the uart, and writes them to a file on the card. Is there a
canned example program out there to this end?

TIA,

Jleslie

_____
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.59/2310 - Release Date: 08/17/09
18:04:00
lets try this again.

whats the difference between dynamic c's "stdio window" and a regular hyper-terminal window?

also similarly,

lets say I load a rabbit bl4s200 with the demo1.c program so that it is spits out a counter forever to stdout.

Now lets say I take the rabbit bl4s200 to a different PC that does not have dynamic C loaded onto it. How do view the output of the demo1.c program? The second PC doesn't have a "stdio window" as the target for the rabbits stdout. All the second PC has is hyperterminal to talk to com ports.
REF:

3.1 Run DEMO1.C
This sample program will be used to illustrate some of the functions of Dynamic C. Open the file Samples/DEMO1.C using the File menu or the keyboard shortcut .
The program will appear in a window, as shown in Figure 1 below (minus
some comments). Use the mouse to place the cursor on the function name printf in the program and press . This brings up a Function Description window for printf(). You can do this with all functions in the Dynamic C libraries, including libraries you write yourself.
Figure 2. Sample Program DEMO1.C
To run DEMO1.C compile it using the Compile menu, and then run it by selecting Run in the Run menu. (The keyboard shortcut will compile and run the program. You may also use the green triangle toolbar button as a substitute for .)
The value of
the counter should be printed repeatedly to the Stdio window if
everything went well. If this doesn't work, review the following points:
The
target should be ready, indicated by the message "BIOS successfully
compiled..." If you did not receive this message or you get a
communication error, recompile the BIOS by typing or select Reset Target / Compile BIOS from the Compile menu. A message reports "No Rabbit Processor Detected" in cases where the wall transformer is not connected or not plugged in. The
programming cable must be connected to the controller. (The colored
wire on the programming cable is closest to pin 1 on the programming
header on the controller). The other end of the programming cable must
be connected to the PC serial port. The COM port specified in the
Communications dialog box must be the same as the one the programming
cable is connected to. (The Communications dialog box is accessed via
the Communications tab of the Options | Project Options menu.) To check if you have the correct serial port, press .
If the "BIOS successfully compiled ..." message does not display,
choose a different serial port in the Communications dialog box until
you find the serial port you are plugged into. Don't change anything in
this menu except the COM number. The baud rate should be 115,200 bps
and the stop bits should be 1.

--- On Fri, 8/21/09, Duncan Sinclair wrote:

From: Duncan Sinclair
Subject: RE: [rabbit-semi] BL4S200 Single-Board Computer - sample program for uarts, file i/o
To: r...
Date: Friday, August 21, 2009, 10:14 PM


When you learn to program in C stdio.h is probably the first
library you will ever use.

Even helloworld.c uses it

In Dynamic C debug information can be sent to the STDIO window.

To do what you are looking for will will require serial port
programming.



Thanks

Duncan



From:
rabbit-semi@ yahoogroups. com [mailto:rabbit- semi@yahoogroups .com] On Behalf
Of Alan Matheson

Sent: Friday, August 21, 2009 4:45 PM

To: rabbit-semi@ yahoogroups. com

Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample
program for uarts, file i/o




STDIO
is the default device to which output is directed, traditionally a terminaland
from which input is recieved, traditionally a keyboard.It is common
knowledge. Might pay tostart by reading up on the fundamentals of
computing followed by reading the Dynamic C manual.



Alan
Matheson






-----
Original Message -----

From: Jonathan Leslie

To: rabbit-semi@ yahoogroups. com
Sent: Saturday, August 22,
2009 5:41 AM

Subject: Re: [rabbit-semi]
BL4S200 Single-Board Computer - sample program for uarts, file i/o





Ok then, I just took a look. Whats the STDIO window? If I config a rabbit with
demo1.c, how do I hook up my laptop (that doesn't have dynamic c on it) to
look see the output of the STDIO window? am I supposed to hook up
{xyz} to hyperterminal and I will be able to see STDOUT?

It wasn't until page 15 of the manual that the term "the STDIO window" was used, it is still not
defined, nor is it defined anywhere in the manual, Nor is the concept of
"the STDIO window" a standard term in any
programming environment I have ever worked with. They use the term like
its common knowledge, but it is not.

It appears to me that "the STDIO window" is a function that works
only in conjunction with the Dynamic C programming environment, which means I
can't use it, hence I was looking for a more general UART that I could write
to that does not require the dynamic C environment.

--- On Fri, 8/21/09, Steve Trigero
wrote:

From: Steve Trigero

Subject: Re: [rabbit-semi] BL4S200 Single-Board Computer - sample program for
uarts, file i/o

To: rabbit-semi@ yahoogroups. com

Date: Friday, August 21, 2009, 1:07 PM



You won't get very
far then. There are

many examples that come with DC. You'll

have to read the manual to find them.



From: jleslie48


To: rabbit-semi@ yahoogroups. com

Sent: Friday, August 21, 2009 8:53:13 AM

Subject: [rabbit-semi] BL4S200 Single-Board Computer - sample program
for uarts, file i/o



Hello All,

Please forgive me not Reading the *** manual, but I find interactive
discussions far more productive. I'm about to have one the above mentioned
boards delivered and I was hoping for a program that I could use to demonstrate
the UART and File I/O capabilities of this micro-processor.

Your basic the program writes out "I'm alive" on a uart, reads back
characters from the uart, and writes them to a file on the card. Is there a
canned example program out there to this end?

TIA,

Jleslie

No virus found in this incoming message.

Checked by AVG - www.avg.com

Version: 8.5.409 / Virus Database: 270.13.59/2310 - Release Date: 08/17/09
18:04:00
Jonathan Leslie wrote:
> lets try this again.
>
> whats the difference between dynamic c's "stdio window" and a regular
> hyper-terminal window?
>
> also similarly,
>
> lets say I load a rabbit bl4s200 with the demo1.c program so that it
> is spits out a counter forever to stdout.
>
> Now lets say I take the rabbit bl4s200 to a different PC that does not
> have dynamic C loaded onto it. How do view the output of the demo1.c
> program? The second PC doesn't have a "stdio window" as the target
> for the rabbits stdout. All the second PC has is hyperterminal to
> talk to com ports.
>
look at the defines in stdio.lib:

// for debugging, stdion can be redirected to a serial port
// uncomment the following 3 defines to use this.
#define STDIO_DEBUG_SERIAL SADR
#define STDIO_DEBUG_BAUD 115200
#define STDIO_DEBUG_ADDCR

Then it will output debug info on the programming port. You will need to
use the "Diag" connector not the "Prog" connector on the programming cable.

If you have one of the newer programming cables with just one connector,
you are screwed on this. You can redirect the info to another serial
port with the defines though.

--
------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------

today's fortune
You will never know hunger.