chipKIT® Development Platform

Inspired by Arduino™

Moving project from uno32 to picadillo

Created Sat, 06 Feb 2016 09:26:40 +0000 by woerr


woerr

Sat, 06 Feb 2016 09:26:40 +0000

Hi there

I am in the process of moving my project from uno32 to picadillo.

I didnt realise until most of the programming was done that many of the pwm and interrupts are on different pins. My project uses i2c, 3 pwm and 5 interupts, now I see that on the picadillo the i2c1 and interrupts 3 and 4 share the same pins, so I will need to redesign my entire pcb around this. My only question is how do I change my program to use i2c2 or i2c3?

Edit: I see also pwm1 and int0 share the same pin. So as far as I can tell I cant use my 3 pwm signals as well as audio. :(


mwingerson

Mon, 14 Mar 2016 17:03:20 +0000

Hello Woerr,

I have not used the Picadillo but I am familiar with ChipKIT and the UNO32. I suspect there could possibly be a lot of changes when porting from the UNO32 to the Picadillo due to different companies doing the layout and jumping from a 320 to a 795 series PIC32.

The standard wire.h library only supports I2C0. To get access to the other modules, use Digilent's version of the TWI library called, DTWI.h.

Example: #include "DTWI.h"

DTWI1 my_wire;

void setup() { // put your setup code here, to run once: my_wire.beginMaster(); }

void loop(){ //do something }

Unfortunately, the shared pins have you a little locked down. There will have to be some rerouting on your PCB but the PIC32 795 should have enough modules that you should be able to keep the same functionality.

Best of luck! Marshall