I'm having trouble with a code error during compile of a test program I'm writing. Although I can't see what's wrong with the SHIFTOUT line, the PBP compiler says it excpected a ] when as far as I can see it's all there.
I also have two pieces of counting code. One 'up' count is not incrementing at 99 but zeroing, the other 'down' code works ok but it's virtually the same code.
Also, If I add any type of config lines then the compiler complains that it's 'Overwriting previous address contents'
I also have two pieces of counting code. One 'up' count is not incrementing at 99 but zeroing, the other 'down' code works ok but it's virtually the same code.
Also, If I add any type of config lines then the compiler complains that it's 'Overwriting previous address contents'
Code:
shiftout 2,3,0,[ 07,2B,02,0C ]
up:
counter[0]=counter[0]+1
if counter[0]>99 then
counter[0]=0
counter[1]=counter[1]+1
if counter[1]>99 then
counter[1]=0
counter[2]=counter[2]+1
if counter[2]>99 then
counter[2]=0
counter[3]=counter[3]+1
if counter[3]>99 then
counter[3]=0 ;reset to zero
endif
endif
endif
endif
return
down:
counter[0]=counter[0]-1
if counter[0]<1 then
counter[0]=0
counter[1]=counter[1]-1
if counter[1]<1 then
counter[1]=99
counter[2]=counter[2]-1
if counter[2]<1 then
counter[2]=99
counter[3]=counter[3]-1
if counter[3]<1 then
counter[3]=99
endif
endif
endif
endif
return