Hi All,
I can't seem to assign pin A.0 to my code, it gives me a syntax error. (sorry, i'm not near the PC to cut''n'paste a screenshot of the error).
For example, I'm assigning "pinA.0 = bit0" in my code.
Am i perhaps using the wrong "pin" syntax for the 20X2?
However, all other pins B.0 to B.7 and C.0 to C.7 (except c.6 which is fixed input) can be assigned to my 'bits' and the code works.
It just seems to be something unique about A.0 that prevents me using it at the moment.
All i am doing is assigning all pins on B & C port as well as A.0 to the 16 bits of a word variable. (this works perfectly on my 28X2 and 40X2 correctly).
This code example works on my 28X2 and 40X2 perfectly.... in fact this also works on the 20X2 when using only the B & C ports....but trying to assign A.0 is when i get the error.
(YES, i have configured the appropriate ports as outputs and set them all to "0" at the beginning of code etc etc).
I know pin A.0 is fixed output and also used for SEROUT programming use.
So, is there something i need to do to access A.0 to use as an output?
I thought it might be "disconnect" but that seems to be for SERIN pins.
Anyone?
;-)
I can't seem to assign pin A.0 to my code, it gives me a syntax error. (sorry, i'm not near the PC to cut''n'paste a screenshot of the error).
For example, I'm assigning "pinA.0 = bit0" in my code.
Am i perhaps using the wrong "pin" syntax for the 20X2?
However, all other pins B.0 to B.7 and C.0 to C.7 (except c.6 which is fixed input) can be assigned to my 'bits' and the code works.
It just seems to be something unique about A.0 that prevents me using it at the moment.
All i am doing is assigning all pins on B & C port as well as A.0 to the 16 bits of a word variable. (this works perfectly on my 28X2 and 40X2 correctly).
This code example works on my 28X2 and 40X2 perfectly.... in fact this also works on the 20X2 when using only the B & C ports....but trying to assign A.0 is when i get the error.
(YES, i have configured the appropriate ports as outputs and set them all to "0" at the beginning of code etc etc).
Code:
#picaxe 28X2
#no_table
#no_data
setfreq m8
symbol Zport = w0
dirsB = %11111111 'set PortB to all OUTPUTS
dirsC = %11111111 'set PortC to all OUTPUTS
outpinsB = $00 'clear PortB otputs to all 0's
outpinsC = $00 'clear PortC otputs to all 0's
do
for Zport = $0000 to $FFFF 'create a 16bit binary counter
pinC.0 = bit0 'joining together PortB + PortC, now known as "Zport"
pinC.1 = bit1 'these could be ANY bits you prefer, using bits from Port A,B,C & D etc...
pinC.2 = bit2
pinC.3 = bit3
pinC.4 = bit4
pinC.5 = bit5
pinC.6 = bit6
pinC.7 = bit7
pinB.0 = bit8
pinB.1 = bit9
pinB.2 = bit10
pinB.3 = bit11
pinB.4 = bit12
pinB.5 = bit13
pinB.6 = bit14
pinB.7 = bit15
next Zport
loop
I know pin A.0 is fixed output and also used for SEROUT programming use.
So, is there something i need to do to access A.0 to use as an output?
I thought it might be "disconnect" but that seems to be for SERIN pins.
Anyone?
;-)