mikeRho
- 31st December 2007, 04:26
Hi Everyone,
After trying to go the MPLAB assembly language route with complete frustration, I have purchased the melabs U2 programmer and downloaded the Picbasic Pro Demo version (to start out with). I am trying to program a PIC1684A (yes, it's on the Demo Supported Device List) with the following code:
TRISB = %11110000 'set portB pins 4, 5, 6, and 7 as outputs
'define ports as variables
Q1 VAR PORTB.4
Q2 VAR PORTB.5
Q3 VAR PORTB.6
Q4 VAR PORTB.7
'set each pin (portB 4 - 7) HIGH for 25ms in succession and loop
loop:
high Q1
pause 25
low Q1
high Q2
pause 25
low Q2
high Q3
pause 25
low Q3
high Q4
pause 25
low Q4
goto loop
I get the following errors:
Error PROGRAM1.MAC 6:[236] label 'rst?rp' undefined in pass 0
Error PROGRAM1.MAC 6:[226] numeric constant or symbol name expected
Error PROGRAM1.MAC 9:[236] label 'label' undefined in pass 0
Error PROGRAM1.MAC 14:[224] endm directive only for use in macros
Error PROGRAM1.MAC 17:[236] label 'label' undefined in pass 0
Error PROGRAM1.MAC 18:[224] endm directive only for use in macros
Error PROGRAM1.MAC 21:[236] label '1' undefined in pass 0
Error PROGRAM1.MAC 22:[236] label 'regin' undefined in pass 0
Error PROGRAM1.MAC 22:[236] label 'bitin' undefined in pass 0
Error PROGRAM1.MAC 23:[224] endm directive only for use in macros
Error PROGRAM1.MAC 23:[300] too many errors
Mind you, the program got through the compile. It was when the assembly was being read that the errors started. I don't know enough about assembly to have a clue what is going on. OK - the questions:
1) Am I running up against some restriction in the demo?
2) Could my syntax be wrong somewhere (although I don't think it would have gotten past the compiler!)?
3) Is there some wierd bug I don't know about? (I'm running an Athlon XP +3200 with WinXP SP2-pretty standard it would seem)
I will appreciate any help I can get.
Thanks! :-)
Mike
After trying to go the MPLAB assembly language route with complete frustration, I have purchased the melabs U2 programmer and downloaded the Picbasic Pro Demo version (to start out with). I am trying to program a PIC1684A (yes, it's on the Demo Supported Device List) with the following code:
TRISB = %11110000 'set portB pins 4, 5, 6, and 7 as outputs
'define ports as variables
Q1 VAR PORTB.4
Q2 VAR PORTB.5
Q3 VAR PORTB.6
Q4 VAR PORTB.7
'set each pin (portB 4 - 7) HIGH for 25ms in succession and loop
loop:
high Q1
pause 25
low Q1
high Q2
pause 25
low Q2
high Q3
pause 25
low Q3
high Q4
pause 25
low Q4
goto loop
I get the following errors:
Error PROGRAM1.MAC 6:[236] label 'rst?rp' undefined in pass 0
Error PROGRAM1.MAC 6:[226] numeric constant or symbol name expected
Error PROGRAM1.MAC 9:[236] label 'label' undefined in pass 0
Error PROGRAM1.MAC 14:[224] endm directive only for use in macros
Error PROGRAM1.MAC 17:[236] label 'label' undefined in pass 0
Error PROGRAM1.MAC 18:[224] endm directive only for use in macros
Error PROGRAM1.MAC 21:[236] label '1' undefined in pass 0
Error PROGRAM1.MAC 22:[236] label 'regin' undefined in pass 0
Error PROGRAM1.MAC 22:[236] label 'bitin' undefined in pass 0
Error PROGRAM1.MAC 23:[224] endm directive only for use in macros
Error PROGRAM1.MAC 23:[300] too many errors
Mind you, the program got through the compile. It was when the assembly was being read that the errors started. I don't know enough about assembly to have a clue what is going on. OK - the questions:
1) Am I running up against some restriction in the demo?
2) Could my syntax be wrong somewhere (although I don't think it would have gotten past the compiler!)?
3) Is there some wierd bug I don't know about? (I'm running an Athlon XP +3200 with WinXP SP2-pretty standard it would seem)
I will appreciate any help I can get.
Thanks! :-)
Mike