chipKIT® Development Platform

Inspired by Arduino™

mpide 1.0 ?

Created Sat, 02 Jun 2012 16:14:47 +0000 by philippel13


philippel13

Sat, 02 Jun 2012 16:14:47 +0000

hi,

I've just bought an uno32 card. It is a very beautiful and powerful card. Now I'm trying to migrate my arduino program and i have a few problem because of the difference of version between arduino IDE 1.01 and chipkit MPIDE 0.23. The 1.0 of arduino have a few interesting improvements like non-blocking Serial write.
Of course i can re-write my own libraries but in my global project i want to mix arduino and chipkit cards so it will be not easy to manage. So i would like to know when MPIDE will update 1.0. So is there a planned date for this update ?

regards

philippe


AHNE67

Fri, 22 Jun 2012 12:41:23 +0000

Hi all

Same problem for me

Regards

Andre


philippel13

Fri, 22 Jun 2012 14:22:31 +0000

to resolve the problem for the write with fifo buffer :

  1. i've added a method in the HardwareSerial class for verify if the uart is available :

bool HardwareSerial::isavailable() { return !((uart->uxSta.reg & (1 << _UARTSTA_TMRT)) == 0); //check the TRMT bit }

  1. i've created a "uartbuffer" class with
  • a uartbuffer::txcar method for replace the HardwareSerial::write(uint8_t) This method put the char in a fifo buffer.
  • a uartbuffer::cycletxbyte() method. It get char from buffer, verify if uart is available (HardwareSerial::isavailable()) and if yes send the char to the uart otherwise do nothing. This method have to be always called in the loop of main program.