This is an Instructable showing you how to integrate Twitter in your embedded application. Watch this Instructable in Action http://www.instructables.com/id/PIC-KICK-TWEET-1/

Working: A desktop application is created with ease for grabbing the latest tweet from your twitter account. The application then forwards the tweet to the serial port to which the embedded device is connected. A firmware is written to capture the tweet sent by the application. The tweet is displayed on the 16×2 CLCD on the embedded device.

Stuffs your need to complete this Instructable with ease:

  1. A Workstation with a USB port.
  2. Internet connectivity for the Workstation.
  3. A Twitter account from which the tweets are to becaptured.
  4. Processing IDE for creating the desktop application.
  5. MPLABX IDE with C18 compiler for writing the firmware for the microcontroller.
  6. A PIC KICK development board from www.entesla.com.
  7. Enthusiasm.PIC KICK TWEET

For Beginners I would like to brief you to about Processing, MPLABX and PIC KICK….

Processing (or processing.org as known on the web) is a an opensource programming language and environment for people who want to create animations and interactions with a variety of devices and other applications with ease. Initially targeted at artists and designers with no prior programming experience for prototyping, today it is also used by students, researchers, hobbyist and  even professionals to rapidly prototype their ideas by making desktop applications without breaking a sweat. The language is itself based on the popular programming language Java but you need not know Java to start Processing. Processing runs on Windows® OS, MAC® OS and Linux.

MPLABX IDE is a graphical, debugging toolset for all of Microchip’s product line of microcontrollers and memory devices.It includes a feature-rich editor, source-level debugger, project manager, software simulator, and supports Microchip’s popular hardware tools.Based on the open-source NetBeans platform, MPLAB X runs on Windows® OS, MAC® OS and Linux, supports many third-party tools, and is compatible with many NetBeans plug-ins.

PIC KICK is an embedded system development board by ENTESLA for Microchip’s 40 pin 8-bit microcontroller. It is a low cost kick start board designed to help professionals, students and amateurs to explore the capability of PIC16, PIC18 architecture and practice application development for various interfaces with minimal hardware reconfiguration. It features a USB-Serial converter on-board, leds,buttons,16×2 Character LCD, Analog Input using a potentiometer and USB. It comes pre-programmed with the ds30Bootloader which makes it easy to program via usb-serial port. And yes.. you can power it using your workstation’s USB port.

Step 1: Setup your Twitter

  1. If you already have a twitter account jump to the developers page for twitter at https://dev.twitter.com/  If you do not have a twitter account create one and jump to the developers page.
  2. Sign In to your twitter account from the developers page.
  3. Create a new application as shown in the image.
  4. Describe your application to twitter.
  5. Goto the Settings tab. Under Application Type select Access type to Read,Write and Access direct Messages. Wait for a couple of minutes and check if the change has been reflected in the Details tab.
  6. Twitter uses OAUTH authentication protocol for authenticating applications before they access a twitter account. More about OAUTH at https://dev.twitter.com/docs/auth/oauth/faq
  7. Once the Access type has been changes Create Access tokens for the application under the Details tab.
  8. It may take a moment to generate the Access tokens. Once created, goto the OAUTH tool tab to find the keys that you need for authenticating the application that you will be making it the next few steps. Copy these keys to your notepad. Do not share these keys with others.

Download the attached images to clearly view the steps mentioned above.

The most critical step is done now. You now need to create you application before you can start accessing the tweets!

Step 2: Firmware for PIC KICK in MPLABX

As mentioned before, we are going to display the tweets on the 16×2 CLCD present on the PIC KICK development board. To accomplish this you need to write a firmware for interfacing the on-board PIC18f4520 microcontroller with CLCD and routines for transmitting and receiving data on the UART. This seems to be a challenging job for beginners. Thankfully ENTESLA provides libraries with demo codes for these peripherals. The user can use these libraries as reference or use them in their applications for rapid prototyping.

If you are eager to set the PIC KICK in action without making any changes in the firmware jump to the next step..otherwise..

The ready-to-use code for the twitter application project for PIC18f4520 can be found as a .zip attachment to this Step. The code works with MPLABX and C18 compiler. You need to download MPLABX with the C18 compiler and install it before you want to make changes to the firmware.

The firmware provided is pretty straight forward and is well commented.PIC KICK TWEET schematic

Step 3: Flashing the Microcontroller

The PIC KICK development board comes pre-programmed with the ds30 bootloader. You can flash the microcontroller with the code easily via the USB-UART bridge on-board. You need not buy/build a separate programmer.

  1. Download the utility used to program the PIC microcontroller.
  2. Download the .hex file to flash the microcontroller from the attachment to this Step.
  3. Execute the ds30 Loader GUI found in the downloaded folder.
  4. Configure the utility with the COM port number assigned to the PIC KICK development board from device manager.
  5. Configure the Device as PIC18f4520 and Baudrate as 9600.
  6. Click Program. You may have to press the RESET button on the PIC KICK board to invoke the ds30Bootloader.


For more detail: PIC KICK TWEET !

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us: