PDA

View Full Version : HOW do you initialize PortC to normal I/O??



Len
- 11th June 2005, 18:33
Hi folks,
I'm using a PIC16F917 with PicBasic Pro for the first time (but my problem occurs w/ a 877 too), and I just want to make PortC behave like a normal output port! As it powers up, apparently the LCD peripherals come up configured which disallow me writing to PortC.0, C.1 & c.2. I have set TRISC to %00000000 to no avail.

Please help!
Thanks much
Len

mister_e
- 11th June 2005, 18:48
i hope i read the datasheet right.

LCDCON=%01000000

Len
- 11th June 2005, 18:56
I tried that, and PBP gave me an error. Since LCDCON lives at 107h, in desperation, I added "LCDCON equ 107h" to the M16F91X.INC file, and then tried it again:

LCDCON = 0

again, and it worked! ;)

Thanks mucho.
Len