Malcom
Exactly what didn't work? I actually did cut and paste this exact code and compiled based on a 16F877A:Originally Posted by malc-c
And it compiled just fine. I just haven't programmed it into a pic to see what happens.Code:patt1 data 17,16,1,2,4,8,16,32,64,128,128,64,32,16,8,4,2,1 patt2 data 9,8,129,66,36,24,24,36,66,129 patt3 data 17,16,1,3,2,6,4,12,8,24,16,48,32,96,64,192,128,0 patt4 data 17,16,1,128,2,64,4,32,8,16,8,32,4,64,2,128,1,0 patt5 data 13,12,24,60,126,255,231,195,129,0,129,195,231,255 patt6 data 14,13,1,2,4,8,17,34,68,136,16,32,64,128,0 patt7 data 9,8,128,64,32,16,8,4,2,1 steps VAR BYTE counts VAR BYTE temp VAR BYTE READ Patt1, steps FOR counts = 1 TO steps READ (Patt1 + counts), temp PORTB = temp NEXT counts
-----------------------------------------------------------------------------------
Additionally, in reference to the following items:
When using the DATA command with a {label}, what is being done by PBP is the label becomes a constant with a vaule equal to the Address. So there should not be any reason that the read command does not recognized the label as a valid Address.{Label} DATA {@Location,}Constant{,Constant...}
If the optional Location value is omitted, the first DATA
statement starts storing at address 0 and subsequent statements store
at the following locations.
READ Address,Var
Read a byte from the on-chip EEPROM at the specified Address and
stores the result in Var.
Possibly posting you actual code and which PIC your using could help us puzzle this out for you. Also, the exact error/warning message you get when it compiles will also help.
Steve
Bookmarks