Pic32 Uart Interrupts

General discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
JustinF
Posts: 21
Joined: 17 Oct 2011 03:44

Pic32 Uart Interrupts

#1 Post by JustinF » 20 Dec 2011 05:56

I found a uart application in Libstock based on the pic16 and pic18 by 'D. Rosseel'

Seems to work fine :)

I would like to also use it on the PIC32MX7 board so both boards are using the same comms routines,
Looking up the PIC32MX datasheet I could not find the same register names to rename the tatements.

Could someone please advise the equivalent names for the pic 32 compiler.

RCIF_bit := 0; {= PIR1.RCIF} // clear interrupt flag
RCIE_bit := 1; {= PIE1.RCIE} // enable Usart interrupts
PEIE_bit := 1; {= INTCON.PEIE} // enable peripheral interrupts


or if there are any examples of a uart with an rx buffer for the pic32 compiler.

Regards
Justin

LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

Re: Pic32 Uart Interrupts

#2 Post by LGR » 06 Jan 2012 00:55

There aren't necessarily equivalent registers. There should be interrupt examples for both PIC families, using a simple timer to blink some LEDs. Study the equivalent examples.
If you know what you're doing, you're not learning anything.

ful babu
Posts: 70
Joined: 07 Jul 2005 10:36
Location: Singapore

Re: Pic32 Uart Interrupts

#3 Post by ful babu » 24 Sep 2013 06:20

If anyone in the future, looking for this answer,

RCIF_bit = U1RXIF_bit
RCIE_bit = U1RXIE_bit
PEIE_bit =EnableInterrupts()

for UART1 module, for UART2 or so on , replace with respective no.,
EnableInterrupts() should start all the interrupts, and also UARTx_Init() suppose to enable rx and tx interrupts too

Regards

(As in pic32 mikroc compiler version 3.3.3)
well let me see ... i hav easypic4, easydspic4, mikroC for PIC, PIC Flash, LvPIC Flash and other 12 types of tiny boards, and I LOVE THEM :D

Post Reply

Return to “mikroPascal PRO for PIC32 General”