Loading DesignSpark, please wait..

We apologise for the slowness of this page You are using Internet Explorer 6, upgrading your browser will greatly enhance your experience using DesignSpark

The gateway to online resources and design support for engineers, powered by RS ComponentsAllied

chipKIT max32 usage of printf

Posted by DesignSpark admin

958 views

It is a big challenge to convert all printf at the time of porting various c or C++ programs to Arduino board. But if you are using chipKIT max32 board, the work is very much simplied due to the availability of the serial port2(RX2,Tx2).  The printf for microchip pic32 C libraries are  written for serial port2 by defualt. So just after configurting the serial 2 using Serial2.begin(baud rate), all printf are directed to this port .

Code snipped is as follows

 

void setup()

{

Serial2.begin(9600); // once the serial 2 is configured, we can use this port for communication .

}

 

void loop()

{

printf("hello");

}

Leave a comment