Ads

Get STM32 tutorial using HAL at $10 for a limited time!

Monday, November 30, 2015

Interfacing with Parallel Port and C++ Part 1

Parallel port is one of the interface that can be found on a PC, especially on old PCs. This port is used for sending information to the printer and also known as printer port. The physical connector of parallel port is consist of 25 pins and also known as DB25 connector.


These pins can be divide to four groups:

  1. Output pins (2 - 9): Output pins is used for transmit data (8-bits) from PC to printer in parallel format (each pin is used to transmit one bit of data at a time). 
  2. Input pins (10, 11, 12, 13, 15): Input pins is used to read indicator status that received from printer.
  3. Input/Output (Bidirectional) pins (1, 14, 16, 17): These lines was used for control the flow of data.
  4. GND pins (18 - 25).
We can read or write data from or to these I/O pins by accessing their I/O address. There are three sequential I/O address space that corresponding to the parallel port pins: 0x378 (output pins), 0x379 (input pins), 0x37A (input/output pins).

Saturday, November 28, 2015

BattleBots Robot Prototype using ATmega16 and HC-05 Bluetooth


BattleBots is an American competition television series. The competition is about robot wars. Competitors design and operate remote-controlled armed and armored machines designed fight in an arena combat elimination tournament.


Sunday, November 1, 2015

Altium Designer Tutorial 3 - Circuit Schematic

In the previous tutorial, we have made the schematic symbol and component footprint. Now in this tutorial, I will continue to make circuit schematic. You can go to schematic file by double click on the project explorer.

The final schematic of the circuit is looks like this:


Monday, October 26, 2015

Altium Designer Tutorial 2 - Footprint Library

In the previous tutorial, we have created schematic component symbol. Now in this tutorial I will share how to make footprint for that component symbols.

First, go to the PCB library project. In this tutorial, I will make component footprint with wizard tools, but it is also possible to create component footprint without wizard. The advantage of wizard tools is you can make the component footprint more easy and fast. There are two type of component wizards, first is "IPC Compliant Footprint Wizard" and second is "Component Wizard". Both of them can be access from menu Tools.

For example, I will make SMD capacitor footprint using tool Component Wizard. This is the steps to do that:
  • First, select the component that you want to make, in this case is capacitor.

Sunday, October 25, 2015

Altium Designer Tutorial 1 - Schematic Library

In this tutorial, I will share how to use Altium Designer software to make a simple PCB layout. This tutorial will explain how to make the circuit schematic, PCB layout, schematic library, and PCB footprint library. This tutorial is suitable for beginner who never use Altium Designer to learn the basic function of this software.

For this tutorial, I will make PCB for simple 3.3V power supply module. After you start the Altium Designer software, go to Flie New Project to make a new Altium project. Then give name for that project, for example "power_supply_3_3_v".

On the Projects explorer, right click on the project that has been created and select Add New to Project Schematic to add a schematic file to that project. Repeat this step for add PCB file, schematic library file, and PCB library file. To rename all the files that have been created can be done by menu File Save All

Sunday, September 20, 2015

LCD 16x2 HD44780 Tutorial 4 - Character Entry Mode

In this tutorial, I will discuss about character entry mode of LCD 16x2 HD44780. There are 4 character entry mode that can be selected. So far, we have been used the default character entry mode until previous post. The entry mode is auto-incrementing the cursor address every new character is entered. It is also possible to auto-decrementing the cursor and combine with shifting the display.

This is the first entry mode or the default entry mode. To do this we can send instruction 0b00000110 to the LCD. This is the default entry mode every LCD powered on. Every new character is entered, the cursor/ DDRAM address is auto-incremented by 1. This mode is illustrated by picture below:

  1. Set cursor to 0x07 address location.
  2. Put char 'A' on 0x07 location, cursor auto-incremented to 0x08 address location.
  3. Put char 'B' on 0x08 location, cursor auto-incremented to 0x09 address location.
  4. Put char 'C' on 0x09 location, cursor auto-incremented to 0x0A address location.
  5. Return home (0x00 location).