PDA

View Full Version : How to address I/O pins on 12F509?



Len
- 25th February 2005, 17:26
Hi,
I'm trying to use a 12F509 for the first time. I don't even know how to address the I/O pins. It appeared from the datasheet that they were addressed as 'GPIO', or possibly even PORTB.

I just want to set the TRIS register but PicBasic Pro barfs at both of these:

TRISGPIO=%111111

(or)

TRISB=%111111

Thanks for the point in the right direction!!

Len

Ingvar
- 25th February 2005, 17:32
On all 8-pin pics(that i know of) it's called TRISIO. The port itself is called GPIO.

Len
- 25th February 2005, 17:51
So, to set up an I/O in my variable list, what should it look like?

SERIAL VAR PORTIO.3 ?

mat janssen
- 25th February 2005, 18:04
No,
SERIAL VAR GPIO.3
You can read all of this in the datasheet of your processor you want to use.