Posts: 1
Joined: Wed Jun 29, 2016 3:34 pm

Interruption and other I2C configuration adaption from PIC32

Thu Jun 30, 2016 6:41 am

Working with a Raspberry Pi to control a 1024 pixels thermopile, I've purchased a thermopile and the seller gave me a sample code to control it and to get the matrix information. The problem at this moment is that the code that the supplier gave me is done for a PIC32MX not for a Raspberry Pi.
Right now it is sure that I have to modify the interrupts configuration. May be also some Timers, I2C functions or other specific PIC parameters.

Could anyone help me in this topics?
Is there an easy way to convert PIC to Raspberry Pi configuration?

For the I2C interrupts I am working on the wiringPi library, and I get the correct information of the specific address that I found with the "i2cdetect -y 1" command line.
Then there are some variables which I suspects that are special for PIC like I2C1STATbits, I2C1CONbits, I2C1TRN, TMR2 and TMR3, which I don’t know how to use on the Raspberry.

Posts: 11
Joined: Wed Jun 22, 2016 9:27 am

Re: Interruption and other I2C configuration adaption from P

Sun Jul 03, 2016 6:08 pm


I am no expert in PIC32 so I cannot help you on that part unfortunately. But, recently, I tried to adapt a code for a PIC24F to RPi, it is not that straightforward. Can't you get some documentation for the thermopile device? The documentation should tell you more or less what kind of request the device is expecting.

When you know, you can try to adapt the code to use functions that are described in ... s-protocol . You can have a look on where there is a bunch of documentation on the i2c protocol's implementation in linux. I guess, you can also use wiringPI if the communication is simple.

For the PIC32, you might find your answer for the bits' meaning on ... Manual.pdf


Return to “Interfacing (DSI, CSI, I2C, etc.)”