Click here to Skip to main content
14,977,402 members
Home / Discussions / Hardware & Devices
   

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 
GeneralMessage Closed Pin
8-Jul-21 1:15
professionalprofessor sibanda8-Jul-21 1:15 
QuestionUSB for Power? Pin
James Curran11-Feb-21 23:30
MemberJames Curran11-Feb-21 23:30 
AnswerRe: USB for Power? Pin
Dave Kreskowiak12-Feb-21 4:51
mveDave Kreskowiak12-Feb-21 4:51 
GeneralRe: USB for Power? Pin
James Curran12-Feb-21 5:35
MemberJames Curran12-Feb-21 5:35 
GeneralRe: USB for Power? Pin
Dave Kreskowiak12-Feb-21 6:07
mveDave Kreskowiak12-Feb-21 6:07 
GeneralRe: USB for Power? Pin
James Curran12-Feb-21 6:47
MemberJames Curran12-Feb-21 6:47 
GeneralRe: USB for Power? Pin
Dave Kreskowiak12-Feb-21 6:53
mveDave Kreskowiak12-Feb-21 6:53 
GeneralRe: USB for Power? Pin
Whyteboar1-Jul-21 6:53
MemberWhyteboar1-Jul-21 6:53 
AnswerRe: USB for Power? Pin
Gerry Schmitz12-Feb-21 8:58
mveGerry Schmitz12-Feb-21 8:58 
GeneralMessage Closed Pin
11-Jul-21 10:03
MemberMember 1520359911-Jul-21 10:03 
GeneralMessage Closed Pin
11-Jul-21 10:04
MemberMember 1520359911-Jul-21 10:04 
QuestionIntermittent 'Pauses' Pin
Kevin Marois31-Jan-21 8:53
professionalKevin Marois31-Jan-21 8:53 
AnswerRe: Intermittent 'Pauses' Pin
Dave Kreskowiak31-Jan-21 10:52
mveDave Kreskowiak31-Jan-21 10:52 
GeneralRe: Intermittent 'Pauses' Pin
Kevin Marois31-Jan-21 11:03
professionalKevin Marois31-Jan-21 11:03 
AnswerRe: Intermittent 'Pauses' Pin
Richard Andrew x6431-Jan-21 12:47
professionalRichard Andrew x6431-Jan-21 12:47 
QuestionMessage Closed Pin
15-Jan-21 19:39
Memberrohit34415-Jan-21 19:39 
AnswerRe: Why Doesn't My Computer Boot When Installing RAM? Pin
Richard MacCutchan15-Jan-21 22:39
mveRichard MacCutchan15-Jan-21 22:39 
AnswerRe: Why Doesn't My Computer Boot When Installing RAM? Pin
Gerry Schmitz16-Jan-21 4:23
mveGerry Schmitz16-Jan-21 4:23 
QuestionGpioTestTool Pin
Bernhard Hiller14-Jan-21 22:16
MemberBernhard Hiller14-Jan-21 22:16 
QuestionMy GLINK USB 2.0 extension cable isn't detecting External Hard Drive, though Pen drive is detected. How do I make sure the EHD is detected? Pin
priyamtheone6-Jan-21 6:41
Memberpriyamtheone6-Jan-21 6:41 
QuestionMessage Closed Pin
25-Dec-20 18:46
MemberFanklan Steven25-Dec-20 18:46 
QuestionAdvice needed for FPGA Pin
Patrice T5-Jul-20 1:16
mvePatrice T5-Jul-20 1:16 
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

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.