bwaxing
- 28th February 2011, 12:26
hi,m learning pic basic pro programming and i developed code which will turn on 8 LEDs which are connected to PORTB of a PIC microcontroller.When the project is started (or when reset), the LEDs scroll to the right with a 250ms delay between each output. The sample code developed is as follows
j var byte 'define variable jam as byte type
trisb=0 'set port direction
mwanzo: 'start of the loop
j=128 'initialize counter
while j<1
PORTB=j 'send the counter value to the port
pause 250 'delay for 250ms
j=j>>1 'shift right once
wend
goto mwanzo 'repeat once again
end
when i compiled the program on MCS IDE i with pic16f877 selected i get the following errors:
Error LED_SC~1.ASM 48:[255] undifined symbol 'chk?rp'
Error LED_SC~1.ASM 48:[255] undifined symbol 'move?cb'
Error LED_SC~1.ASM 52:[231] attempt to redifine 'label?l'
Error LED_SC~1.ASM 51:[255] undifined symbol 'chk?rp'
Error LED_SC~1.ASM 51:[255] undifined symbol 'move?cb'
Error LED_SC~1.ASM 52:[231] attempt to redifine 'label?l'
Error LED_SC~1.ASM 53:[255] undifined symbol 'cpmge?bcl'
Fatal LED_SC~1.ASM 53:[300] to many errors
when i change the pic selection to 16f628 the program run successful!!but development board im using have pic16f877 and i got the same type of errors in other programs i developed although some other program compiled secessfully. I need help on this
j var byte 'define variable jam as byte type
trisb=0 'set port direction
mwanzo: 'start of the loop
j=128 'initialize counter
while j<1
PORTB=j 'send the counter value to the port
pause 250 'delay for 250ms
j=j>>1 'shift right once
wend
goto mwanzo 'repeat once again
end
when i compiled the program on MCS IDE i with pic16f877 selected i get the following errors:
Error LED_SC~1.ASM 48:[255] undifined symbol 'chk?rp'
Error LED_SC~1.ASM 48:[255] undifined symbol 'move?cb'
Error LED_SC~1.ASM 52:[231] attempt to redifine 'label?l'
Error LED_SC~1.ASM 51:[255] undifined symbol 'chk?rp'
Error LED_SC~1.ASM 51:[255] undifined symbol 'move?cb'
Error LED_SC~1.ASM 52:[231] attempt to redifine 'label?l'
Error LED_SC~1.ASM 53:[255] undifined symbol 'cpmge?bcl'
Fatal LED_SC~1.ASM 53:[300] to many errors
when i change the pic selection to 16f628 the program run successful!!but development board im using have pic16f877 and i got the same type of errors in other programs i developed although some other program compiled secessfully. I need help on this