Help with sending text file from pic


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2004
    Location
    brighton
    Posts
    149

    Question Help with sending text file from pic

    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

  2. #2
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382

    Default

    Try Hserout[$C1,10,13]

    This Sends Decimal 193,10,13

    Hserout["C1",10,13]

    This Sends Decimal 67,49,10,13

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Hi Isaac,

    In Hyperterminal, goto

    File | Properties | Settings Tab |ASCII Setup

    and check the "Send line ends with line feeds" checkbox.

    DT

  4. #4
    Join Date
    May 2004
    Location
    brighton
    Posts
    149

    Thumbs up

    Thanks Darrel

    Your advice did the trick

    Isaac

  5. #5
    Docw's Avatar
    Docw Guest

    Default Sending text within quotes e.g. "xxxx" within a string

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

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Sure can,

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

  7. #7
    Docw's Avatar
    Docw Guest

    Default Sending text within quotes e.g. "xxxx" within a string

    Thank you !!! That approach had never occurred to me.

Similar Threads

  1. Automatic VB6 to pic serial connection
    By arniepj in forum Code Examples
    Replies: 13
    Last Post: - 10th January 2008, 08:57
  2. Best way to store text in a pic
    By atwoz in forum General
    Replies: 3
    Last Post: - 6th December 2007, 15:50
  3. VB sending serial data to PIC
    By Tissy in forum Serial
    Replies: 7
    Last Post: - 8th March 2006, 19:31
  4. Need help on pic to pic flow control (simple problem I think)
    By khufumen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th January 2006, 01:34
  5. Help, problems first time with 18F452 PIC
    By MikeTamu in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th August 2005, 21:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts