Searching \ for 'Binary transfer from Pic to PC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Binary transfer from Pic to PC'.

Truncated match.
PICList Thread
'Binary transfer from Pic to PC'
1998\02\23@085424 by Steen Jensen

flavicon
face
I have written a program which read all adresses in a 24C16 I2C EEPROM and
sends the data to a PC via RS232 (8,N,1 1200 Baud). I have used the Windows
Terminal program for receiving the data. But when I receive the data as a
text file (ASCII) there is a probelm with the control characters CR, FF, LF
etc. They are not read as data. Can I somehow receive the data as a binary
file? I have tried to use the various protocols for this purpose, but it
always ends out with a failure. What do I need to do in my Pic-code to
support fx. the Xmodem or the Kermit protocol? I hope you are able to help
me !


With kind regards
GDK-SSJ - Steen Schelle Jensen
Dept.: 1545
Internet e-mail: spam_OUTssjensenTakeThisOuTspamgrundfos.com

1998\02\23@092029 by WF AUTOMACAO

flavicon
face
Steen Jensen wrote:
>
> I have written a program which read all adresses in a 24C16 I2C EEPROM and
> sends the data to a PC via RS232 (8,N,1 1200 Baud). I have used the Windows
> Terminal program for receiving the data. But when I receive the data as a
> text file (ASCII) there is a probelm with the control characters CR, FF, LF
> etc. They are not read as data. Can I somehow receive the data as a binary
> file? I have tried to use the various protocols for this purpose, but it
> always ends out with a failure. What do I need to do in my Pic-code to
> support fx. the Xmodem or the Kermit protocol? I hope you are able to help
> me !
>
> With kind regards
> GDK-SSJ - Steen Schelle Jensen
> Dept.: 1545
> Internet e-mail: .....ssjensenKILLspamspam@spam@grundfos.com

I did have problems with the '\n' (CR=ASCII 12), but i was using the
telix!

There is option that ADD LINE FEED THAT CR allowed the cursor jumps to
the next line and in the first columm!

Miguel.

1998\02\23@092439 by Peter van Hoof

flavicon
face
cr=ascii 13
Peter

----------
> From: WF AUTOMACAO <wfspamKILLspamAMBIENTE.COM.BR>
> To: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
> Subject: Re: Binary transfer from Pic to PC
> Date: Monday, February 23, 1998 3:15 PM
>
> Steen Jensen wrote:
> >
> > I have written a program which read all adresses in a 24C16 I2C EEPROM
and
> > sends the data to a PC via RS232 (8,N,1 1200 Baud). I have used the
Windows
> > Terminal program for receiving the data. But when I receive the data as
a
> > text file (ASCII) there is a probelm with the control characters CR,
FF, LF
> > etc. They are not read as data. Can I somehow receive the data as a
binary
> > file? I have tried to use the various protocols for this purpose, but
it
> > always ends out with a failure. What do I need to do in my Pic-code to
> > support fx. the Xmodem or the Kermit protocol? I hope you are able to
help
{Quote hidden}

1998\02\23@093550 by WF AUTOMACAO

flavicon
face
Peter van Hoof wrote:
>
> cr=ascii 13
> Peter
>

Ops... sorry, 13 is the correct!

Thanks Mr. Hoof

Miguel.

1998\02\23@095013 by Steen Jensen

flavicon
face
You said you were using the Telix. I don't know Telix. Is that a Terminal
program ?

Well I'm off duty for today
Regards
Steen Jensen




From: wfspamspam_OUTAMBIENTE.COM.BR on 23-02-98 12:15 PST

Please respond to @spam@PICLISTKILLspamspamMITVMA.MIT.EDU

To:   KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU
cc:    (bcc: Steen Schelle Jensen/Sales/DK_GDK/Grundfos)
Subject:  Re: Binary transfer from Pic to PC




Steen Jensen wrote:
>
> I have written a program which read all adresses in a 24C16 I2C EEPROM
and
> sends the data to a PC via RS232 (8,N,1 1200 Baud). I have used the
Windows
> Terminal program for receiving the data. But when I receive the data as a
> text file (ASCII) there is a probelm with the control characters CR, FF,
LF
> etc. They are not read as data. Can I somehow receive the data as a
binary
> file? I have tried to use the various protocols for this purpose, but it
> always ends out with a failure. What do I need to do in my Pic-code to
> support fx. the Xmodem or the Kermit protocol? I hope you are able to
help
> me !
>
> With kind regards
> GDK-SSJ - Steen Schelle Jensen
> Dept.: 1545
> Internet e-mail: RemoveMEssjensenTakeThisOuTspamgrundfos.com
I did have problems with the '\n' (CR=ASCII 12), but i was using the
telix!
There is option that ADD LINE FEED THAT CR allowed the cursor jumps to
the next line and in the first columm!
Miguel.

1998\02\23@095338 by Morgan Olsson

picon face
Why not convert to ASCII-coded hex before transfer?
/Morgan

At 14:39 1998-02-23 +0100, you wrote:
{Quote hidden}

/  Morgan Olsson, MORGANS REGLERTEKNIK, SE-277 35 KIVIK, Sweden \
\  TakeThisOuTmrtEraseMEspamspam_OUTiname.com, ph: +46 (0)414 70741; fax +46 (0)414 70331    /

1998\02\23@112029 by Peter van Hoof

flavicon
face
The xmodem protocol is fairly simple to implement , did it once in basic
You can find a description of the protocol on it's only a page long

http://www.strangecreations.com/library/x2ftp/formats.htm  under xmodem.zip


Peter

Steen Jensen wrote:
>
> I have written a program which read all adresses in a 24C16 I2C EEPROM
and
> sends the data to a PC via RS232 (8,N,1 1200 Baud). I have used the
Windows
> Terminal program for receiving the data. But when I receive the data as
a
> text file (ASCII) there is a probelm with the control characters CR, FF,
LF
> etc. They are not read as data. Can I somehow receive the data as a
binary
> file? I have tried to use the various protocols for this purpose, but it
> always ends out with a failure. What do I need to do in my Pic-code to
> support fx. the Xmodem or the Kermit protocol? I hope you are able to
help
> me !
>
> With kind regards
> GDK-SSJ - Steen Schelle Jensen
> Dept.: 1545
> Internet e-mail: RemoveMEssjensenspamTakeThisOuTgrundfos.com

1998\02\23@112042 by WF AUTOMACAO

flavicon
face
Steen Jensen wrote:
>
> You said you were using the Telix. I don't know Telix. Is that a Terminal
> program ?
>
> Well I'm off duty for today
> Regards
> Steen Jensen

Yes.

1998\02\23@112049 by Peter van Hoof

flavicon
face
One catch to this
xmodem only works with both send and receive hard/software (preferred is
full duplex)

Peter van Hoof

----------
> From: Peter van Hoof <pvhEraseMEspam.....microserve.net>
> To: EraseMEPICLISTspamMITVMA.MIT.EDU
> Subject: Re: Binary transfer from Pic to PC
> Date: Monday, February 23, 1998 10:40 AM
>
> The xmodem protocol is fairly simple to implement , did it once in basic
> You can find a description of the protocol on it's only a page long
>
> http://www.strangecreations.com/library/x2ftp/formats.htm  under
xmodem.zip
{Quote hidden}

as
> a
>  > text file (ASCII) there is a probelm with the control characters CR,
FF,
> LF
>  > etc. They are not read as data. Can I somehow receive the data as a
> binary
>  > file? I have tried to use the various protocols for this purpose, but
it
>  > always ends out with a failure. What do I need to do in my Pic-code to
>  > support fx. the Xmodem or the Kermit protocol? I hope you are able to
> help
>  > me !
>  >
>  > With kind regards
>  > GDK-SSJ - Steen Schelle Jensen
>  > Dept.: 1545
>  > Internet e-mail: RemoveMEssjensenEraseMEspamEraseMEgrundfos.com
>

1998\02\23@135651 by Richard Nowak

picon face
This will double the file size on transfer.

All that needs to be done is to filter the stream as it is received from the
PIC and display and/or save the characters desired.
A terminal program may have to be created (VB using microsoft's comm control).

Rich

At 03:35 PM 2/23/98 +0100, you wrote:
{Quote hidden}

=========================================
= Abolish the Income Tax! Fire the IRS! =
= http://www.nrst.org/                  =
=========================================

1998\02\23@194226 by Morgan Olsson

picon face
Oh, I did not realize it was much data.  Did not read the question thru.
Is it maybe possible to use DOS "copy /b COM1: file" (or how it is) command ?
Will it exit om CTRL-Z code recieved, switch /b stated?
If not, can we end recieving using CTRL-C from keyboard, or if not rin un
windows dos-window and kill it from windows?
/Morgan

At 10:35 1998-02-23 -0800, Rich wrote:
>This will double the file size on transfer.
>
>All that needs to be done is to filter the stream as it is received from the
>PIC and display and/or save the characters desired.
>A terminal program may have to be created (VB using microsoft's comm
control).
{Quote hidden}

/  Morgan Olsson, MORGANS REGLERTEKNIK, SE-277 35 KIVIK, Sweden \
\  mrtSTOPspamspamspam_OUTiname.com, ph: +46 (0)414 70741; fax +46 (0)414 70331    /

1998\02\23@234842 by Richard Nowak

picon face
I do not think you need to implement any fancy protocols.

From the PC you send a char which tells the PIC to dump the contents of the
eeprom. I would write the Software/Firmware to handle fixed sized blocks and
use hardware handshaking (if your data can range from 0 to 255 you can
forget about software handshaking [xon-xoff]). Later add a CRC byte to
verify each block.

The PC collects the data, stores it on disk or prints the printable
characters to a terminal window or both. The Windows95 API will support up
to 19,200 bps so I would kick 1200 bps up several notches. Other available
controls can run much faster e.g., 115,200 bps and beyond -- limited by the
PC's uart (16550A = faster).

I don't know what it would take to jerk around an existing modem package to
make it work so I suggested you write your own. In Visual Basic you drop a
control on a form, set the properties you like, write a few lines of code
and you should be able to send and receive characters within the hour.

BTW: ASCII and Linefeed modes have limited usefulness so binary transfers
are most often supported.

Rich

At 11:11 PM 2/23/98 +0100, you wrote:
{Quote hidden}

=========================================
= Abolish the Income Tax! Fire the IRS! =
= http://www.nrst.org/                  =
=========================================

1998\02\24@114209 by Brian Schousek

picon face
Morgan- no need to get too complicated with this one. Qbasic is included
free with MS-DOS through NT 4.0 (although I don't know how well com ports
work under NT from Basic.) Included at the end of this post is some
pseudocode for a quick basic program that will do what you are looking for.
I call it pseudocode because I don't recall the exact permutation you must
use to get bytes from the serial port, but I think INPUT # will work.
Perhaps a GET instead. Note that if you send to the PIC through file #1
using a PRINT # command, be sure to append a semicolon (;) to the end of the
line (PRINT 1, a$;) otherwise  the PC will send a CR and a LF for every
string you send. I obviously haven't tested this program with your hardware,
but I've run programs nearly identical to this in the past and once you have
the basic framework in place and working, it's hard to break.

FYI copy the qbasic code, save it as "comms.bas" for example, then execute
"qbasic comms.bas" from a command prompt.
Brian

---beginning qbasic code---
DIM fromrs232 AS INTEGER
DIM count AS INTEGER
CONST numbytes = 1000

OPEN "com1: 1200,N,8,1" FOR RANDOM AS #1

OPEN "binary.out" FOR RANDOM AS #2 LEN = 2
'len says each record is 1 byte long

OPEN "ascii.out" FOR OUTPUT AS #3
'ascii output for easy usage in other programs

FOR count = 1 TO numbytes
'first get the data
INPUT #1,fromrs232

'now put the data in the binary file
PUT #2, count, fromrs232

'just for an exercise, also put it in a text fi
PRINT #3, fromrs232

PRINT count
NEXT count

CLOSE   'with no arguments, closes all files
---end qbasic code---


<snip>
>>>>I have written a program which read all adresses in a 24C16 I2C EEPROM
and
>>>>sends the data to a PC via RS232 (8,N,1 1200 Baud). I have used the
Windows
>>>>Terminal program for receiving the data. But when I receive the data as
a
>>>>text file (ASCII) there is a probelm with the control characters CR, FF,
LF
>>>>etc. They are not read as data. Can I somehow receive the data as a
binary
>>>>file? I have tried to use the various protocols for this purpose, but it
>>>>always ends out with a failure. What do I need to do in my Pic-code to
>>>>support fx. the Xmodem or the Kermit protocol? I hope you are able to
help
>>>>me !
<snip>

1998\02\24@171311 by Marc Heuler

flavicon
face
Hi Steen (Steen Jensen), in <@spam@412565B4.0049B997.00@spam@spamspam_OUTpost01.grundfos.com> on Feb 23 you wrote:

> always ends out with a failure. What do I need to do in my Pic-code to
> support fx. the Xmodem or the Kermit protocol? I hope you are able to help

Go for X-Modem.  It's very simple and can be done in 1-2 pages of asm code.
There are documents around in the internet that explain the protocol
format.

1998\02\24@184159 by paulb

flavicon
face
Morgan Olsson wrote:

> Is it maybe possible to use DOS "copy /b COM1: file" (or how it is)
> command ?

 Sounds plausible.

> Will it exit om CTRL-Z code recieved, switch /b stated?

 Not if you use "/b".

> If not, can we end recieving using CTRL-C from keyboard,

 Mmmm.  Probably...

> or if not run under windows dos-window and kill it from windows?

 Not so good.  May lose characters in buffers, lose sectors ...

> At 10:35 1998-02-23 -0800, Rich wrote:
>>This will double the file size on transfer.

 So what?  Does this matter?  Hex files in Mororola (S19) or Intel (:)
format can be examined, altered, patched, spliced...

>>A terminal program may have to be created (VB using microsoft's comm
>> control).

 Can do that too, but only if ^C won't abort the "copy" command
cleanly.

 Cheers,
       Paul B.

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...