getting in writing in ROM #include <p18f4580.h> #pragma config WDT = OFF #pragma config OSC= HS #pragma config PBADEN=OFF #pragma config PWRT=ON #pragma config LVP=OFF
void main() { unsigned int V,I,lut[7]; const ROM lut[7]={0,1,2,3,3,3,3}; //ecc V=5; I=lut[V]; while(1); }
You really have no idea what you're talking about, do you?
1) that's a PIC controller you're trying to program for, so you're entirely in the wrong place for asking questions about it 2) even on a PIC, a platform reputed for, well, let's call them "eccentric" interpretations of the term "C compiler", I strongly doubt those scribbles can possibly be acceptable C. 3) If you want an answer, how about you actually ask a question? Or at least tell what "error" that was?