A logic analyzer in Pickit2

I was debugging IR protocol RC5 and was regretting again and again that I still don’t have a scope at home or at least some small handy logic analyzer. All of a sudden I found the interesting item in the tool menu of Pickit2 software:

I completely forgot that the tool has a couple of useful items – uart, the logic analyzer, some kind of the debugger tool.

Continue reading

Menu for the audio amplifier

Describing my struggles with a menu for my home small project – an audio amplifier. The main challenge is that we have just 3 buttons (the encoder), and two of them are actually not buttons but rotation directions.

First of all, I drafted a block diagram with the logic of the operation (right-left is a rotation direction, down – the button is pressed).

Continue reading

The hierarchical model of the encoder in Proteus

Sometimes the cleanest way to design a nice readable schematic in Proteus is to create a separate model with its own graphical symbol with pins attached to this model, not the fastest way but a kind of proper approach within a normal working process.

I was interested in the encoder as you may know, which is not available in the standard proteus component library, starting from a simple drawing of the symbol I would like to use at higher levels:

Continue reading

Pic Lab, PIC16, Experiment #20, The encoder

I needed to get my hands on the encoder, so I started to explore things around it.

First of all, what is the encoder? This is a thing that helps to convert the rotation angle and a direction of rotation to some numbers we can use for our further advance.

Usually, the encoder has three terminals, to connect it I have used the following circuit:

All resistors have a nominal equal to 4.7KOhm.

Continue reading

Pic Lab, PIC16, Experiment #19, The WIN QT application for COM port

In a previous experiment, I made an application (well borrowed) with help of C++ Builder, but I really did not enjoy/like it much. So, I was exploring the web again and found an article.  It was much more logical and simple to me, so I decided to give it a shot.

Firstly, we need the Qt SDK. Then we should take sources from here: qt.gitorious.org/qt/qt/trees/4.7/src/corelib/kernel files qwineventnotifier_p.h and qwineventnotifier_p.cpp and place them QtSDKDesktopQt4.7.4mingwincludeQtCoreprivate

Also, download the library dedicated to working with a COM port. Good enough, now we are prepared.

Continue reading

Pic Lab, PIC16, Experiment #17, The clock with a thermometer

After I had enough time playing with a thermal sensor DS18b20 and the RTC DS1307 I decided to bundle them together into a single device. Another reason was the fact that the cheap Chinese clock called a day and let its electronic soul leave the nice enclosure. I considered this as an opportunity to put my stuff inside of it.

That is what I got in the end:

+1 reason is that I had a free sample of the “port expander” PCA9539, I mentioned this IC in experiment #13.

Continue reading