PDA

View Full Version : Help with sending text file from pic



isaac
- 4th August 2006, 13:02
Hello
i just need to draw on your expert advice on this problem that i have got.
i am trying to use my pic18f452 to communicate with a device that accepts text files to activate a test.
when i send say C1 with CR ,LF from hyperterminal there is no responce but
if i save C1 with CR,LF as a file and use send text file from hyperterminal
this works ok.
Is there a way i can do this with the pic ?
At present i send it with Hserout["C1",10,13]
What am i doing wrong here

Regards
Isaac

DynamoBen
- 4th August 2006, 18:09
Try Hserout[$C1,10,13]

This Sends Decimal 193,10,13

Hserout["C1",10,13]

This Sends Decimal 67,49,10,13

Darrel Taylor
- 4th August 2006, 18:22
Hi Isaac,

In Hyperterminal, goto

File | Properties | Settings Tab |ASCII Setup

and check the "Send line ends with line feeds" checkbox.
<br>

isaac
- 5th August 2006, 17:36
Thanks Darrel

Your advice did the trick

Isaac

Docw
- 15th August 2006, 18:23
Is it possible to send a string that has text within quotation marks in a string using the SEROUT command ? I seem to get an error and I need to use this feature to send commands to an external color LCD panel. (BTW, I'm new at PicBasic).

Darrel Taylor
- 15th August 2006, 18:42
Sure can,

The ascii code for double quotes is 34. So you can do this...
SEROUT Pin, Mode, [34,"some text here",34]

Docw
- 15th August 2006, 21:01
Thank you !!! That approach had never occurred to me.