How to Add Related Post Widget with Thumbnail in Blogger Easily

Blogging is passion for some bloggers, but blogging can provide you a platform to express yourself and also share your thoughts and lifestyle. A niche blog can also make few extra bucks for you. Those who blogs regularly must be taking advantage of this excellent phenomenon. Bloggers know how hard it is to setup a niche blog and attract more and more loyal readers. Its a testing time for you, posting regularly but very low traffic and page-views are not as per expected. Here, Most of buddies stop blogging or else quit. But they forget "No Pain-No Gain".
                LinkWithin thumbnail images

If you are a regular blogger you can ask yourself, how can i improve my page-views? There are lots of possible solutions for this. But the most important is building links inside yourblog to other related articles, So the visitor can find few extra information on related topic and hence visit few more related posts means more page-views. I am also looking for the same and finally I found a way to add related post links under every blog post with thumbnails. In this article we will see How to Add Related Post Widget to Blogger?

Benefits of Related Post Widget: • Utilize Pat Articles: With related post widget, you can utilize your pat articles with relatednew articles.
• Increase Page-views: related post widget may help you to increase your page views.
• Keep Readers Engaged: You can keep your traffic rotating to different pages and readers will engage on your blog

Linkwithin provides you with related post widget with thumbnails under every post.
LinkWithin Logo
Step By Step Manual

Step  1: Go to Linkwithin Homepage.  
Step 2:  On the right side you will see a form asking your Email, Blog Url, Platform (BloggerWordPress etc.) so on.
LinkWithin Homepage
 
Step 3:  Feel in the appropriate values and hit get widget button.

Step 4:  New Window opens with your blogging platform page asking your permission toadd widget (in this case blogger add page element).Select a blog if you have more than one, then click on Add Widget.
 Click add widget button to add on your blogger sidebar
Step 5:  (Optional) For better performance, Drag and Drop the LinkWithin box under the "Blog Posts" box.
 
Drag your LinkWithin widget from your sidebar to your lower end of your blog template to get actual result
Click on Save.
 
Finally click the button save your template and preview it how it look on your site.
And you're done! The widget should now appear on your blog.
Read More

How to Connect USB with other devices by short Wire


While I am glad to see digital cameras, cell phones, MP3 players and other portables are getting tinier and tinier, their designers forgot one simple thing - the cable.

These modern designers have no respect to industry standard and create any special connectors they like. Whenever I add a new USB device into my portable collection, I have to carry one more lengthy and stiff cable.

Can you believe it, I have to carry a bag just to hold these stupid 6-feet cables. Let's do something about this mess.

These are currently available: USB A-to-A, USB A-to-mini, and all the Sprint cell phone cables that Radio Shack carries.

Please specify the cable type in the message field of the online order form.

To be honest, Zip*Linq has all the standard USB and Firewire cables and you don't need to buy those from us.

However, that retractable wheel is still too thick to me and I don't want to carry too many of them but one extension.

Zip*Linq really should remove the two white plates to make it thinner.

Step 1


First, cut this HandSpring Treo cable (about $7 on eBay) like this: leave 1 in at each ends and cut off the cover by .5 in.

Also cut off a 1.5 in heat-shrink tube for later use

Step 2


Cut the wire tips like this: the longest one at the left side is the shortest one at the right side, vice versa.

This way, the to-be-soldered contacts will not touch each other.

Don't forget to put on the heat shrink tube to one side before you start soldering

Step 3


Now solder these ends: red to red, green to green, etc.

Solder properly.

Step 4


Use a electric tape wrap the naked wires and prepare the shielding tips like this.

Step 5


Solder the shielding tips well, so it is hard to break this short cable even you stretch it hard.

Step 6


Now move the heat shrink tube to the middle and heat it with a heat gun.

Looks rugged and decent, does it?

Step 7


I did this to all my cables, including one for my Canon camera and a standard A-to-mini USB for my Odessey 1000 MP3 player.

Add a Zip*Linq A-to-A retractable extension cable, you are all set.

Now kiss your bags good buy!
Read More

How to make a USB by using dead battery


Keeping secret documents out of enemy hands can be a challenge, especially if the bad guys are in the habit of stopping and searching you.

Encryption is one thing, but it’s the art of steganography (hiding messages) that will ultimately save you from a small, hot room with no windows.

This project shows you how to make a USB flash memory battery useful for storing secrets far from prying eyes.

The battery can store a gigabyte of data, looks just like a normal AA alkaline cell, and shows 1.5V if you test it.

It’ll even power small electronic devices.

Step 1Remove the AA battery's plastic sheath

Remove the AA battery\
  • q11.jpg
  • q0.jpg
Cut off the plastic wrapper that covers the dead AA battery, taking care not to score the metal underneath.

Depending on the brand, you might need to clean glue from the battery case using a label remover.

Step 2Score the battery around the bottom end cap

Score the battery around the bottom end cap

Some batteries (Duracell, for example) have a small indent in the case near the negative terminal; make cuts here with your hacksaw. Don’t cut through the battery with a single cut.

Just pierce the outer case, then rotate the battery, making a series of small cuts.


CAUTION : Wear gloves and goggles when cutting and emptying the AA alkaline battery.

Step 3Empty the battery

Empty the battery

Remove the end cap of the battery, using pliers if necessary, and save it for later.

The inside is filled with chemical mush. Scoop this out and dispose of it safely.

Wash the battery in cold water to get rid of any remaining mush.

Step 4Remove the carbon lining

Remove the carbon lining

Hold the battery in a cloth and use either a drill or a countersink to carefully and slowly grind out the carbon.

A 12mm bit should fit inside the battery quite neatly.

Stop every now and again to empty the carbon dust out of the battery casing.

CAUTION : If you drill too fast, the casing will get too hot to hold, or the drill will clog with dust and snatch the casing from your hand.

When the casing is empty, wash it again and clean it with a piece of cloth on a screwdriver.

Carbon dust is electrically conductive, so you don’t want to leave any in there to short out the USB circuitry.

Step 5Crack open your flash drive

Crack open your flash drive

The plastic case on most USB thumb drives is clipped together and can be opened fairly easily by levering around the seams with a knife.

The space inside the battery is tight, so you may need to file the edges of the USB circuit board and gently flex the metal casing to get it to fit.

Just be careful not to knock any components off.

Also look out for any “through-the-board” links, and make sure that you don’t grind them away.

Step 6Remove the USB plug from the flash drive

The standard USB plug is too large to fit inside the battery, so it needs to be removed with a soldering iron or a micro heat gun.

Heat the solder as evenly as possible, without melting any of the surfacemount components.

Don’t pull the socket; applying too much pressure will break the fine metal tracks on the circuit board.

Step 7Wire the tags on the mini USB socket

Wire the tags on the mini USB socket
The wires should be connected as shown in the diagram.

This will take a steady hand and plenty of patience.

If you have a magnifying light, you might want to use it. Begin by applying solder to the wire and the socket individually, then put them together and touch them with the iron to briefly remelt the solder.

Holding the iron on for too long will melt the socket.

Once the wires are soldered in place, strengthen the joint by applying a little epoxy resin to the back of the socket.

Step 8Connect and test the mini socket

Connect and test the mini socket

Trim the mini socket’s wires so that they reach the tags that the original USB plug was connected to.

Solder them into place, but don’t overheat them.

CAUTION : Make sure you’ve wired the socket correctly. It’s possible to permanently damage your computer if you don’t.

Plug the USB drive into the computer to check that it’s working.

If it is, then carry on making; otherwise go back and check your wiring.

The circuit must work before you can continue.

Step 9Glue the socket and wires in place

Glue the socket and wires in place

Use more epoxy, holding the socket in place with a small clamp if necessary.

When the glue is dry, remove the clamp and slide the circuit into the battery housing, with the socket pointing out.

Step 10Install 2 small magnets in the case

Install 2 small magnets in the case

Set these back slightly from the edge of the case, but don’t block the USB socket.

Make sure the poles of the magnets are both facing the same way relative to the battery case.

Apply a little more epoxy and hold the magnets in place with small clamps or tweezers until the glue dries.

Step 11Salvage the ring from the end cap of the AA

Salvage the ring from the end cap of the AA
You’ll probably find a plastic plug with a thin metal cap stuck inside the end cap you removed from the AA battery.

You need to remove this plastic.

Pick it away with pliers, blades, or a drill.


Once you’ve liberated the small metal ring from the plastic plug, clean the ring with steel wool.

Step 12Install the AG13 battery button

Install the AG13 battery button
Melt some solder onto the inside of the ring from the AA , and then scuff the outside of the AG13 battery with fine sandpaper.

CAUTION : Don’t use steel wool to scuff the AG13 battery, as it will short-circuit the cell.

Place the AG13 on a heat-resistant surface with its negative terminal facing up.

Center the ring on the AG13 so that its negative terminal is positioned where the AA ’s negative terminal used to be.

Melt the solder on the ring again to join them.

If you can’t get the solder to stick properly, use some spots of epoxy to reinforce the weld.

Now the end cap should fit back onto the end of the battery case, and be held in place by the magnets you glued in earlier.

Step 13Create the new wrapper for the battery

Create the new wrapper for the battery
  • q11.jpg
  • q10.jpg
  • q0.jpg
A suitable piece of artwork can be downloaded from the Files section above and printed onto sticky-backed inkjet paper or film.

Before you stick it on, use a cotton swab and solvent to remove the adhesive from the bottom ½" of the label.

This makes it easy to remove the bottom of the battery without it sticking to the artwork.

The battery should now look like an ordinary AA battery, and also register a normal 1.5V voltage if you check it with a voltmeter, thanks to the AG13 cell fitted to the end cap.

To remove the end of the battery and reveal the USB socket, simply attach a small magnet to the bottom of the battery and pull it away from the rest of the battery.

You now have your very own secret USB drive that you can use to smuggle those all-important Death Star plans past those pesky Imperial stormtroopers.

To make it really blend in, you should cover some other normal batteries with artwork that matches the USB battery.
Read More

How to make own USB device( PIC18F )


I will show how to breadboard a simple USB generic HID device, creating the PIC18F firmware and finally creating the Windows interface for the device which will allow you to control a LED from the PC and read the state of a push-button from the device.

Since the advent of Windows 7 you need an expensive Microsoft validation certification to create custom USB drivers (without it most users cannot even install your software).

Using the built in drivers for generic HID devices provides a simple method of creating Windows and Linux compatible devices and also makes the creation of both firmware and software far simpler.

Since the HID standard does not require custom drivers you will not need to get a certificate for your driver, also both Windows and Linux have built-in libraries to help you communicate.

For this article we're going to stick to a fairly basic USB device. The device will allow you to control a LED from Windows and also see the status of a push-switch on the device.

Using this the basic principals of 2-way USB communication will be made clear allowing you to progress onto more complex projects.

To keep the cost and difficulty as low as possible I will concentrate on breadboard construction of the hardware using few components, the PIC18F firmware will be based on (the freely available) MPLAB and Hitech C compiler, the Windows software will be created using Microsoft Visual C++ 2008 express (which is also free to download).

Although this article is based around the PIC18F4550 microcontroller you can easily substitute this for the smaller and cheaper PIC18F2550 which is code compatible with the larger 4550.

If you want to follow along with this article I suggest you scroll down to the bottom and download the accompanying software. Also make sure you have MPLAB, HiTech C for the PIC18F and Microsoft Visual Studio 2008 express installed.

Please note that all of the host screenshots are taken from a Windows 7 machine, if you need to find the same/similar thing on an older Windows box please head over to Google where you will find plenty of information about where the items are on your WindowsME machine.

Step 1Hardware

Hardware

To begin with we need to build a USB device to communicate with. In the following circuit diagram you can see the minimum configuration for a usable USB device.

The device includes an ICSP header (In Circuit Serial Programming) and a USB type B connection. In addition there is a single LED and a single push switch to represent the input and output devices.

The circuit is very straight forward (if you don't understand this level of microcontroller electronics I suggest you go ahead and build some of the many flashing LED and push button tutorials available on the web before attempting this).

The PIC18F4550 will be 'bus powered'; this means that the device will draw its power from the USB host (your PC) so no power regulation is required.

The 470nF capacitor (C3) is required so the PIC can operate the internal USB circuitry (it helps with regulating the USB voltages required by the on-board USB interface in the PIC).

The ICSP header allows you to connect a PIC programmer, I suggest using the inexpensive PICkit2 programmer, however other ICSP compatible programmers should work just fine. The 20Mhz clock is required for USB applications.

This allows the PIC to use PLL which ups the clock speed to the required 48Mhz necessary for USB communication.

(Reader [Jason] sent me an email pointing out that a 20Mhz crystal is not strictly necessary when using the PIC18F's on-board USB - which is quite correct.

You can use various crystals provided you change the PIC fuse configuration. Check out the PIC18F4550 datasheet pages 29-30 for more information - Thanks Jason!).

The following picture shows the circuit constructed on a hobbyist breadboard. I've added some labels to the picture to make it clear which components go where.

Please note that, for programming, we will be using the 5V supply from the programmer. Since this is a bus-powered USB device the 5V lines will be connected to the USB connector also.

This means that if both the programmer and the USB cable are connected simultaneously there is the potential for the programmer to supply 5V to the USB host; this is not recommended by the USB standards.

I've never seen a case where this matters (for experimentation purposes), but if you want, you can add a barrier diode to the USB connector to prevent this. In my projects I typically use a 1N5817 Schottky Barrier diode for this.

Step 2Circuit Diagram

Circuit Diagram
If you don't have a USB plug for your breadboard you can either simply make one using a small piece of stripboard (such as my simple adaptor in the picture above) or you can cut one end of a USB cable, strip back the wires and put them directly into the breadboard.

I'd recommend taking the time to make an adaptor, it reduces the risk of wires coming loose when you are plugging the USB cable in and out of your PC.


The resistors and capacitors in this project - 1/4W resistors and capacitors rated for anything over 5 volts are perfect for this project (however higher ratings should work fine).

Also the pinout of the PIC18F4550 in the schematic is 'logical' (unlike the physical pinout diagrams in the datasheet) however the pin numbering is the same in both so as long as you follow the numbering you shouldn't run into issues. 

Step 3

If you're unsure of the wiring for the USB cable the following picture shows the pinout for a USB socket (female B type) and the standard cable colour coding:



Once you've built the circuit above be sure to check the positive and negative power connections for any shorts before plugging the device in to your PC;

You don't want to damage your computer.

Always be sure to check things over before connecting either the USB cable or your programmer to avoid expensive repair bills!

Step 4Device enumeration

Device enumeration

  • 11.jpg
  • 10.jpg
  • 10.jpg
  • 10.jpg
In order to connect your USB device to the computer you will first need to write and compile some firmware for the PIC18F4550. Microchip (the manufacture of the PIC microcontroller) supply a freely downloadable USB stack just for this purpose.

To make things easy I have written some simple firmware to drive the device, you can use this to get going and also as a basis for understanding how the firmware operates.

Once you've got your first device running you will find it much easier to understand how you can adapt it for more complex applications.

The first is USB device enumeration - this complex sounding feat is in fact the initial communication with the USB host (your PC) when the device tells the host what it is and how it wishes to communicate.

USB communication is performed using 'endpoints' which send information either to the host or to the device. As well as setting up the communication channels the device must also pass its device name and two other important values: the VID and PID.

The VID is the Vendor ID and identifies the manufacturer of the device. To get your own VID you need to pay a thousand bucks or so to the USB standards body.

In this example we will use Microchip's VID to save the expense. If you are serious about producing and selling devices you will need to register one of your own.

The PID is the Product ID. Together with the VID they form a unique identifier for your device. When your device first enumerates Windows will store the VID and PID combination for the device; this is true even if you use a generic driver like the HID since it cuts down on the amount of time Windows needs to get your device ready.

This is important because, if you decide to change your device's enumeration information (add more endpoints, etc.), you will also need to at least change the PID before reconnecting otherwise you will get 'Device not started' errors even if you code is flawless (from experience I've noticed that Linux is not quite as fussy and tends not to complain if you keep the same VID/PID combination).

Step 5Communication with the host

Communication with the host

The second important task the firmware performs is the actual communication between the host and the device. Each communication is identified by a 'command'.

When using the generic HID standard the 'command' tells the host and the device how to interpret the information which is passed with the command.

This information could be anything (they don't call it 'generic' for nothing!) and this is how you can achieve great flexibility in the tasks your devices perform.

Once your device is enumerated the host will periodically poll the device (this is always initiated by the host and not the device (although there are exceptions later when you get more deep into the communication protocols).

On each poll the host can both send a command and data to the device as well as receive a command and data from the device.


The main part of the firmware which you should look into is the section which deals with the polling requests from the host and performs the necessary actions to make the device work.

Step 6Understanding the firmware source code

In the 'PIC18F Generic HID Device' zip file included with this article you will find a complete ready-to-go firmware for the PIC18F4550.

Simply unzip the file into your favourite MPLAB project directory and then use MPLAB to open the project.

I've separated both the source files and header files into code you should look at and then the more generic parts of the Microchip stack (stored under 'USB stack' sub-directories in the project navigator).

The files under the 'USB stack' directories are interesting, but to get going quickly you shouldn't worry about the nitty-gritty aspects of the code until you are more familiar with the upper levels.


Since the VID/PID and the rest of the enumeration information is already prepared you should start by performing a build-all on the project and then download the resulting firmware to your PIC18F. Of course, you will need a sane build environment for this to work but there are plenty of resources via Google if you are having problems with your environment.

Try some simple examples to make sure everything is ok before reloading this project and trying again.
The firmware provides 3 commands:
  • 0x80 - Toggle the LED
  • 0x81 - Read the push-switch status
  • 0x82 - Read the LED status
The code which performs these commands is located in the main.c source file in the ProcessIO() function. This function is responsible for determining the required command and then sending and receiving data as appropriate.

This is pretty straightforward since the USB stack takes care of all the underlying complexity; take a quick look at the source code and you will see how simple this really is.

The only extra check performed by the function is to see if the device is in a 'configured state'; this means that the device is connected to a host and enumeration has been successful.


The main function simply calls the USB stack to perform any low-level device tasks and then the ProcessIO function over and over again. It is possible to do this using interrupts rather than a loop, however in this firmware I've kept it as simple as possible.

To understand a little more about the enumeration process take a look at usb_descriptors.c which contains the information that is passed to the host when the device is first connected.

In the source you will find the VID and PID information for the device as well as a series of configuration descriptors which explain to the host what type of interfaces the device has and the capabilities of the interfaces. The 'endpoints' are the connectors for the 'pipes' described earlier.

There are also some strings which describe the manufacturer and the product textually. Windows usually uses these strings when naming USB devices.

Understanding the enumeration process and the descriptor formats is quite complex and is covered by the various USB specifications as well as a great book by Jan Axelson called 'USB Complete - Everything you need to develop custom USB peripherals' (ISBN 978-1931448086). If you are enjoying this article and want to get more serious about USB I would highly recommend getting a copy of the book, it certainly helped me when I was learning.

Overall the firmware is quite simple, all you need to get up and running communicating to and from the host is included. Obviously you can make this as complex as you like, but for the purposes of this article (getting you going with USB) there is plenty to experiment with.

Step 7Connecting the device

Connecting the device
  • 6.PNG
  • 7.PNG
Once you have followed the steps above and downloaded the firmware to your USB device you are ready to get it connected to your PC.

Since we are using the generic HID usb drivers there is nothing to install on the PC before connecting. Simply plug the USB cable into your device and then plug the other end of the USB cable into your PC.

Windows 7 should detect a new device and display the usual 'installing new hardware' notice. After a few seconds you should see the following dialogue window:

If you then navigate to your start menu and select 'devices and printers' (if you have an older version of Windows you need to look elsewhere in the control panel, but the result is just the same.

All these screenshots are from Windows 7) you will see the new device displayed on the screen. You should see something like the following window:

That's it, your first USB device is enumerated and ready to go! Now we can move on to the host-side of the programming and looking at how you can communicate with your device using Microsoft Visual C++ 2008. Note: The default status of the LED is on, it should light up shortly after you connect the device.

Step 8Host software

Host software
  • 8.PNG
  • 9.PNG
The host software is fairly straight-forward and basically consists of 3 parts all contained within the Form1.h file:
  • Monitoring the USB device to ensure it is connected (and disabling user input and device communication if it's not)
  • Displaying and processing the user interface form to allow the user to interact with the application
  • Communicating with the USB device and updating the device status
I've based the host software on the Microchip Generic PnP HID software which comes with the USB stack. However, like the firmware, I've tried to make it a little easier to understand.

To run the host software unzip the Visual Studio 2008 express zip file and navigate to the 'Release' directory, then double-click on the 'WFF Generic HID Demo.exe' file. You should then be presented with the following dialogue:

To test the device detection simply unplug the USB cable from your PC.

The dialogue should change to the following:

Now reconnect the USB device, wait until the dialogue windows updates (and says connected), now try clicking on the 'Toggle LED' button.

You should see the LED on the breadboard turning on and off... cool huh? :)

Next make sure that the LED status label in the window matches the actual LED status.

This is the 0x82 command in the firmware in action. Finally try pressing the push-button on the breadboard, you should see the push button status change accordingly in the window.

Æ Congratulations, you are now the proud owner of your first self-made USB device !  Æ

I've included the full source code in the Visual Studio zip file, so you should be able to view the project in Visual Studio to get a better understanding of how it works.
Read More