PDA

View Full Version : 16F636 Picbasic pro 2.60 / MPLAB 8.43 / Windows 7



mathubbard
- 19th February 2010, 15:03
Hi, I think I'm doing something silly:

"
TRISC = %00000000 ' Set PORTC to all output
TRISA = %11111111 ' Set PORTA to all inputs

mainloop: Pause 250
PortC.0=0
PortC.1=0
PortC.2=0

Pause 250
PortC.0=1
Pause 250
PortC.1=1
Pause 250
PortC.2=1
Goto mainloop

End
"

I expect all the PortC ouputs to turn off, and then ouput 0, output 1, and output to turn on in series.... until they're all on.

In practice the outputs turn on in series.... but turn off the other outputs i.e. only one output is on at a time.

I've tried setting things like 'CMCON = 7' but this gives "ERROR: Unable to execute mpasmwin.Error[113] C:\PBP\PBPPIC14.LIB 449 : Symbol not previously defined (CMCON)
Error[113] C:\PBP\PBPPIC14.LIB 463 : Symbol not previously defined (CMCON)
Error[113] C:\PBP\PBPPIC14.LIB 477 : Symbol not previously defined (CMCON)
Error[113] C:\PBP\PBPPIC14.LIB 491 : Symbol not previously defined (CMCON)
Error[113] C:\PBP\PBPPIC14.LIB 899 : Symbol not previously defined (CMCON)
Halting build on first failure as requested.
"

Any help would be appreciated. Thanks.

mathubbard
- 19th February 2010, 15:50
Fixed.

CMCON0=7

Thanks.