Pinguino Forum
Modded io.c and Serial.c Pic32MX250 - Printable Version

+- Pinguino Forum (http://forum.pinguino.cc)
+-- Forum: Software (http://forum.pinguino.cc/forumdisplay.php?fid=7)
+--- Forum: Development (http://forum.pinguino.cc/forumdisplay.php?fid=22)
+--- Thread: Modded io.c and Serial.c Pic32MX250 (/showthread.php?tid=4391)



Modded io.c and Serial.c Pic32MX250 - joel - 02-06-2014

Hi all,

i have made a small modification on io.c and serial.c for the pic32 DIY boards.
The idea is, for those who want a serial link (with bluetooth for example), and find that the number of pins is too short, to have the two USB pins transformed into a serial interface (serial2).
For the hardware this can be easily done with a modified cable with usb plug at one end and the bluetooth / and or ttl rs232 link at the other end (RX/TX only), or for those who want, 2 wires soldered on the usb D+/D- pins.
To use the functionnality just put in your code a #define USBASSERIAL2 1

I have still to test if it works, but should be ok.

Joël
[attachment=523]
[attachment=524]


RE: Modded io.c and Serial.c Pic32MX250 - joel - 11-06-2014

Hi all,
tested this mod today, with an old usb cable i sacrificed for the test.
Cut down the cable, kept the USB-B plug with a part of the cable, soldered a small connector onto D+ and D- cable. then plugged my serial adapter (a bluetooth one) to this small connector!
Works great!! Have now full usage of the 15 pins of the PIC32 + aerial serial link (bluetooth)+ ability to use bootlader when needed!!
And the nice thing (not tested however) is that you can even provide power to the bluetooth using the 2 remaining cable from the usb cable.

All the power of the PCI32 + the maximum io pins +aerial serial communication + DIY board Smile !!!

Regis, maybe this mod, which do not create issue with a "standard" usage of the PIC32 DIY can be included in the source code ? (it indeed require a define in the pinguino code to be "activated")!!

Main "drawback", maybe, is that the board can not be powered anymore by the usb plug....

(02-06-2014, 09:31 PM)joel Wrote: Hi all,

i have made a small modification on io.c and serial.c for the pic32 DIY boards.
The idea is, for those who want a serial link (with bluetooth for example), and find that the number of pins is too short, to have the two USB pins transformed into a serial interface (serial2).
For the hardware this can be easily done with a modified cable with usb plug at one end and the bluetooth / and or ttl rs232 link at the other end (RX/TX only), or for those who want, 2 wires soldered on the usb D+/D- pins.
To use the functionnality just put in your code a #define USBASSERIAL2 1

I have still to test if it works, but should be ok.

Joël



RE: Modded io.c and Serial.c Pic32MX250 - regis - 16-06-2014

Hi Joel,
Sorry for the late response.
I will check this and publish it as soon as possible.