PIC Tutorial: 4-Digit 7-Segment LED

by Miguel on February 21, 2014

in PIC

The Code #include <p18f252.h> #include <delays.h> #pragma config OSC=HS #pragma config WDT=OFF void main() { unsigned int count=0; // set output ports TRISC=0×00; TRISB=0×00; PORTC=0xff; PORTBbits.RB0=0; PORTCbits.RC0=0; PORTCbits.RC1=0; PORTCbits.RC2=0; // turn off dots PORTCbits.RC3=0; while(1) { // one PORTCbits.RC4=0; PORTCbits.RC7=0; PORTCbits.RC0=1; Delay1KTCYx(1); PORTCbits.RC0=0; PORTCbits.RC4=1; PORTCbits.RC7=1; // two PORTCbits.RC5=0; PORTCbits.RC6=0; PORTCbits.RC7=0; PORTBbits.RB4=0; PORTBbits.RB3=0; PORTCbits.RC1=1; Delay1KTCYx(1); PORTCbits.RC1=0; [...]

In this tutorial I will show you how to blink the RED led in your Stellaris LaunchPad board.

In this tutorial you will learn how to program your Stellaris LaunchPad to use the built in buttons to turn on the RGB led depending on the combination of switches you press.

The Arduino is not the only microcontroller that can connect to LabVIEW, some PIC18 microcontrollers also have that capability and the code is easy to write thanks to the MC18 USART library.

LabVIEW and The Google Maps Javascript API

by Miguel on February 1, 2013

in LabVIEW

So you want to add a map interface to your VI? Nothing beats the Google Maps API and here is how to do it.

Want to learn about wireless control and robots? A LabVIEW VI was written to control an robot wirelessly with a XBee module, get the code here.

Want to learn about the SPI protocol, I/O expanders, LCDs and the SPI mc18 library? Check out this tutorial where we will show you how to drive the display on your pic 18 explorer board using all this knowledge.

Use the Arduino and a GPS receiver to get latitude and longitude data. This tutorial uses parallax’s PMB-648 GPS SiRF Internal Antenna to teach you about receivers and how to use them.

Continuing with the Arduino ADK series, in this tutorial we will make an app to receive data from the Arduino board and display it in a text box.

In this post I will give you the minimum code required to send information from your Android device to an Arduino ADK board.