Click here to Skip to main content
14,544,882 members

Hardware & Devices

 
PinnedHOW TO ANSWER A QUESTION Pin
Chris Maunder16-Jul-09 3:09
cofounderChris Maunder16-Jul-09 3:09 
PinnedHow to get an answer to your question Pin
Chris Maunder16-Jul-09 3:05
cofounderChris Maunder16-Jul-09 3:05 
QuestionMessage Closed Pin
23-May-20 0:46
MemberMember 1484135923-May-20 0:46 
QuestionSerial port takes a long time to respond Pin
Member 1480999628-Apr-20 6:12
MemberMember 1480999628-Apr-20 6:12 
Hi,

Im currently making an app on windows forms trying to program a micro over UART. I can achieve it, although it is taking a long time to carry out the program. I have used stopwatches to determine it is my read function taking up the majority of the time. When i try to read the micros response from each command I have to wait for all of it, which is why im using a while loop in the code below, if the returned message size is not what i expect. What im wondering is, if there is any way to speed up this process. The response from the micro should be pretty fast, its running at a baudrate of 115200, meaning the whole 512 kb file should in theory take just over 30 seconds to complete, at the moment it is more than double that, at 80 seconds.

private string CheckResponse(int mSize)
{
    //ComPort.DataReceived += SerialPortDataReceived;

    string response;
    int intBuffer;
    intBuffer = ComPort.BytesToRead;
    byte[] byteBuffer = new byte[intBuffer];
    ComPort.Read(byteBuffer, 0, intBuffer);

    response = Encoding.ASCII.GetString(byteBuffer);

    while(response.Length != mSize)
    {
        intBuffer = ComPort.BytesToRead;
        byteBuffer = new byte[intBuffer];
        ComPort.Read(byteBuffer, 0, intBuffer);
        response += Encoding.ASCII.GetString(byteBuffer);
    }

    return response;
}


Any help greatly appreciated.

Blair
AnswerRe: Serial port takes a long time to respond Pin
Richard MacCutchan28-Apr-20 21:36
mveRichard MacCutchan28-Apr-20 21:36 
QuestionDisplay Port to HDMI Pin
Richard Andrew x643-Apr-20 3:16
professionalRichard Andrew x643-Apr-20 3:16 
QuestionGreen shaded images from USB camera... Pin
Kornfeld Eliyahu Peter8-Mar-20 22:43
mveKornfeld Eliyahu Peter8-Mar-20 22:43 
QuestionUSB Problem Pin
Kevin Marois8-Mar-20 14:49
professionalKevin Marois8-Mar-20 14:49 
AnswerMessage Closed Pin
15-Mar-20 20:00
MemberMember 1477387515-Mar-20 20:00 
GeneralRe: USB Problem Pin
Dave Kreskowiak16-Mar-20 4:52
mveDave Kreskowiak16-Mar-20 4:52 
GeneralRe: USB Problem Pin
Richard MacCutchan16-Mar-20 5:24
mveRichard MacCutchan16-Mar-20 5:24 
GeneralRe: USB Problem Pin
Dave Kreskowiak16-Mar-20 7:46
mveDave Kreskowiak16-Mar-20 7:46 
QuestionGemalto IDBridge CT700 (PC PIN PAD) Experience Pin
_Asif_19-Jan-20 23:09
professional_Asif_19-Jan-20 23:09 
AnswerRe: Gemalto IDBridge CT700 (PC PIN PAD) Experience Pin
Richard MacCutchan19-Jan-20 23:17
mveRichard MacCutchan19-Jan-20 23:17 
AnswerRe: Gemalto IDBridge CT700 (PC PIN PAD) Experience Pin
Gerry Schmitz20-Jan-20 9:24
mveGerry Schmitz20-Jan-20 9:24 
QuestionWhat limits how much of the memory a PCIe device can address? Pin
Rakanoth27-Dec-19 7:25
MemberRakanoth27-Dec-19 7:25 
QuestionHard Drive Firmware Pin
Antiquity13118-Oct-19 3:54
MemberAntiquity13118-Oct-19 3:54 
AnswerRe: Hard Drive Firmware Pin
Dave Kreskowiak8-Nov-19 2:40
mveDave Kreskowiak8-Nov-19 2:40 
QuestionTeledyne DALSA BOA SPOT Camera access Pin
Andreas Saurwein26-Sep-19 4:05
MemberAndreas Saurwein26-Sep-19 4:05 
AnswerRe: Teledyne DALSA BOA SPOT Camera access Pin
Richard MacCutchan26-Sep-19 4:45
mveRichard MacCutchan26-Sep-19 4:45 
GeneralRe: Teledyne DALSA BOA SPOT Camera access Pin
Andreas Saurwein26-Sep-19 5:02
MemberAndreas Saurwein26-Sep-19 5:02 
QuestionCommunicating software with hardware Pin
Otekpo Emmanuel24-Sep-19 9:34
MemberOtekpo Emmanuel24-Sep-19 9:34 
AnswerRe: Communicating software with hardware Pin
Andreas Saurwein26-Sep-19 4:06
MemberAndreas Saurwein26-Sep-19 4:06 
AnswerRe: Communicating software with hardware Pin
Gerry Schmitz26-Sep-19 5:09
mveGerry Schmitz26-Sep-19 5:09 
GeneralRe: Communicating software with hardware Pin
Otekpo Emmanuel21-Nov-19 19:48
MemberOtekpo Emmanuel21-Nov-19 19:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.