[sdiy] Keyboard with PIC microcontroller
kernel255.mailinglis
kernel255.mailinglis at libero.it
Fri Aug 26 08:38:55 CEST 2005
Hi all,
I have developed a small circuit to read keys of a keyboard with a PIC microcontroller. I have already developed the hardware, but I have some problem in developing the software with Assembler. I checked the PIC's CPU instructions and I haven't found any instruction to do indirect addressing or indexed addressing; I explain it by a simple C example:
#define BufferSize 5
char buffer[BufferSize],data,i;
char *bufferPtr = buffer;
for(i=0;i<BufferSize;i++)
{
data = *(bufferPtr+i);
/* ... do something on data ... */
}
What I'm not able to do with PIC Assembler is to have a pointer to memory, increment it, and read or write the memory location pointed by it. I searched for a special register to do stuff like these (as append for other CPUs) but I haven't found it.
Thank you.
Stefano
____________________________________________________________
6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero!
Scaricalo su INTERNET GRATIS 6X http://www.libero.it
More information about the Synth-diy
mailing list