how to initialize rom memory

Status
Not open for further replies.

chasekan@gmail.com

Member level 1
Joined
Jun 23, 2013
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Visit site
Activity points
255
Code:
  #include <htc.h>
   rom unsigned char mydata[]="hello";
void main(void)
 {
   // Write your code here
   unsigned char z;
	 TRISB =0;
	 for(z=0;z<5;z++)
	 {
		 PORTB=mydata[z];
	 }
	 while (1);
 }

hi i am using hi tech c compiler,to store the data in the program code space, here i ve used rom keyword, is the way correct or i ve to use any other notation....it shows the below error msg....if possible suggest me some material for to get knowledge in PIC controller using Hi tech c compiler.

HTML:
Warning at file ../main.c line 9 column 5: (374) missing basic type; int assumed
Error at file ../main.c line 9 column 5: (314) ";" expected
make: *** [main.p1] Error 1
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…