Part 2: LTSpice integrated circuit design: Diode connected MOS, current mirror

Introduction

In integraded circuits you often need some defined currents. For this you can use current mirrors. The diode connected MOS is an easy circuit which will lead us to the current mirror.

Follow me

Weiterlesen

Veröffentlicht unter Analog Design, Spice | Verschlagwortet mit , , , , , , , , , , | Hinterlasse einen Kommentar

Part 1: LTSpice integrated circuit design: NMOS characteristics

Introduction

I was looking for a way to learn something about analog integrated circuit design, without the need of expansive simulators or technology models.

I work often with LTspice. But the problem is that the default nmos4 and pmos4 models are not good enought for the kind of effects you want to see in our transistor geomentries. So I found that there are some predictive technology models available for free at (http://ptm.asu.edu/) in different structure sizes and technologies. These are Spice models which can be used with LTspice. I want to give here a entry in simulating such integrated design with LTspice for educational purposes.

Follow me

Weiterlesen

Veröffentlicht unter Analog Design, Spice | Verschlagwortet mit , , , , , , | Hinterlasse einen Kommentar

LPC Open LPC13xx PWM

To use the PWM functions of the PWM Output pins we have to modify the lpcopen library. Then we have to do four steps to configure the PWM:

1) modify the lpcopen library

2) configure the IO pins for pwm function

3) Initialise the PWM

4) set a match value for the PWM timer and with it the duty cycle.

Follow me

Weiterlesen

Veröffentlicht unter ARM lpc1xxx, Mikrocontroller | Verschlagwortet mit , , , , , , , , | 1 Kommentar

LPCOpen LPC13xx ADC

If we want to measure some analog values with our microcontroller we have to convert them with the internal Analog Digital Converter of the LPC1313. In our example we will start some AD conversions on different channels and send them via the UART to a computer.

The UART part of this program is described in another blog article and can be found there in detail. The ADC part is described here. All Important information about the UART, the ADC and the ICON Register can be found in the User Manual for the lpc1313

Weiterlesen

Veröffentlicht unter ARM lpc1xxx, Mikrocontroller | Verschlagwortet mit , , , , , , , , , , , , , | Hinterlasse einen Kommentar

Notes on working with LPCXpresso and LPCOpen on a 64 bit Ubuntu

Whats the problem?

The Problem is that LPCXpresso uses an underlying 32 bit Eclipse and that you have to install 32 bit support on a 64 bit Ubuntu to get it working.

After some research I found a solution in this Notes.

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , , , , | Hinterlasse einen Kommentar

LPCOpen LPC13xx UART

With the UART we have an easy to use interface to other devices in example our computer.

In this example I used the lpc1313 and a ft232 cable to communicate between chip and computer. The lpc1313 sends each second a „Hello“.

The connection setup is:

LPC1313 -> FT232

RxD -> TxD

TxD -> RxD

GND -> GND

Weiterlesen

Veröffentlicht unter ARM lpc1xxx, Mikrocontroller | Verschlagwortet mit , , , , , , , | Hinterlasse einen Kommentar

LPCOpen LPC13xx Systick Timer and GPIO

In an article set I want to describe and show some code snippets for the lpc13xx in our case the lpc1313. I work with lpcxpresso and the lpcopen code base. A getting started with lpcopen can be found here.

The articles will contain code snippets for the most commonly used peripheral of the controller starting with the Systick timer and GPIO manipulation.

The Systick timer contains to the core of the cortex m3 processor. It is a 24 bit Timer and can be used as time reference. A block diagramm of the Systick timer can be found in the user manual of the lpc13xx in chapter 17.

This programm will toogle an LED on PIO0.9 and will use the systick timer as time reference.

// Tobias Markus
#include "chip.h"
#include <cr_section_macros.h>
#include <gpio_13xx_2.h>
 
volatile uint32_t msTicks=0;
 
// Systick Handler which is called each ms
void SysTick_Handler(void)
{
    msTicks++;
}
 
// blocks for dlyTicks ms...
__INLINE static void Delay (uint32_t dlyTicks) 
{
    uint32_t curTicks;
 
    curTicks = msTicks;
    while ((msTicks - curTicks) < dlyTicks);
}
 
int main(void) 
{
    Chip_GPIO_Init(LPC_GPIO_PORT);
    SysTick_Config(72000000 / 1000);
    Chip_GPIO_WriteDirBit(LPC_GPIO_PORT, 0, 9, true);
    Chip_GPIO_WritePortBit(LPC_GPIO_PORT, 0, 9, false);
    while(1)
    {
        Chip_GPIO_WritePortBit(LPC_GPIO_PORT, 0, 9, true);
        Delay(1000);
    	Chip_GPIO_WritePortBit(LPC_GPIO_PORT, 0, 9, false);
    	Delay(1000);
    }
    return 0 ;
}

Weiterlesen

Veröffentlicht unter Allgemein, ARM lpc1xxx, Mikrocontroller | Verschlagwortet mit , , , , , , , , , , , | Hinterlasse einen Kommentar

Verilog to blackbox picture tool

counter

For documentation I often need a picture of the blackbox view from a Verilog module. So I wrote a little tcl tool which automates the task. The tool takes a Verilog file and gives a blackbox view out which can be saved.

Tool usage:

tclsh drawBlackbox.tcl path/to/file/file.v

The saved ouptut looks like the picture above (there for a counter example).

The Tool can be found under my VerilogModules GitHub page.

 

The counter.v can also be found in the GitHub page and a detailed documentation will follow there.

Until now the tool only works for verilog 2001 ANSI C Style input and output declaration.

See here at Page 28

 

 

 

 

Veröffentlicht unter Tcl, Verilog | Verschlagwortet mit , , , , , , , , | Hinterlasse einen Kommentar

Tools to verify radiation hardened designs in VHDL

During my bachelor thesis tools were needed to verify the behaviour of radiation hardened hardware descriptions.

For that two tools were programmed:

The first tool simulates the behaviour of the description as a behavioural simulation in Modelsim and induces Single event errors in marked signal names.

See https://github.com/TM90/Modelsim_SEE_Inject

The second tool automates inducing errors in the configuration of a FPGA via JTAG. With this tool the “Place and Route” step can be verified.

See https://github.com/TM90/ErrorInjection

Please feel free to use these tools and to contribute.

 

 

Veröffentlicht unter Allgemein, Python, VHDL | Verschlagwortet mit , , , , , , , , , , | Hinterlasse einen Kommentar

Python to display data from .csv file

Pie

This code snippet is a simple example how to read .csv files and visualize them.

In our example we have a pie.csv file with the following content:

Pie chart

A;B;C;D

35;25;30;10

The codesnipped reads with the readline() method one line and convert it into the desired data format.

Weiterlesen

Veröffentlicht unter Allgemein, Python | Verschlagwortet mit , , , , , | Hinterlasse einen Kommentar