Hi I tried this:
dir GP0 out
dir GP1 out
dir GP2 out
compiles OK GCB, but using MPASM:
Error G:\DEV\PIC\GCBASIC\COMPILED.ASM 72 : Argument out of range (1 not between 5 and 9)
Error G:\DEV\PIC\GCBASIC\COMPILED.ASM 74 : Argument out of range (2 not between 5 and 9)
By manual assembler it works:
movlw 0x08
TRIS GPIO 'GP0, GP1, GP2 as output.
Anyone please advise how I should set ports for output on this limited micro using GCbasic? Or must one use the ASM method above?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi I tried this:
dir GP0 out
dir GP1 out
dir GP2 out
compiles OK GCB, but using MPASM:
Error G:\DEV\PIC\GCBASIC\COMPILED.ASM 72 : Argument out of range (1 not between 5 and 9)
Error G:\DEV\PIC\GCBASIC\COMPILED.ASM 74 : Argument out of range (2 not between 5 and 9)
By manual assembler it works:
movlw 0x08
TRIS GPIO 'GP0, GP1, GP2 as output.
Anyone please advise how I should set ports for output on this limited micro using GCbasic? Or must one use the ASM method above?
Thanks.
GCBasic syntax for the Baseline (i.e.12bit including the 10f) PIC devices, the TRIS or GPIO Port direction needs to be set all at once like your asm:
dir GPIO b'001000'