Some questions about the K8015 PIC

I understand that the PIC’s GPIOs 0 thru 3 are used to sense the timer operation mode, but I assume this is read on startup. Do these PIC pins have different functions during normal operation, that I could make use of?

What is the purpose of R6? I initially thought it would be to ensure GP3 was kept high, but of course GP3 can be pulled low by SW2. So why is R6 needed?

If the module is configured for the “timer with early re-trigger prevention mode”, is it possible to determine when delay2 has elapsed?

Many thanks,
David.

R6 is used to pull-up the reset line, to avoid floating noise on it, this input.

You can’t use the I/O for other purposes, there are read “on the fly”.

Thanks for your response, however I’m a little confused by it.

GP3 is either going to be at a logic 1 or 0 depending on SW2. So surely it cannot be configured as MCLR- in normal operations, can it? So this suggests to me that GP3 is configured as a GPIO in normal operations, as the second part of your response implies.

And if at some point during power-on-reset GP3 is configured as MCLR-, and SW2 is set such that GP3 is not grounded (so there is a risk of it floating and there being noise), the PIC has an internal pull-up. So R6 seems to be redundant.

See datasheet --> MCLR pin doesn’t have an internal pull-up.

Perhaps I have misunderstood the datasheet? I am looking at datasheetcatalog.org/datashe … 40139e.pdf. On the first page, under Peripheral Features, it says “Internal pull-up on MCLR pin”. Later on it mentions this internal pull-up several times in relation to MCLR, and that while this is software configurable it is always enabled if GP3 is configured as MCLR.

However I can understand why R6 has been added if the designers thought that the input could be left floating.