Page 1 of 1

RXINT on PIC16F18875 - Solved

Posted: Mon Jun 26, 2017 1:38 am
by Synergy6
Hi.
So since flowcode doesn't yet support the PIC16F18875 in I2C slave mode i thought i would see about using the UART.
Fortunately it has remappable pins and i was able to reuse the pins i had set for the I2C.

PORTC4 = TX
PORTC3 = RX

I have good communication both ways. However putting the receive command in the main loop is causing me issues due to the timeout delay set to 10ms.
So i add in an interrupt for RXINT and it no longer compiles.
All i get is this....

Googling tells me these are interrupt commands, however i dont know how to fix them.

Code: Select all

3138:	PIE1bits.RCIE = 1;
	              ^ (255) not a member of the struct/union ""
	                 ^ (182) illegal conversion between types
int -> volatile union S986
Vx Firmware.c: myisr()
  3380:	if ((PIR1bits.RCIF) && (PIE1bits.RCIE))
	                  ^ (255) not a member of the struct/union ""
	                                     ^ (255) not a member of the struct/union ""
	          (199) logical type required ^
	          (199) logical type required ^
  3383:	PIR1bits.RCIF = 0;
	              ^ (255) not a member of the struct/union ""
	                 ^ (182) illegal conversion between types
int -> volatile union S967
(908) exit status = 1
(908) exit status = 1
Any ideas???

Re: RXINT on PIC16F18875

Posted: Mon Jun 26, 2017 12:29 pm
by Benj
Hello,

This updated definition file should fix the problem for you. Simply drop the file into your "Flowcode 7\FCD\PIC" folder, restart Flowcode and the compilation error should hopefully now be gone.
16F18875.fcdx
(27.98 KiB) Downloaded 318 times

Re: RXINT on PIC16F18875

Posted: Mon Jun 26, 2017 5:01 pm
by Synergy6
Thanks Ben, I shall try that this evening.

Re: RXINT on PIC16F18875

Posted: Thu Jun 29, 2017 2:38 pm
by Synergy6
Hi,
This has solved my problem. Please mark as solved.