Hi,
The PIC12F509 doesn't have a PortA and therefor no TRISA or PortA registers, so you get an error when you try to access things which are not available.
/Henrik.
Hi,
The PIC12F509 doesn't have a PortA and therefor no TRISA or PortA registers, so you get an error when you try to access things which are not available.
/Henrik.
Thanks Henrik,
How does PBP3 address the single port of the 12F509?
Andy
I, probably wrongly, assumed that it would use TRISA.
I did try to edit the sample program for the 18F452 just to change the outputs but nothing changed. We'll leave that problem again until later.
Last edited by AndyFreestone; - 6th April 2013 at 17:42.
As it does with any other register - by the registers name, which on the 12F509 is either PortB or GPIO for the actual port and TRISB or TRISGPIO for the "direction".
You know, assumption is the mother of all f**k-ups so never assume anything - a simple look at the datasheet for the device would have told you that there is no PortA.
/Henrik.
Like I said, on the 12F509 THE PORT is named PortB or GPIO not PortA.
Otherwise you had it right - HIGH PortB.0 or HIGH GPIO.0 instead of HIGH PortA.0
EDIT: I'm sorry, make that GPIO.0 only, PortB was for the 12F605 only which share the same datasheet.
Last edited by HenrikOlsson; - 6th April 2013 at 18:56.
Bookmarks