chipKIT Lenny: Sneak Preview

chipKIT Lenny Development Board

If you saw our post about the new chipKIT Lenny, and you’re totally excited, we have more news for you! In advance of the production release, Majenko Technologies, originator and designer of the Lenny, is offering early access to this new board. You can purchase a limited edition, sneak preview of the Lenny before the production boards roll out. These boards are production-ready, just without the packaging. So get yours today!

For all the details, see Majenko Technologies’ chipKIT Lenny page.

VN:F [1.9.22_1171]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Coming Soon: chipKIT Lenny!

Render
The new chipKIT Lenny!

We have some great news for USB lovers! A new board, chipKIT Lenny, is in final prototype stages and preparing for production. If you haven’t already guessed, the chipKIT Lenny is the PIC32 equivalent of the Arduino Leonardo, only considerably advanced, with more peripherals and overall power.

The Lenny features a direct USB connection that provides a separate USB serial connection in addition to the two UART serial connections provided on the GPIO headers. Advanced users can use the Microchip Harmony framework in MPLAB X IDE to emulate further USB devices such as HID keyboards and mice. For chipKIT core users, enhanced support for emulation is being actively worked on and can be previewed by using the Harmony USB core in UECIDE.

The PIC32 microcontroller on the chipKIT Lenny is a PIC32MX270F256D MCU at 40 MHZ with 256K of Flash and 64K of RAM. This board features the following, and much more!

  • Two I2S/SPI modules for Codec and serial communications
  • Parallel Master Port (PMP) for graphics interfaces
  • Charge Time Measurement Unit (CTMU)
  • Two UART and I2C™ modules
  • Five 16-bit Timers/Counters (two 16-bit pairs combine to create two 32-bit timers)
  • Five Capture inputs and Five Compare/PWM output

Keep your eyes peeled for the chipKIT Lenny release, coming soon!

VN:F [1.9.22_1171]
Rating: 7.6/10 (8 votes cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)

PIC32USB Hardwired Android App for chipKIT

PIC32USB Hardwired Android App
App auto-launch option when PIC32-based boards is connected

Darryl is at it again, with a new Android app called PIC32USB, providing OTG-supported phones/tablets with a hardwired communication to a PIC32 microcontroller. Use any of the 24 buttons to send messages to the PIC32 device, customize any button to change the string sent to the device, and send/recieve data to/from the device using a chat-like interface. Check out his sample code to test it out on your OTG-supported mobile device and your supported PIC32-based board. Darryl has successfully tested this app with the chipKIT Fubarino SD, chipKIT Fubarino Mini, and his very own MAKEmicro32 board.

Good luck, and have fun out there!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)

USB Host Library Ported to chipKIT

chipKIT Uno32 with USB Host Shield
chipKIT Uno32 with USB Host Shield

Oleg Mazurov and Andrew Kroll have ported the Circuits@Home USB Host Shield 2.0 Library to chipKIT. This is the library that inspired Google to create the Android ADK (Accessories Development Kit)! With this library you can add USB Host capabilities to chipKIT Uno32 (which has none) or to chipKIT Max32 with a Network Shield, allowing for either a second USB Host port or both a USB Host and USB Device port.

Find out more about it here.

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Identifying your chipKIT boards

ft232-uart One thing I find annoying about the chipKIT boards is that when you plug them in they are all identified as an “FTDI” chip.  There’s no way of knowing which board is plugged in where, and if you have lots of boards (as I do), then it would be really nice to know which COM port is which at a glance.

Fortunately it is possible, if you happen to know how!

A little word of warning before I begin though – it is possible to kill your FT232R chip if you do things wrong, which will break your chipKIT board, so have a care and don’t mess with things you shouldn’t mess with.

Not many people know, but the FT232R chip used in most of the chipKIT (and other) boards is fully programmable by the end user.  All you need is a little bit of software (alas only available for Windows) from FTDI called FT_Prog.  It can be downloaded freely from here: FT_Prog_v2.8.2.0.zip

It requires .NET 4 to be installed, so if you don’t have it you can grab it here: .NET 4.0

Once you have it installed you can load it up and tell it to scan for your devices (little magnifying glass in the toolbar).  Make sure your board is plugged in at this point, and it should find it:

found-ftdi Select the “USB String Descriptors” section.  It should look similar to this: ftdi-strings Now you can go ahead and edit the Manufacturer and Product Description entries to suit your needs.  The board I have to hand is a MAX32, so I have changed them to: ftdi-changed Now you’re all ready to reprogram the chip.  The little lightning bolt in the toolbar does just that.  Click it, and it opens a program panel: ftdi-prog Make sure the right device is selected (if you happen to have multiple boards connected), then press “Program”.  When it’s finished (it only takes a second), you can close the window, then close the FT_Prog program.  Unplug the board and plug it back in again.  It will take a minute or so to reinstall the drivers (it may allocate a new COM port at this point as it thinks it’s a different device), and it should now identify for what it is: ftdi-done

If it doesn’t, try again.  For some reason it took two attempts with my MAX32, but my PICadillo-35T did it first time.



Again, I must strongly reiterate: It is possible to break your FT232R chip with this utility, so don’t play with anything other than the strings and you will be fine.

Oh, and don’t blame me if you break it, it’s not my fault.
VN:F [1.9.22_1171]
Rating: 6.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Using USB

The PIC32MX3xx series parts do not have a USB controller. The other PIC32 series (i.e. PIC32MX4xx/5xx/6xx/7xx) all have a USB controller. The Uno32 uses a PIC32MX320F128H and therefore does not have a USB controller. The Uno32 and Max32 have standard FTDI serial to USB interface chips (FT232R) to keep consistent with the Arduino way of interfacing. However, it is also nice to be able to use the built in USB port. Many other PIC32 boards have this USB port brought out to a standard connector such as the Microchip USB Starter Kit and the Digilent Cerebot 32MX4 and Cerebot 32MX7. The latest version of HardwareSerial.cpp now supports the first serial port (Serial.begin(), Serial.print() etc) can be reconfigured to use the USB port instead. In order to take full advantage of this, first you have to program the board with the USB bootloader, then use the appropriate board setting in the BOARDS menu. If you are using a custom board in the boards file you can just add the following to your board description: custom_pic32.compiler.define=-D_USE_USB_FOR_SERIAL_ When using the USB for Serial, UART1 becomes Serial0 Serial1 etc, are still there normal configurations Serial.begin(baudrate); //The baudrate is ignored, when doing real USB, there is no baudrate. Receive is interrupt driven and behaves EXACTLY like regular Serial. NO CODE CHANGES REQUIRED. If you want to see how this is done, look at HardwareSerial.h and HardwareSerial.cpp, the actual usb code is in HardwareSerial_cdcacm.c and HardwareSerial_usb.c. The USB code was written by Rich T (http://www.cpustick.com/) More documentation will be provided on how to do this soon. (Created 7/3/2011)
VN:F [1.9.22_1171]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)