piclist 2002\09\12\014743a >
Thread: Challenge 18F indirect addressing
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


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

seeking: microchip devices pic

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...