Page 1 of 1

PIC16F18875 - mappable pins

Posted: Sun Oct 15, 2017 2:18 pm
by Steve001
Afternoon All,

I am using the above device and found that the TX pin for the EUSART is mapable independent upon the function

see this post

viewtopic.php?f=68&p=84523#p84517

is this something that can be done ?

Steve

Re: PIC16F18875 - mappable pins

Posted: Mon Oct 16, 2017 10:16 am
by Benj
Hi Steve,

I believe this has already been done on the 16F18875. It seems to already be in the files here.

viewtopic.php?f=63&t=18760

I'll double check that there isn't a problem lurking.

Re: PIC16F18875 - mappable pins

Posted: Mon Oct 16, 2017 12:38 pm
by Steve001
Hi Ben

I am using that update, I could be doing something wrong :mrgreen:
Steve

Re: PIC16F18875 - mappable pins

Posted: Thu Oct 19, 2017 8:17 pm
by Steve001
found it helps if you look properly ! :oops: :roll:

one question can you turn off RXR & RX ? as I am not using these pins

Steve

Re: PIC16F18875 - mappable pins

Posted: Mon Oct 23, 2017 10:28 am
by Benj
Hi Steve,
one question can you turn off RXR & RX ? as I am not using these pins
After initialising the UART component you can use this line of C code to disable the RX functionality, this should give you I/O type control back over the RX pin.


Disable RX for UART1

Code: Select all

cr_bit(RCSTA, CREN);
Disable RX for UART2

Code: Select all

cr_bit(MX_UART2_RCSTA, CREN);

Re: PIC16F18875 - mappable pins

Posted: Tue Oct 24, 2017 12:44 pm
by Steve001
thanks ben

Steve

Re: PIC16F18875 - mappable pins

Posted: Sun Dec 03, 2017 9:49 am
by Steve001
I could be wrong with this one ...

When using the PPS settings

http://ww1.microchip.com/downloads/en/D ... 01802D.pdf

Reading the data sheet for the device, Table 13-1, Table 13-2 and Table 13-3 seem to summarise what you can do on each peripheral input and output to connect the peripheral to an actual device pin. Each peripheral has a table 13-2 and a 13-3 so you can select which actual device pins the peripheral connects its inputs and outputs to.

When opening the properties tab on a component you get a drop down menu it looks like it is possible to select a pin that the component does not connect to.

Is it possible to grey out pins that cannot be selected ? so you cannot select an incorrect pin

apologies if i have mis understood

Steve

Re: PIC16F18875 - mappable pins

Posted: Mon Dec 04, 2017 5:28 pm
by Benj
Hi Steve,

You're right these devices seem to have the banked remap methodology of the PIC32/STARM devices. I'll see if I can get this fixed so only the valid pins are shown. Looks like I missed this when developing these devices. Hopefully not too hard to fix.

Re: PIC16F18875 - mappable pins

Posted: Mon Dec 04, 2017 6:20 pm
by Benj
Right I believe I have it all fixed now.

First you need this updated component in your "Flowcode 7/components" directory.
cal_spi.fcpx
(11.79 KiB) Downloaded 278 times
Next you need these updated definitions extracting to your "Flowcode 7/FCD/PIC" directory.
PIC.zip
(80.43 KiB) Downloaded 287 times
Let me know how you get on.

Re: PIC16F18875 - mappable pins

Posted: Tue Dec 05, 2017 1:40 pm
by Steve001
Cheers Ben will have a go later and get back to you

Steve

Re: PIC16F18875 - mappable pins

Posted: Wed Dec 06, 2017 9:38 pm
by Steve001
Hi Ben,

the list looks better

I am still having a problem with coms not working on this device, Have tried a couple of different output selections Tx on C5,C6,C1

not sure if its my settings or something else - the program works on an ECIO 40 P

Could you have a look please ?

Steve

Re: PIC16F18875 - mappable pins

Posted: Thu Dec 07, 2017 12:58 pm
by Benj
Hi Steve,

I've just tried on a 16F18877 using the remap and this is working nicely for me. Is the chip otherwise running correctly apart from the comms?
UARTtest.fcfx
(8.24 KiB) Downloaded 283 times

Re: PIC16F18875 - mappable pins

Posted: Thu Dec 07, 2017 1:38 pm
by Steve001
Hi Ben

Thank you for looking for me. I believe so I am just testing little bits of code at the moment to get them working then I will piece it all together

I have used IOC (1 & 2) and ADCS so far they appear to work fine

Steve

Re: PIC16F18875 - mappable pins

Posted: Sun Dec 10, 2017 8:13 pm
by Steve001
Hi Ben

Not had chance to have a go yet might be a few days, weather has put us on alert and very busy at work :(

Steve