piclist 2002\09\12\014743a >
Thread: Challenge 18F indirect addressing
www.piclist.com/techref/microchip/devices.htm?key=18F
face
flavicon
face BY : Scott Dattalo email (remove spam text)



The 18f452 has some really tricky ways to implement indirect addressing.

#define  MAX_LEN 256

unsigned char arr[MAX_LEN];
unsigned int  sum;

void array_sum(unsigned char len)
{
 unsigned char i;

  sum = 0;
  for(i=0; i<len; i++)
    sum += arr[i];

}

This can obviously be implemented in less than 12 instructions. How about
9?


Scott

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservEraseMEspamspammitvma.mit.edu with SET picList DIGEST in the body



seeking: microchip devices pic
<Pine.LNX.4.44.0209112211310.16870-100000@ruckus.brouhaha.com>

See also: www.piclist.com/techref/microchip/devices.htm?key=18F
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Challenge 18F indirect addressing

month overview.

new search...