Searching \ for '[PIC] Configuring RA2 for digital I/O on 16F88' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/ios.htm?key=i%2Fo
Search entire site for: 'Configuring RA2 for digital I/O on 16F88'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Configuring RA2 for digital I/O on 16F88'
2005\03\29@204807 by Nick Kennedy

flavicon
face
Hello -

I'm a hobbyist and relative newcomer to the PIC.  In my current 16F88
program, I'm trying to use PORTA pin RA2 as a digital output.  Maybe a
bad choice, as this pin is multiplexed several ways.

I've cleared the ANSEL bits to zero, to claim the pin from the ADC.  I
believe the comparator functions have default power up configurations
that should be acceptable.  I've set (er .. cleared) the appropriate
TRISA bits to zeros to make the pins outputs.  But when I use the bsf
PORTA, 2 instruction, RA2 does not change state.  This is observed both
in hardware and in the MPLAB debugger looking at PORTA.

What am I failing to configure?

Thanks,

Nick
in Arkansas

2005\03\29@211839 by rosoftwarecontrol

flavicon
face
TRISA2 clear is missing

is missing

----- Original Message -----
From: "Nick Kennedy" <spam_OUTkennedysTakeThisOuTspamcox-internet.com>
To: "'Microcontroller discussion list - Public.'" <.....piclistKILLspamspam@spam@mit.edu>
Sent: Tuesday, March 29, 2005 8:46 PM
Subject: [PIC] Configuring RA2 for digital I/O on 16F88


{Quote hidden}

> --

2005\03\29@224426 by Peter van Hoof

flavicon
face
this works!

; configure port a as digital i/o
bcf status,6  ; select bank 1
bsf status,5  ; select bank 1
MOVLW 0x00
MOVWF ANSEL
; initialize data direction of ra2 as output
bcf trisa,2
bcf status,6  ; select bank 0
bcf status,5  ; select bank 0
;write 1 to ra2
bsf porta,2


Peter

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...