PIC KICK TWEET !
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:
- A Workstation with a USB port.
- Internet connectivity for the Workstation.
- A Twitter account from which the tweets are to becaptured.
- Processing IDE for creating the desktop application.
- MPLABX IDE with C18 compiler for writing the firmware for the microcontroller.
- A PIC KICK development board from www.entesla.com.
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
- 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.
- Sign In to your twitter account from the developers page.
- Create a new application as shown in the image.
- Describe your application to twitter.
- 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.
- 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
- Once the Access type has been changes Create Access tokens for the application under the Details tab.
- 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.
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.
- Download the utility used to program the PIC microcontroller.
- Download the .hex file to flash the microcontroller from the attachment to this Step.
- Execute the ds30 Loader GUI found in the downloaded folder.
- Configure the utility with the COM port number assigned to the PIC KICK development board from device manager.
- Configure the Device as PIC18f4520 and Baudrate as 9600.
- 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 !
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw