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); }
Writing to ROM is normally (by definition) a bit tricky.
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?
He's already posted the same thing on the TI forum (twice), where he was not only told that it was off-topic, but was also given the name of the correct forum!
e2e.ti.com/.../793381.aspx
So it really is hopeless to post this:
www.catb.org/.../smart-questions.html
Someone, not so long ago, said:
There is hope. It may or may not be fulfilled...
Are you turning into a realist?
Shhh. I won't tell anybody ;)