New experimental USB stack

We in the chipKIT programming dungeons have been slaving away for the past few weeks to bring you a new, long awaited, USB stack for your USB-based chipKIT boards.

Finally we can say the PIC32MZ based boards have full USB support!

Continue reading New experimental USB stack

VN:F [1.9.22_1171]
Rating: 10.0/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

P-P-PIC up a TFT with chipKIT and DisplayCore

Did you know that chipKIT boards are probably the best choice for controlling a TFT screen?… Considerably better than most Arduino boards, that is for sure! I say that with confidence for three reasons:

  1. chipKIT boards typically have far more memory and computing power than many Arduino boards, and as a result, they are so much better at manipulating graphics and data for display.
  2. chipKIT boards can get the data out to the TFT screen so much faster though high-speed interfaces, so less time is spent redrawing things on the screen. You’ll find that images appear instantly, as opposed to being drawn out slowly.
  3. Finally my favourite reason: professional-grade library support. I say it’s my favourite because I designed and wrote the library myself, but I’ll tell you more about that journey later on.

First let me introduce you to a little friend of mine:

picadillo

This here is the Picadillo-35T developed by 4D Systems in Australia (also available from microchipDIRECT). The Picadillo is essentially a chipKIT MAX32 board with a nice, high-resolution TFT touch-screen strapped to the back. The meaty PIC32MX795F512L chip (also used on the MAX32) boasts plenty of RAM (128KB) and Flash (512KB) and all the other bells and whistles you have come to expect from chipKIT boards. The board also has the same connectors as the popular chipKIT Uno32, uC32, WF32 etc., so all your shields should just plug in and work. You also get sound thrown in to the mix with an on-board speaker, and of course you get an SD card slot–what self respecting board would be without one these days anyway?!

Ok, enough said about that. The main reason I write this post is to tell you of the most useful part of this Picadillo board: the TFT touch-screen. And let me tell you, it’s not just any TFT screen. It’s an above-average 3.5″, 320×480 resolution, crisp-image delivering screen. Not only that, but the way the TFT is wired to the PIC32 chip is also “above average.” The TFT connection boasts a 16-bit parallel interface, not the normal slow SPI interface that most cheap Arduino TFT screens give you–meaning that it takes one bus clock operation to output a pixel as opposed to 16 (a considerable speed increase!).

But that’s still not all! (I’m starting to sound like a TV salesman now. “Buy now and we’ll throw in this amazing clock radio and set of saucepans absolutely free!”). The TFT’s 16-bit interface has been directly connected to the “Parallel Master Port” (PMP) of the PIC32. The PMP is a bit like the old internal bus of early computers; you get an address bus, a data bus, and a bunch of control signals, meaning there’s no messy twiddling of GPIO pins with the likes of digitalWrite() (or even direct port manipulation using registers). Writing data to the screen takes just one instruction. That’s right – ONE instruction. And that means even greater speed. But wait, there’s more! (Here comes the gold-plated nose-hair trimmer…) It’s called DMA: Direct Memory Access. Guess what that can do! DMA can send data through PMP, and this essentially allows for direct communication with the TFT display, all without the MIPS CPU’s involvement! In effect, you can be outputting data to the screen whilst doing other things! All-in-all it’s really a thing of beauty… if you like that kind of thing, of course.

So what does all that mean to the layman? It means you have a well-designed, well-built bit of kit in a nice compact package with all the power you could ever want to make your perfect user interface. But isn’t programming user interfaces and drawing graphics on a TFT screen a hard job? Isn’t it fairly skilled and in-depth? Don’t you have to write reams and reams of code just to get it to print “Hello World”? Well, yes, you do. However I have already done all that for you. And that is where the journey to the core begins.

Continue reading P-P-PIC up a TFT with chipKIT and DisplayCore

VN:F [1.9.22_1171]
Rating: 9.7/10 (6 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

New FAT File System in chipKIT-core

microSD cards are supported on several chipKIT boards
microSD cards are supported on several chipKIT boards
Did you know that a robust FAT file system is now available in chipKIT-core? Keith Vogel of Digilent recently ported the file system library by ChaN at elm-chan.org. You can use this library to create and access files on microSD cards, as shown in the photo above.

But wait… what is a FAT file system, anyway?

FAT stands for File Allocation Table. It’s a method of organizing data on disk drives. Designed way back in 1977, FAT was the standard file system used on disk drives for at least two decades. While modern computers now use more sophisticated systems, FAT is still the standard for USB sticks, Flash drives and solid-state memory cards.
DSDVOL example in Arduino IDE
DSDVOL example in Arduino IDE


Several chipKIT boards (such as the FubarinoSD, WF32, Wi-FIRE, and WiFi Shield) include a microSD card slot where a solid-state memory card can be inserted. The new library allows your sketch to create and access files stored on the memory card. Files can be used for serving up web pages, storing large amounts of data collected from sensors, or anything else you can think of.

chipKIT-core combines the FAT file system with improvements to the DSPI and SoftSPI libraries. (DSPI uses the hardware SPI ports, while SoftSPI uses any combination of unused I/O pins to create a virtual SPI port.) When a microSD card is inserted, your sketch can easily mount it as a disk volume to access files. An example sketch is included with chipKIT-core, and appears as DSDVOL under the File:Examples menu item. Here is a snippet of code from DSDVOL:
Mounting a volume using the new FAT file system
Mounting a volume using the new FAT file system
Up to 5 volumes can be mounted and used at the same time. While most chipKIT boards have only one microSD card slot, virtual disk volumes in RAM or MCU Flash will be supported soon.
VN:F [1.9.22_1171]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)

Murum Lux Human Interface: chipKIT Fubarino Mini and Hover Gesture

Microchip GestIC MGC3130 Sabrewing Evaluation Board
GestIC Sabrewing Evaluation Board

As a follow-on to a previous post, today’s post is about the human interface portion of the Murum Lux (Wall of Light) that Josh Ian Lindsay built. In his Overview post, Josh explains how he built the e-field box by using a chipKIT Fubarino Mini and Microchip’s MGC3130 GestIC on-board the Sabrewing Development Board. (He notes that he used the Hillstar Development Kit during development, which also contains the MGC3130 GestIC device). With the Hover Arduino library as a base, which he greatly improved (see Github), he’s created a demo that showcases the usefulness of human interface!

Why not have a gander!

VN:F [1.9.22_1171]
Rating: 9.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

VirtualWire Library for chipKIT

Hello,

I have modified the VirtualWire library originally developed for Arduino in order to be able to run it on PIC32 Microcontrollers. The main changes concern the interruption setup and handling (OC1 and Timer 2).

VirtualWire is a library that provides features to send short messages without addressing, retransmit, or acknowledgment, a bit like UDP over wireless, using ASK (amplitude shift keying). It supports a number of inexpensive radio transmitters and receivers. All that is required is transmit data, receive data, and (for transmitters, optionally) a PTT transmitter enable.

In addition, I have added 2 functions in the VirtualWire lib, vw_send_float and vw_get_float.

These functions allow you to:

  • Transmit float values
  • Manage source value helpful in case of one receiver connected to several sources
  • Manage the type of data transmitted, currently 2 types of data are defined:
    • #define VW_TEMPERATURE_DATA_TYPE 250
    • #define VW_LIGHT_DATA_TYPE 251

For more information, click the following links:

Don’t hesitate to use VirtualWire, and feel free to ask any questions. Eric
VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Multiple Servos on chipKIT uC32

Can you do it? Yes you can! James at Digilent has put together a post to show how you can run five or more servos on chipKIT uC32 quite easily, as long as you follow some guidelines. The chipKIT Servo library makes the coding easy, so all you may have to worry about is the power consumption. Read on to find out more! 🙂
VN:F [1.9.22_1171]
Rating: 10.0/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Open-Source Science Tricorder with chipKIT Max32


Did you ever watch Star Trek and wish you had your very own Tricorder? Well, even if you can’t buy one right now, you can at least find solace in the fact that it exists as an open-source project. Peter Jansen believes in a world where we can learn and care about our environment by using such tools, so he put together the Arducorder, an Arduino-compatible sensing device (Tricorder), using a chipKIT Max32 and a collection of sensor boards, along with Arduino-compatible libraries.

So if you didn’t catch it on Hackaday, check it out now!

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

Digilent Learn – Debouncing Circuits with chipKIT Uno32

Digilent Learn - Debouncing Circuits with chipKIT Uno32 Microcontroller
Circuit with a button and an LED – Learn how to Debounce with chipKIT Uno32

Digilent’s Learn site provides tutorials for learning various hardware and software concepts, and you can choose “projects” (tutorials) based on topic, difficulty, or your personal area of interest. They also group projects together to form modules of related content, and they group modules to form courses, which are structured like college courses.

Today we’re sharing their “Debouncing Circuits with Microcontrollers” module, providing four distinct ways to learn how to debounce circuits, with chipKIT Uno32, whether in your software sketch, by using a library, via RC filter, or with force buttons.

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

Nuts & Volts: It’s All About the Uno32 Hardware

chipKIT Uno32 Development Board
chipKIT Uno32 Development Board

Take a deep dive into the hardware of the chipKIT Uno32 in this #ThrowbackThursday post that features a March 2012 article from our friends at Nuts & Volts Magazine. Fred Eady, the author, talks about the Arduino hardware model, describing it as “a perfect example of a universal electronic cluster design.” Eady discusses the serial USB interface in depth, and also examines and explains the schematics for powering the chipKIT Uno32 board. Finally, he ends with a deep dive into the Basic I/O Shield, the code libraries that give this board functionality, and the reasoning behind abstraction of the library code.

To read it all download the full article and enjoy!

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