Hi Melanie,
I have PicBasicPro version 2.46
PIC: 16f84a & 16f877a
thx
chip
Hi Melanie,
I have PicBasicPro version 2.46
PIC: 16f84a & 16f877a
thx
chip
I get...
[235] Opcode Expected Instead of 'LED'
...which is pretty understandable since your posted code isn't complete!
"code complete"
--------------------
DEFINE OSC 4
DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 3
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 2
ASM
ORG 0X0C
CONT RES 2
BSF STATUS,5
movlw 00000b
MOVWF TRISA
MOVLW 00000000B
MOVWF TRISB
BCF STATUS,5
BSF PORTA,0
CALL DELAY
BCF PORTA,0
CALL DELAY
DELAY
D1 DECFSZ CONT,1
GOTO D1
D2 DECFSZ CONT+1,1
GOTO D2
RETURN
END
ENDASM
IF (PORTA.0 = 1) THEN LIGHT
IF (PORTA.0 = 0) THEN NO_LIGHT
LIGHT:
LCDOUT $FE,1,"LIGHT"
NO_LIGHT:
LCDOUT $FE,1,"NO_LIGHT"
Fisrtly your code isn't going to work... you got serious logical errors (the code is a bit of a mish-mash... have you simply cut & paste or do you have a plan and know what you're doing?)... but that aside...
If you're going to mix Assembler and PICBasic you can't specify a low-order ORIGIN (your ORG statement), because PICBasic will start assembling it's code down there. If you really need to specify a fixed location for your code, dump it in high memory space, well away from where PICBasic will place it's code.
Bookmarks