Unix on chipKIT Fubarino SD



If you haven’t seen this yet, you’ll likely be impressed. RetroBSD (Unix) running on a chipKIT Fubarino SD? Yes, you heard that right 🙂 Hackaday featured this post referencing Serge Vakulenko’s post, where he provides instructions for how you too can run RetroBSD on your Fubarino SD and then compile and assemble away on your mini computer!

Have fun and enjoy!

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

Murum Lux Ethernet: IPLogika Module

IPLogika's P401 Ethernet Module
IPLogika’s P401 Ethernet Module

You may have already seen previous posts about the Murum Lux (Wall of Light) including a post about the human interface portion. Today’s post refers to the Ethernet portion that Josh wrote about. Using two P-401 Ethernet modules by a Spanish company named IPLogika (one on-board his “e-field” box, and one on-board the Panel/Display board) he created a network by which he communicated the human interface gestures from the gesture panel on the E-field box to the Display.

P.S. Keep an eye out for his tip on using one module to aid in debugging!

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

chipKIT Pro and Stepper Motors

A typical stepper motor
A typical stepper motor


Stepper motors seem to be the thing these days! As a follow-on to a couple of posts regarding the use of chipKIT Pro with I/O control and Delays, we want to share Learn.Digilentinc’s chipKIT Pro with Stepper Motors project, which builds upon the knowledge learned in the two previous projects and teaches you how to apply a software-based state machine approach to control the speed, rotation direction, and operation mode of stepper motors. It requires knowledge of C or C++ programming, MPLAB X IDE, finite state machines, and the two previously mentioned projects. Go get your learn on!

VN:F [1.9.22_1171]
Rating: 8.3/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)

chipKIT Murum Lux Wall of Light: LEDs, Human Interface, and Ethernet


This weekend at the Bay Area Maker Faire in San Mateo, California, the chipKIT Platform will be showcased at the Microchip booth (located in the Expo Hall in Zone 2, booth 2510, east most side of the hall).

One of the items you’ll see at the booth is the Murum Lux (or Wall of Light), which uses PIC32 32-bit microcontrollers via the chipKIT Wi-FIRE and the chipKIT Fubarino Mini to create what Josh Ian Linsday calls “Murum Lux” (Latin for “Wall of Light”). Using a Sabrewing Development Board from Microchip for gesture control, he created an e-field box, then using IPLogika’s Ethernet modules, he connected the e-field box to the RGB LED matrix panel to control the content displaying on the “wall of light.” This stuff is way too cool to reduce down to a small paragraph!

You’ll have to check out Josh’s blog post to see how he put this all together!

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

Interrupts Made Easy with chipKIT

Interrupts Made Easy

chipKIT lovers rejoice! Incorporating peripheral interrupts into your sketch has never been easier. In a previous post, we discussed how you can schedule operations to run periodically in your sketch by using the Task Manager, but for certain applications (such as audio sampling) you need more exact timing than the Task Manager can provide. In such cases, you can use hardware interrupts.

Today’s post shows how you can use the built-in ease-of-use of the chipKIT core libraries to use peripheral interrupts in your projects. Below is a sketch that demonstrates how to set up a simple timer interrupt.  It is designed to run on a chipKIT DP32, but it should work “as is” on any PIC32MX-based board. For chips running faster than 40MHz (such as the chipKIT Uno32 at 80MHz) you’ll want to tweak the TICKS_PER_SECOND value.

The result of this sketch is the output on the Serial Terminal, which will show integer values incrementing by 8000 (approximately). Why approximately? Because it uses a software delay() function, and software delay loops are not good programming practice, as they are somewhat imprecise, and considered “blocking” (meaning they prevent other stuff from happening). However, do note that the hardware timer is exact. So this little program actually compares one form of timing to the other. In this case, the software delay loop is accurate to about (2/8000 * 100) = .02%, which isn’t too bad.

For more details on how to use interrupts, check out Majenko Technologies’ app note about Working with chipKIT Interrupts.

If you are a library developer, and you want a delve deeper into PIC32 Interrupts, please see the chipKIT PIC32 Interrupt Handling document by Keith Vogel at Digilent!

/* This value works for DP32, at 40 MHz */
#define TICKS_PER_SECOND 40000000

#define T3_ON 0x8000
#define T3_PS_1_1 0
#define T3_SOURCE_INT 0
volatile uint32_t counter = 0;

/* Define the Interrupt Service Routine (ISR) */
void __attribute__((interrupt)) myISR() {
  counter++;
  clearIntFlag(_TIMER_3_IRQ);
}

/* start_timer_3 */
void start_timer_3(uint32_t frequency) {
  uint32_t period;  
  period = TICKS_PER_SECOND / frequency;
  T3CONCLR = T3_ON;         /* Turn the timer off */
  T3CON = T3_PS_1_1;        /* Set the prescaler  */
  TMR3 = 0;                 /* Clear the counter  */
  PR3 = period;             /* Set the period     */
  T3CONSET = T3_ON;         /* Turn the timer on  */
} 

void setup() { 
  start_timer_3(8000);  /* 8 kHz */
  setIntVector(_TIMER_3_VECTOR, myISR);
  setIntPriority(_TIMER_3_VECTOR, 4, 0);
  clearIntFlag(_TIMER_3_IRQ);
  setIntEnable(_TIMER_3_IRQ);
  Serial.begin(9600);
} 

void loop() {
  while (counter < 160000) {
    delay(1000);
    Serial.print("Count is now: ");
    Serial.println(counter);
  }
  counter = 0;
}

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

chipKIT Pro and I/O Control

chipKIT Pro MX7 Development Board
chipKIT Pro MX7 Development Board

The Learn.Digilentinc site has some useful lessons, not only for beginners, but also for more advanced users of microcontrollers. For those of you who use chipKIT Pro products like chipKIT Pro MX7, Digilent put together the chipKIT Pro and I/O Control project to teach digital input and output using MPLAB X IDE and the MPLAB XC32++ Compiler. This project does require some basics skills/knowledge, like C or C++ programming, binary math and Boolean algebra, MPLAB X IDE basics, and a fundamental knowledge of electronics.

Happy Learning! 😀

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

chipKIT Pi 6502 Simulator

6502 Simulator
6502 Simulator

Want to slow down your chipKIT Pi just for fun? Simulate an 8-bit MPU with this “kewl” project that implements a 6502 instruction set simulator on a chipKIT Pi development board. The project was inspired by fond memories of the Commodore Plus/4 and C16 home computers (circa 1984). The simulation includes TEDMON (the machine code monitor) as well as the EhBASIC interpreter. Kudos to Darron M. Broad for creating this cool project!

Why not join in on the forum conversation while you’re at it?

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

chipKIT Task Manager Example

Task Mangement with chipKIT Platform

Besides the many Arduino-based core functions available to you, the chipKIT platform also provides chipKIT-specific core functions for the core timer service and task management.

In this post, we focus on task management, by providing a simple example. Task Management essentially allows for multiple tasks to run in the background, which can simplify the programming in your loop() function. Read the overview on Task Management for more information. The example below animates an LED in the background by using the createTask() core function. Notice how this task-management functionality provides for a simple RTOS-like environment.

#include <SoftPWMServo.h>

char dim = 0;

/* Using the Software-based PWM Servo library, 
 *  the UpdateLED() function below dims the 
 *  PIN_LED1 (You can reference the actual pin 
 *  number for your board using the Board_Defs.h 
 *  file for your particular chipKIT board)
 */
void UpdateLED(int id, void * tptr) 
{
	SoftPWMServoPWMWrite(PIN_LED1, dim++);

	if (dim == 70) {
  		dim = 0;
  }
}

void setup() {

	/* createTask() is a chipKIT "Task Management" 
	 *  core function. In this case, it takes the  
	 *  function we defined above, UpdateLED(), as a 
	 *  task to perform. It provides a scheduling interval
	 *  of 20 milliseconds and initializes the enable 
	 *  state of the task. When the board is turned on
	 *  this setup() will run, and the new task will be
	 *  enabled.
	 */
	createTask(UpdateLED, 20, TASK_ENABLE, NULL);
}

/*
 * Notice, there is no need to run anything else in the loop() 
 *  portion for the UpdateLED() "task" to run in the background.
 */
void loop() {}

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

chipKIT Fubarino Mini Pin Diagram

chipKIT Fubarino Mini Pin Diagram
Ever wanted to see the pin functions at a glance for the chipKIT Fubarino Mini? Well, thanks to Brian Schmalz, you have the above pin-mapping diagram!
VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)