PIC24FJ256GA406 UART Rx Interrupts not working

An area to discuss 16-bit PIC specific problems and examples

Moderator: Benj

leoo
Flowcode V4 User
Posts: 44
Joined: Mon Jan 19, 2009 11:43 am
Has thanked: 35 times
Been thanked: 9 times
Contact:

PIC24FJ256GA406 UART Rx Interrupts not working

Postby leoo » Tue Jun 05, 2018 9:32 pm

Hi,

I'm using FC7.3.0.6. to program a PCB that utilizes a PIC24FJ256GA406. I use UARTs 1, 2, 3, 5 and 6 and need the Rx Interrupts on each UART.

On a loopback test, UARTs 1, 2 and 3 trigger their Rx interrupts when a character is received, but UARTs 5 and 6 don't, although they do transmit characters.

I rechecked the hardware and it seems to be OK and the datasheet shows that the chip can handle Rx interrupts on all 6 UARTs.
Could this possibly be a problem with the PIC24FJ256GA406.fcdx file?

Kind regards.
Leo

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

Re: PIC24FJ256GA406 UART Rx Interrupts not working

Postby Benj » Wed Jun 06, 2018 4:58 pm

Hi Leo,

The device datasheet is very unclear as to the exact PIR and PIE registers for the RXINT flags. Therefore I have got the correct locations from the compiler header file. However the header file could be wrong and would explain why you don't get compile errors but it doesn't work.

I've just combed through the FCD and had another pass through the CAL file. I'll try and see if I can find a better data sheet for the device with a full register set as this would help to confirm things are actually correct.

Edit they are listed in the datasheet, you just have to go hunting for them (Table 8-2 starting on page 115). It looks like what we have is correct. Hmm. I'll keep digging and see if I can find what might be causing this.

Maybe try this latest CAL file for v7 to see if it helps with the problem at all. Simply copy the file to your "Flowcode 7\CAL\PIC16BIT" directory.
PIC16BIT_CAL_UART.c
(26.31 KiB) Downloaded 31 times
These users thanked the author Benj for the post:
leoo (Thu Jun 07, 2018 7:33 am)
Rating: 5.88%
 

leoo
Flowcode V4 User
Posts: 44
Joined: Mon Jan 19, 2009 11:43 am
Has thanked: 35 times
Been thanked: 9 times
Contact:

Re: PIC24FJ256GA406 UART Rx Interrupts not working

Postby leoo » Thu Jun 07, 2018 8:33 am

Hi Ben,

I've used the new CAL file and channel 5 now works the same as channels 1 through 3. I unfortunately can't test channel 6 just yet, due to the set up of my PCB, but will let you know if I have any problems.

Thanks for the fix.

Kind regards.
Leo
These users thanked the author leoo for the post:
Benj (Thu Jun 07, 2018 11:45 am)
Rating: 5.88%
 

MOCUELSL
Posts: 51
Joined: Fri Jun 01, 2018 12:52 pm
Has thanked: 8 times
Been thanked: 5 times
Contact:

Re: PIC24FJ256GA406 UART Rx Interrupts not working

Postby MOCUELSL » Mon Jun 18, 2018 10:36 pm

Can I use this file in V8?
regards

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

Re: PIC24FJ256GA406 UART Rx Interrupts not working

Postby Benj » Wed Jun 20, 2018 12:53 pm

Can I use this file in V8?


No the fix has already been applied to v8, use the Help -> Check for updates menu in v8 to get the fix.