Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 07 Nov 2005 05:02 PM by  Anonymous
Communicate with Serial Port with LH7A404
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
schung
New Member
New Member
Posts:


--
07 Nov 2005 11:08 AM
    I am wondering if I can dowload a sample code that talks to the serial code using LH7A404?

    The LH7A401 sample application shows how to output characters to PC via TeraTerm, I am looking for something similar but for LH7A404.

    Thanks!
    rmysjr@hotmail.com
    New Member
    New Member
    Posts:


    --
    07 Nov 2005 11:37 AM
    hPort = CreateFile (TEXT("COM1:"), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);

    WriteFile (hPort, szSend, strlen(szSend), &dwWriten, 0); // send to serial. pay attention into what you want to send.
    // if the data has a null in the middle, you cannot use strlen to return the length.
    ReadFile (hPort, &szCommBuffer, 10, &dwRead, NULL); // read 10 bytes from

    CloseHandle (hPort);


    Is that what you need?
    schung
    New Member
    New Member
    Posts:


    --
    07 Nov 2005 04:32 PM
    No it is not. I am looking for a strict TeraTerm printf module/ command.

    I guess what I really need is a serial.c/serial.h that knows how to talk to the 404 and a compiler to compile serial.* into my console programs.
    Anonymous
    Posts:


    --
    07 Nov 2005 05:02 PM
    Hello,

    You should be able to modify the code that you for the 75401 if by looking in the LH7A404 User Manual and find the UART's data register address.

    Thanks,
    You are not authorized to post a reply.