Level - Geek went Freak!

Level

Level shifter: 74HCT244

Introduction

74244 is a non-inverting octal buffer. Its output can be disabled in groups of four if they are not being used.

Stats

Lines #: 8
Groups #: 2
Output type: CMOS push-pull
Tristate-able: Yes
ESD protection: Yes
Propagation delay @ 5V: 11ns

Vcc

  1. Min: 4.5V
  2. Max: 5.5V

Vih @ 5V

  1. Typical: 1.6V
  2. Minimum: 2.0V Io Max.: 35mA

Special features

An unique feature about 74HCT245 that is not present in other similar buffers is that, the 8 lines can be split into two buses with up to 4 lines in each bus. The groups are:

  1. Group1: 1A0, 1A1, 1A2, 1A3
  2. Group2: 1A0, 2A1, 2A2, 2A3

Each of the groups can be separately tristate-ed using respective output enable lines. Thats right, each of these groups have their own output enable lines unlike other similar octal buffer ICs.

Application

Buffer

74HCT245 can output a maximum current of 35mA. This can be used to drive heavier loads that microcontroller i/o pins cannot drive directly.

3.3V -> 5V Level shifter

Typical Vih for 74HCT244 is 2V which is way below 3.3V. 74HCT244 can be used as 3.3V -> 5V level shifter. 74HCT244 is better than 74HC244 in 3.3V to 5V level shifting because 74HCT series is compatible with TTL logic rather than CMOS logic.

5V -> 3.3V level shifter

Maximum input voltage for 74HCT245 cannot be greater than Vcc according to the specification.

But it can be tricked into accepting voltages greater than Vcc. 74HCT245 has ESD protection diodes on input pins. These diodes come into play when input voltage is greater than Vcc. These clamping diodes can take maximum current of 20mA. This means that a current limiting resister can be used to keep the current below 20mA at 5V. Current limiting resistor of 500ohms would work.

The problem with this trick is, it increases the propagation delay. It is fairly useful for low speed circuits. The lower the resistor the better.

For high speed circuits, use 74ACT244, 74ACT245, 74HCT244, 74HCT245.

Buffers: 74244 vs 74245

74244 is an octal unidirectional buffer. The 8 lines can be split into two groups and each group can be individually disabled.

74245 is an octal bidirectional buffer. The direction of all the lines are controlled using the same line, DIR.

Bidirectional bus can be built using 74244 by

  1. Complementing the output enable lines
  2. Connecting outputs and inputs together
Bidirectional bus using 74244

But this only gives 4 bidirectional lines. If bidirectional lines are required, it is better to use 74245.

Buffer 74HC244

Introduction

74244 is a non-inverting octal buffer. Its output can be disabled in groups of four if they are not being used.

Stats

Lines #: 8
Groups #: 2
Output type: CMOS push-pull
Tristate-able: Yes
ESD protection: Yes
Propagation delay @ 5V: 9ns

Vcc

  1. Min: 2V
  2. Max: 6V

Vih @ 5V

  1. Typical: 2.65
  2. Minimum: 3.5 Io Max.: 35mA

Special features

An unique feature about 74HC244 that is not present in other similar buffers is that, the 8 lines can be split into two buses with up to 4 lines in each bus. The groups are:

  1. Group1: 1A0, 1A1, 1A2, 1A3
  2. Group2: 1A0, 2A1, 2A2, 2A3

Each of the groups can be separately tristate-ed using respective output enable lines. Thats right, each of these groups have their own output enable lines unlike other similar octal buffer ICs.

Application

Buffer

74HC244 can output a maximum current of 35mA. This can be used to drive heavier loads that microcontroller i/o pins cannot drive directly.

3.3V -> 5V Level shifter

NOTE: Although this might work at room temperatures, this is not recommended. Use 74HCT244, 74HCT245, 74ACT244, 74ACT245.

Typical Vih for 74HC244 at room temperature is 2.65V which is way below 3.3V. 74HC244 can be used as 3.3V -> 5V level shifter.

But important thing to note is, the minimum guaranteed worst case Vih is 3.5V. A 3.3V device will never be able to reach this level. So using 74HC244 as 3.3V to 5V level shifter is very bad idea.

5V -> 3.3V level shifter

Maximum input voltage for 74HC244 cannot be greater than Vcc according to the specification.

But it can be tricked into accepting voltages greater than Vcc. 74HC244 has ESD protection diodes on input pins. These diodes come into play when input voltage is greater than Vcc. These clamping diodes can take maximum current of 20mA. This means that a current limiting resister can be used to keep the current below 20mA at 5V. Current limiting resistor of 500ohms would work.

The problem with this trick is, it increases the propagation delay. It is fairly useful for low speed circuits. The lower the resistor the better.

For high speed circuits, use 74ACT244, 74ACT245, 74HCT244, 74HCT245.

Buffer 74HC245

Introduction

74245 is a non-inverting bidirectional octal buffer.

Stats

Lines #: 8
Output type: CMOS push-pull
Tristate-able: Yes
ESD protection: Yes
Propagation delay @ 5V: 10ns

Vcc

  1. Min: 2V
  2. Max: 6V

Vih @ 5V

  1. Typical: 2.65
  2. Minimum: 3.5 Io Max.: 35mA

Special features

74245 is a bidirectional buffer. The direction of all the lines together can be controlled using the direction pin, DIR.

Application

3.3V -> 5V Level shifter

NOTE: Although this might work at room temperatures, this is not recommended. Use 74HCT244, 74HCT245, 74ACT244, 74ACT245.

Typical Vih for 74HC245 at room temperature is 2.65V which is way below 3.3V. 74HC245 can be used as 3.3V -> 5V level shifter.

But important thing to note is, the minimum guaranteed worst case Vih is 3.5V. A 3.3V device will never be able to reach this level. So using 74HC245 as 3.3V to 5V level shifter is very bad idea.

5V -> 3.3V level shifter

Maximum input voltage for 74HC245 cannot be greater than Vcc according to the specification.

But it can be tricked into accepting voltages greater than Vcc. 74HC245 has ESD protection diodes on input pins. These diodes come into play when input voltage is greater than Vcc. These clamping diodes can take maximum current of 20mA. This means that a current limiting resister can be used to keep the current below 20mA at 5V. Current limiting resistor of 500ohms would work.

The problem with this trick is, it increases the propagation delay. It is fairly useful for low speed circuits. The lower the resistor the better.

For high speed circuits, use 74ACT244, 74ACT245, 74HCT244, 74HCT245.

Quartus: set simulator for already existing project

In this post, I will show you how to change simulation tool for an existing project.

Changing simulation tool

Step 1: Open settings dialog box by clicking Assignment->Settings menu or by using the keyboard shortcut Ctrl+Shift+E. The settings dialog box should appear.

Step 2: Select EDA Tool Settings->Simulation option in the sidebar.

Simulation settings

Step 3: In the simulation settings page, select the required simulation tool using Tool name drop down box.

Setting simulation tool path

Now that you have instructed Quartus to use the simulation tool you wanted, you should also inform Quartus where it can find this tool.

Step 1: Open options dialog box by clicking Tools->Options menu. Options dialog box should open

Step 2: In the option dialog box, select General->EDA Tool options in the sidebar.

Step 3: in the EDA Tool options page, set the path to your desired tool.

EDA Tool options

Quartus: Launch test bench in modelsim

To use modelsim as the default simulator in quartus, please follow this blog post.

Step 1: Open settings dialog box by clicking Assignment->Settings menu or by using the keyboard shortcut Ctrl+Shift+E. The settings dialog box should appear.

Step 2: Select EDA Tool Settings->Simulation option in the sidebar.

Step 3: Enable test bench by selecting the option Compile test bench.

Testbench Enable

Step 4: Click Test Benches… button to create test benches. Test benches dialog should appear.

Step 5: Click New button to create new test bench. New Test Bench Settings dialog should appear.

Testbench dialog

Step 6: In the New Test Bench Settings dialog, provide the name of your test bench using Test bench name.

Step 7: Add all the necessary test bench and implementation files by clicking File name ellipsis button.

New testbench dialog

Step 8: Click Ok to create new test bench. Test Benches dialog should now list the test bench you created.

Step 9: Click Ok. Click Apply in Settings dialog box.

Step 10: To launch ModelSim simulator, you have to first Compile your design by clicking the Start compilation icon or by using the Ctrl+L shortcut.

Step 11: After the compilation is successfully completed, launch simulation by clicking RTL Simulation icon.