PDA

View Full Version : ECIO on 16F777



kenif
- 14th October 2010, 06:27
Hi, how do I config ECIO on 16F777

Searched forums, all examples of ECIO are on 18s.

This a 16F777 with an external oscillator on OSC1, and now run out of pins.
I need to config ECIO to turn off OSC2 and use the pin as RA6.

Simple enough, but the 16F777 INC clock list does not have ECIO and I cannot decode the anagrams. It's 20MHZ, not an R/C and MCS/PBP does not like extrc_io or extclk.

_EXTRC_CLKOUT EQU H'3FFF'
_EXTRC_IO EQU H'3FFE'
_INTRC_CLKOUT EQU H'3FFD'
_INTRC_IO EQU H'3FFC'
_EXTCLK EQU H'3FEF'
_HS_OSC EQU H'3FEE'
_XT_OSC EQU H'3FED'
_LP_OSC EQU H'3FEC'

Thanks for your help.

mackrackit
- 14th October 2010, 09:53
Something does seem to be messed up between the data sheet and the micrchip *.inc.
Anyways, this compiles in code space with MCS

@ __config _CONFIG1, _EXTCLK & _WDT_ON & _CP_OFF
and when the hex is imported into MPLAB it shows the Oscillator as
EXTCLK as Port IO.

Other than that I do not have a way to test, do not have that chip.

kenif
- 14th October 2010, 18:26
Thanks, Dave.

> hex is imported into MPLAB it shows the Oscillator as EXTCLK as Port IO.
Works great with MPASM, and my scope agrees with you.

Tried the available options and the codespace answer for PBP compiler seems to be:

@ DEVICE PIC16F777, EXTRC_OSC_NOCLKOUT

R/C?