Click here to Skip to main content
15,907,392 members
Home / Discussions / Algorithms
   

Algorithms

 
SuggestionRe: Serial port takes a long time to respond Pin
Greg Utas28-Apr-20 4:52
professionalGreg Utas28-Apr-20 4:52 
AnswerRe: Serial port takes a long time to respond Pin
Gerry Schmitz28-Apr-20 7:06
mveGerry Schmitz28-Apr-20 7:06 
QuestionAlgorithm Pin
Babayomi26-Apr-20 4:48
Babayomi26-Apr-20 4:48 
AnswerRe: Algorithm Pin
Greg Utas26-Apr-20 5:03
professionalGreg Utas26-Apr-20 5:03 
GeneralRe: Algorithm Pin
Babayomi26-Apr-20 12:09
Babayomi26-Apr-20 12:09 
QuestionAlgorithm to divide an array efficiently... to sub groups where each group is smaller than X Pin
fcbman24-Apr-20 4:02
fcbman24-Apr-20 4:02 
AnswerRe: Algorithm to divide an array efficiently... to sub groups where each group is smaller than X Pin
Gerry Schmitz25-Apr-20 11:59
mveGerry Schmitz25-Apr-20 11:59 
QuestionHow to get faster serial port data transfer on windows forms Pin
Member 1480999622-Apr-20 3:15
Member 1480999622-Apr-20 3:15 
Hi all,

I have been working on uploading a .bin file to a micro with basically a hello world project inside. Although i find that it could definitely be faster when uploading the contents of the file to the micros ram, where it then copies it to flash.

Where this data is transferred is located in the code below:

for (int i = 0; i < Page.numPages; i++)
{
Write2Ram("536871680", "512");
ComPort.Write(code, start_Address_Code, 512);
Write2Ram("536872192", "512");
ComPort.Write(code, start_Address_Code + Page.ram_Size, 512);
copy2Flash(flash_Address, "536871680", "1024");

int_Address = int.Parse(flash_Address);
flash_Address = (int_Address + Page.flash_Size).ToString();

start_Address_Code += Page.flash_Size;

backgroundWorker1.ReportProgress(0);
}

Is there anything that sticks out that could be improved for speed?

Increasing the baud rate increases the speed for sure, but not as quickly as some other applications are capable of and i dont really understand why.

This is my first windows forms project and i am a little new to C#.

@ 460800 baud rate it currently takes 60 seconds to upload a roughly 500kb file.

Many thanks,
Blair
AnswerRe: How to get faster serial port data transfer on windows forms Pin
k505422-Apr-20 4:26
mvek505422-Apr-20 4:26 
GeneralRe: How to get faster serial port data transfer on windows forms Pin
Member 1480999623-Apr-20 0:58
Member 1480999623-Apr-20 0:58 
AnswerRe: How to get faster serial port data transfer on windows forms Pin
Gerry Schmitz22-Apr-20 9:05
mveGerry Schmitz22-Apr-20 9:05 
GeneralRe: How to get faster serial port data transfer on windows forms Pin
Member 1480999622-Apr-20 22:32
Member 1480999622-Apr-20 22:32 
QuestionHow to generate a network where nodes have certain number of neighbors on average Pin
Meanwhale7-Apr-20 20:15
Meanwhale7-Apr-20 20:15 
AnswerRe: How to generate a grid where nodes have certain number of neighbors on average Pin
Gerry Schmitz9-Apr-20 11:01
mveGerry Schmitz9-Apr-20 11:01 
GeneralRe: How to generate a grid where nodes have certain number of neighbors on average Pin
Meanwhale9-Apr-20 19:46
Meanwhale9-Apr-20 19:46 
GeneralRe: How to generate a grid where nodes have certain number of neighbors on average Pin
Meanwhale9-Apr-20 19:53
Meanwhale9-Apr-20 19:53 
Question>net Pin
Member 147935355-Apr-20 19:51
Member 147935355-Apr-20 19:51 
AnswerRe: >net Pin
Richard MacCutchan5-Apr-20 21:31
mveRichard MacCutchan5-Apr-20 21:31 
QuestionLooking for an optimized algorithm to create a nested dictionaries and dump the same into yam format Pin
Member 120989893-Apr-20 9:25
Member 120989893-Apr-20 9:25 
AnswerRe: Looking for an optimized algorithm to create a nested dictionaries and dump the same into yam format Pin
Richard MacCutchan3-Apr-20 21:55
mveRichard MacCutchan3-Apr-20 21:55 
QuestionString reversal algorithm Pin
Pita3227-Mar-20 13:36
Pita3227-Mar-20 13:36 
AnswerRe: String reversal algorithm Pin
k505427-Mar-20 14:26
mvek505427-Mar-20 14:26 
RantRe: String reversal algorithm Pin
Richard Deeming31-Mar-20 1:14
mveRichard Deeming31-Mar-20 1:14 
GeneralRe: String reversal algorithm Pin
Richard MacCutchan31-Mar-20 2:32
mveRichard MacCutchan31-Mar-20 2:32 
GeneralRe: String reversal algorithm Pin
Member 147935355-Apr-20 19:52
Member 147935355-Apr-20 19:52 

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.