RXINT on PIC16F18875 - Solved

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Synergy6
Posts: 28
Joined: Wed Jan 18, 2017 3:38 pm
Been thanked: 4 times

RXINT on PIC16F18875 - Solved

Post 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???

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RXINT on PIC16F18875

Post 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

Synergy6
Posts: 28
Joined: Wed Jan 18, 2017 3:38 pm
Been thanked: 4 times

Re: RXINT on PIC16F18875

Post by Synergy6 »

Thanks Ben, I shall try that this evening.

Synergy6
Posts: 28
Joined: Wed Jan 18, 2017 3:38 pm
Been thanked: 4 times

Re: RXINT on PIC16F18875

Post by Synergy6 »

Hi,
This has solved my problem. Please mark as solved.

Post Reply