Page 1 of 1

P16F1937 port RA.6 config. as general I/O issue

Posted: Mon Oct 14, 2013 9:04 pm
by fotios
I think the same issue applies to P16F1936 and P16F1939. When we select the internal oscillator module of mcu in configuration window, we do that to get RA.6 - RA.7 pins free for use as general I/O ports. Unfortunatelly this applies only to port RA.7 while RA.6 still operates as oscillator output. To turn RA.6 as general I/O pin, the bit CLKOUTEN of configuration word 1 must be set to "1". Fortunatelly FlowCode is very flexible in configuration settings and so we should open the "PICmicro Configuration" table in expert mode. At the down right side of table we can see the two configuration words 1 and 2. By default the values are shown in hex format and we should tick on the "Bin" selection and then click on CONFIG1 button. A window opens where we can change the CONFIG1 word settings. For the instance, i.e. to dissable the CLKOUTEN bit, simply we have to change the 11th bit from 0 to 1and the port RA.6 is disconected from the internal oscillator block. From now on RA.6 can be used like RA.7 as general I/O port.
EDIT:
Kenrix2 in the next post describes a simplest method to disable the clock out in RA.6 port. Sorry for the confusion.

Re: P16F1937 port RA.6 config. as general I/O issue

Posted: Mon Oct 14, 2013 9:56 pm
by Kenrix2
Or just disable the "Clock Out Enable bit:" It is the eighth drop down box when using the PIC16F1937. If your version of PPP does not have this then you need to update it.

Re: P16F1937 port RA.6 config. as general I/O issue

Posted: Tue Oct 15, 2013 7:08 am
by fotios
Yes, you are right. PPP i use is the latest version, simply i didn't noticed the "Clock Out Enable bit" on config table.
Thanks by any way.