hello,
I want to read the first 5 address's of eeprom then display the 3 highest values in order, I have got as far as reading the address's but im stumped as to how to put the 3 highest values in order and display, any pointers in the right direction would be appreciated i have added a flowchart of what ive got so far
eeprom check
Moderator: Benj
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: eeprom check
Hello,
I think you need to use something like a bubble sort algorithm. I believe Martin wrote one a while ago you should be able to use.
http://www.matrixtsl.com/mmforums/viewt ... 73&#p22074
More discussions on it here.
http://www.matrixtsl.com/mmforums/viewt ... 14&p=56230
I think you need to use something like a bubble sort algorithm. I believe Martin wrote one a while ago you should be able to use.
http://www.matrixtsl.com/mmforums/viewt ... 73&#p22074
More discussions on it here.
http://www.matrixtsl.com/mmforums/viewt ... 14&p=56230
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: eeprom check
hi benj thanks for the reply the links you added involved me on an earlier project and I have already tried to add some of this flowcode to my problem but im going round in circles and cant quite get my head around the bubble sort I will keep trying
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: eeprom check
Hi Bob,
Attached flwochart should make things eaiser for you.
Martin
Attached flwochart should make things eaiser for you.
Martin
- Attachments
-
- eeprom check v2.fcf
- (15.14 KiB) Downloaded 347 times
Martin
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: eeprom check
hi martin
as always many thanks I was taken aback a bit as there isn't any of my original code which from a learning process is a blow BUT hats off to you I now have some thing to work on and hopefully by going through it can get a better understanding thanks
as always many thanks I was taken aback a bit as there isn't any of my original code which from a learning process is a blow BUT hats off to you I now have some thing to work on and hopefully by going through it can get a better understanding thanks
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: eeprom check
Your welcome.
Just because you was trying a different way to me and I changed it, does not necessary mean that your method was wrong.
Martin
There are different ways to achieve the same results.siliconchip wrote: I was taken aback a bit as there isn't any of my original code which from a learning process is a blow
Just because you was trying a different way to me and I changed it, does not necessary mean that your method was wrong.
Martin
Martin