feed

Squared by Laburno

Released some days ago, Squared is a simple, clear and somewhat minimalistic WordPress theme created by Gianluca (AKA Laburno). I like it, so I decided to help spreading the word about it.

Squared is a 2 column wordpress theme: simple, clear, lightweight, customizable and designed to be well readable. The theme is translated in English and Italian, and can be easily translated in any other language. There is a simple administration panel where you will be able to change main colors. In the package there is also a tagcloud widget that fits well on the theme.

  • Based on Sandbox.
  • Widget Ready.
  • Valid XHTML & CSS.
  • Customizable through admin panel.
  • English / Italian.
  • Easy to translate.
  • Cross-browser.
  • Tested on Wordpress 2.3.
  • Absolutely free.

Download

So you have built your PIC Programmer and you are ready for the next step: installing the software. Well, it’s pretty straitforward. The software we are going to use is Piklab, an integrated development environment (IDE) quite similar to MPLAB. Piklab integrates with several compiler and assembler toolchains (like gputils, sdcc, c18) and with the GPSim simulator. It supports the most common programmers (serial, JDM, parallel, ICD2, Pickit2, PicStart+), the ICD2 debugger, and several bootloaders (Tiny, Pickit2, and Picdem).

You can install Piklab in different ways, depending on the distro you are using. If you are using Ubuntu (or Kubuntu, Xubuntu or even gOS) you can install it from my repository instead of building it from sources. To do this, you have to add the following lines to your /etc/apt/sources.list:

  1. #Salatti.NET
  2. deb http://www.salatti.net/repo gutsy-salatti main contrib non-free

Once you are done, update APT/Synaptic/Aptitude. You can now install Piklab as a normal Ubuntu package (type “sudo apt-get install piklab” in a shell).

If you are not using Ubuntu or its derivates:

  • Sources + Mandriva + Windows: here
  • Mandriva: older versions or lastest for cooker from here.
  • Fedora 5 and 6: available from Fedora Extras.
  • Slackware: available from here.
  • OpenSuse 10.x: available from here.
  • Debian: see availability from here.
  • Gentoo: experimental ebuilds are available from here (see installation help).

Ok, so you have an IDE. Now we need something to compile our code. We will use assembler and C. For the first we need to install gputils (GNU PIC Utilities). It contains an assembler, a linker and some other stuff. The best thing is that usually it comes with your distro, anyway you can set it up with little effort. In Ubuntu just type “sudo apt-get install gputils” in a shell. For our C code we will also need a compiler: SDCC (Small Devices C Compiler). Just like as gputils, you can install SDCC by typing “sudo apt-get install sdcc” in a shell if you are using Ubuntu. For other distro-specific installations take a look at SDCC home page in the download section.

So, you have an assembler, a C compiler, a linker and also an IDE. Now we have to configure everything (don’t worry: it’s very easy) and to check that everything works fine. Ok. Let’s go.

Open Piklab. You should see something like this (click to enlarge):

piklab_screen.png

On the right-bottom portion of the screen there is something like this:

zoom.png

Click on GPSim (or what you have there as it may change) and select Direct Programmer (Serial port). Then click on GPUtils (or what you have there) and select…I was kidding, leave GPUtils there :P .

You may need to select the correct serial port, so click on Programmer -> Settings and click on Programmer Selection (it’s on the left). Then, in the Port Selection panel choose the correct port (usually /dev/ttyS0 - remember that we are using a serial programmer, so we have to use a serial port). If you have plugged the programmer in your serial port you should see a message on the left of the drop down list telling you if there was a connetcion problem. If so try to change port. Now, if you have built the JDM programmer I show you in PIC Programming with Linux #2, you should be ready to go. Let’s test everything to check that it works. Create a new project (Project -> New project), give it a name and choose 16F628A as device, and GPUtils as toolchain. Click Next and in the following window leave Create template source file checked. Click finish…

If you haven’t already plugged in your hardware programmer, do it. Also plug a PIC16F628A on the programmer. Don’t care about the code created by Piklab, we will discuss about it in the next days. Select Programmer -> Connect. If everything works well you sould see something like this on the Program Log panel, at the bottom of the screen:

Connecting Direct Programmer[JDM classic] on Serial port (/dev/ttyS0) with device 16F84A…
Set target self powered: false
Connected.
Enter normal mode
Already in requested mode.

And a last row telling you the name of the PIC. Now hit F8 to build the project, then hit Shift + F5 to start programming. You should see some activity on the IDE, and some rows of text in the Program Log. If everything works fine the last row should be “Programming successful“. Well, you are done. Everything is ok. If you need another way to test it, just hit Shift + F6 to verify the code on the PIC (you should read “Verifying successful” if all is ok).

Well, we are done. See you soon for the next article of the PPL series!

Having a problem setting up your IDE? Something not working with the programmer? Don’t worry…ask in the forum and I’ll be glad to help you find a solution.

When I started this blog I decided to write in two languages: Italian, my mother tongue, and English. When it comes to do multilingual blogging, I think there are only four strategies for doing it:

  1. Two separate blogs: one blog for each language;
  2. Total translation: manually translate every post (it requires a lot of work, believe me);
  3. Automatic translation: a low quality solution…there isn’t a machine that can translate as good as a human. I think that this is the worst option;
  4. Blog in only one language: well, that’s not multilingual blogging, but if you blog in english your audience is much more wider…instead, if you blog in your local language you lose the opportunity of going global.

I’ve been thinking about this for several days, even talking about it with my fellow bloggers Carlos and Gianluca. After all this, here are my conclusions. You could translate a piece of content in perfect local language, but if the content in question is not suited to attract local audiences then it doesn’t really matter. I had always wanted to blog in two languages as I believe that taking advantage of two languages gives me an important advantage over people that only knows one language, but blogging in Italian and English at the same time has been really a huge mental challenge (at least for me). Translating a post is not a problem for me, the real problem is that “it brakes the natural flow of ideas”. You should also consider that is more important to be “Multi-Cultural” rather than just “Multi-Lingual”. Translating may not be enough.

Yes that is right, if you think about it, blogs have made possible the fact that when you have an idea in your mind, you can immediately go and talk about it whenever you want. Adding the hassle of having to translate every post to another language goes against any creative process. Making a post in your blog is creative but making a translation of it it’s not

So, goodbye Italian blogosphere. At least for now.

I wish an Happy Easter to all my readers!

Starting from yesterday you may have noticed something new on this blog: the newsletter. What will you get by registering to my newsletter? First of all, let me say that this will be a low traffic newsletter: your mailbox will not be overwhelmed by me. And rest assured that I’ll never give your e-mail address to others. So, what will you get by registering? You will receive a monthly recap of all the articles I wrote on SN on the first of every month, plus some other news, interesting links (before they appear here) and usefull stuff. Oh man! What are you waiting? The registration box is on the right!

Here we are: second article of the “PIC Programming with Linux” article series. You can read the first article here. You don’t need complex hardware to work with PICs, indeed you can build it by yourself. Building this programmer took me less than one hour of work. You may even buy it, but I suggest you made it yourself. It’s easy and cheap, and it will be a good training (consider that we will build other circuits in the future). I suppose you know how to use a solderer, so I will give you just the list of materials and the PCB.

What you need

As I told you before, you don’t need that much to build the programmer:

  • Resistors:

2 x 2200Ω
1 x 22 KΩ
1 x 10 KΩ

  • Condenser:

1 x 10μF Electrolitic

  • Diodes:

1 x 1N4146
1 X ZENER 5,6V

  • Connectors

Serial Connector – Female (DB-9)
1 x 4×4 pins IC socket
1 x 9×9 pins IC socket

This is all you need, you can buy all those things for less than €5. Here is the PCB and some schematics:

minicomp.gif

minirame.gif

PIC16F84AMany people, myself included, would like to get started with microcontrollers, but don’t know how to begin. That’s what the first part of this article series is all about - how to get started. With a microcontroller you can do things that would be difficult to do with discrete logic. The PIC (Peripheral Interface Controller) isn’t for every project. It won’t replace a PC, or even a larger processor. But for many jobs it is just the right size, inexpensive, and doesn’t require much support hardware.

People have done lot’s of things with a PIC; things like robots, data logging instruments, clock and timers, and much much more. So, what do you need to get started? Not so much:

  1. choose a PIC
  2. build the tools you need (a hardware programmer)
  3. install the software you need (a software programmer, a compiler…)
  4. learn to program

With this chapter we will go for the first step: choosing a PIC.

The hard choice

PIC family is very wide. It stretch from 8-bit MCUs (Microcontroller Unit) to 16-bit MCUs. You have to choose the more appropriate to your needs. For the purpose of this tutorial we will use the successor of PIC16F84: the PIC16F628A (grab the datasheet). Pin to pin compatible with the old PIC16F84/A (the most used PIC since some years ago) but with more features:

More memory (comparison of the 16F628A to the 16F84A)

  • more program memory (2K to 1K)
  • more data memory (224 to 68 bytes)
  • more data EEPROM (128 to 64 bytes)

More hardware

  • hardware serial USART (Universal Synchronous/Asynchronous Receiver/Transmitter)
  • 3 timer as compared to 1 for the 16F84A
  • hardware PWM (Pulse Width Modulation)
  • hardware compare/capture registers
  • dual onboard comparators

More features

  • onboard 4Mhz/37Khz RC oscillator for timing insensitive apps
  • brownout detector
  • low voltage programming capable
  • capability to add 3 additional I/O pins by repurposing MCLR, and the two oscillator pins giving up to 16 I/O pins in an 18 pin package

Hardware/Software/programming compatibility

  • it has the same pinout as the 16F84A
  • the 16F628A will run 16F84A code with only very minor modifications
  • the 16F628A can be programmed with 16F84A programming hardware, but requires updated programming software to access all the 16F628A program memory
  • as stated above the 16F628A can be programmed in low voltage programming mode

And the best part is that the 16F628A costs less than the 16F84A…
In this picture you can see the pin diagram of the PIC16F628A (wich is the same as 16F627A and 16F648A):

pic16f628a pinout dip 18

PIC16F628A has 16 I/O ports: on the diagram those ports are marked as RA0-7 and RB0-7 (RA5 is input only). Vss and Vdd are for power supply.
I will not explain the meaning of all the other acronyms now: I will do this afterward as we will go on with this series of articles.

[via tuxmachines.org]

Yesterday I was invited at Diego’s home for dinner, so after eating we turned on my notebook and started youtubing… We found a couple of funny videos that I’m going to share with you.

Jeff Dunham is an American ventriloquist and a stand-up comedian. One of his puppets is Achmed, the dead terrorist. (Italian subtitles only…)

ubuntu-brainstorm.png

Here it is: Ubuntu brainstorm: a digg-style website of the Ubuntu community where you can judge ideas and features and suggest yours. A very interesting project, every user can be part of the community and give suggestions, everyone can someway take part in the Ubuntu development even if he is not a developer…

Let the user decide!

More?
Powered by WebRing.