Page 1 of 1
eeprom check
Posted: Wed Dec 10, 2014 2:24 pm
by siliconchip
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

Re: eeprom check
Posted: Wed Dec 10, 2014 6:16 pm
by Benj
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.flowcode.co.uk/mmforums/viewt ... 73&#p22074
More discussions on it here.
http://www.flowcode.co.uk/mmforums/viewt ... 14&p=56230
Re: eeprom check
Posted: Wed Dec 10, 2014 7:54 pm
by siliconchip
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
Re: eeprom check
Posted: Wed Dec 10, 2014 8:32 pm
by medelec35
Hi Bob,
Attached flwochart should make things eaiser for you.
Martin
Re: eeprom check
Posted: Wed Dec 10, 2014 9:15 pm
by siliconchip
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

Re: eeprom check
Posted: Wed Dec 10, 2014 9:58 pm
by medelec35
Your welcome.
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
There are different ways to achieve the same results.
Just because you was trying a different way to me and I changed it, does not necessary mean that your method was wrong.
Martin