Median algorithm for 8051



I need to find the median of a 64 element unsigned int array. I would use
qsort() but my Keil compiler doesn't support it. I'm using the small model
so the algorithm should be non-recursive. Just to make it interesting I have
less than 500 microseconds to do the calc on a 25 MHz Silabs C8051F410.

The data is obtained sequentially from a ADC so that it may be possible to
do some of the calculation while the ADC is still working.

I would welcome any suggestions/code etc.

Arthur


.



Relevant Pages

  • Re: Median algorithm for 8051
    ... would use qsortbut my Keil compiler doesn't support it. ... The data is obtained sequentially from a ADC so that it may be ... doesn't support real C, since qsort is a part of the library. ...
    (comp.arch.embedded)
  • Re: Median algorithm for 8051
    ... would use qsortbut my Keil compiler doesn't support it. ... The data is obtained sequentially from a ADC so that it may be ... doesn't support real C, since qsort is a part of the library. ...
    (comp.arch.embedded)
  • Re: Median algorithm for 8051
    ... qsortbut my Keil compiler doesn't support it. ... I'm using the small model so the algorithm should be non-recursive. ... The data is obtained sequentially from a ADC so that it may be possible to do some of the calculation while the ADC is still working. ...
    (comp.arch.embedded)
  • Re: Median algorithm for 8051
    ... qsortbut my Keil compiler doesn't support it. ... The data is obtained sequentially from a ADC so that it may be possible ... I will try the Wirth algorithm and see how long it takes! ...
    (comp.arch.embedded)
  • Re: District SLs
    ... not to go around running Scout events. ... in what way might an ADC Scouts support my SL? ... Supporting adults not running a section programme. ...
    (uk.rec.scouting)