7-Segments-Board for Embedded Systems

  Design and Implementation of 7-Segments-Board 1.0 Basic Extension Module for Embedded System Prototype   By: Ivan Christian and Erwin   Introduction When developing embedded systems, it would be helpful if we could have a module for monitoring purpose. For instance, let say that your system has to process data streams. In testing and verification step, we need to compare each input and output bytes, so that we can verify that your system is doing right. Having a monitor module is surely a great help for engineers. Some development board has monitor module integrated, such as Altera UP1X FPGA Development Board. Inspired by its usage and benefit of such monitor, 7-Segments-Board 1.0 is designed as an extension module for embedded system prototype. Description 7-Segments-Board 1.0 is a low-cost low-power MCU extension module for monitoring purpose. Its aim is to help engineers doing the firmware testing and debugging on hardware prototype. For those who build microcontroller prototype device from scratch and do not have access to sophisticated debugging instruments, using this module would make testing and verification process less painful. 7-Segments-Board 1.0 is designed for 8-bit microcontroller system. Module Specifications The module specifications are as follows: Input: General purpose push-button (PB)…

Continue reading

The site has launched a new forum

I am glad to announce that ScienceProg site has launched a new forum. It can be accessed by address forum.scienceprog.com. This is still new and quite empty. But I hope it will grow in to nice community. Please join and be first to post your message. All suggestions and advices about topic categories and threads are always welcome.

Continue reading

AVR controlled signal generator-first impression

Lazy evening. I decided to take a couple of shots of couple generated signals. Without going too deep into timings, I wrote a couple of algorithms to make sure the signals are generated correctly at all voltage range 0-5V. First is the Sawtooth signal using ASM in AVRStudio:   .INCLUDE “m8def.inc” .DEF tmp = R16 ; Multipurpose register ldi tmp,0xFF; Set all pins of Port D as output out DDRD,tmp sawtooth: out PORTD,tmp inc tmp rjmp sawtooth (My oscilloscope is old so sorry for bad quality) <p > Second signal Triangle. This one I programmed using WinAVR toolset. int main (void) { uint8_t x=0, y=0; atmega8init(); for (;;) /* Note [6] */ { if (y==0) { x++; if (x==255) y=1; } else { x–; if (x==0) y=0; } PORTD=x; } return (0); } It is evident that signals are generated correctly at all voltage interval 0-5V. Later I will probably use signal (pulse, sawtooth, triangle, and sinusoid) tables stored in flash memory. EEPROM memory is too small to store all signals, but I am going to use it for last configuration storage that every time you switch that generator, the previous settings would be loaded. And I still didn’t decide…

Continue reading

AVR controlled signal generator-skeleton board

This is continuing of thread AVR controlled signal generator. In earlier post 1 layer PCB prototype I described a little about making PCB of this small project. Now a few words about soldering and making the first test run. >This is my PCB board’s bottom. During soldering I discovered one mistake – ISP headers pin MISO and MOSI were swapped. So I had to do some fixes (the green wire). Another small problem, I discovered, was that I couldn’t find 20k SMD resistors for my R-2R leader. For this DAC R-2R leader, I need 10k and 20k resistors to make DAC work properly. So I decided to make “fun” with my Board and soldered 10k SMD resistors in series to gain 20k:

Continue reading

From analog to digital signal filtering

Signal filter is electrical equipment that attenuates the unwanted signal characteristic wave. Filters can be analog or digital. An analog filter processes analog signals. They are mainly arranged with capacitors and resistors. Digital signal filters process digital signals which are quantized. Digital filters are arranged with solid state components to process the signals. Let’s start from analog filters. Analog filter is a circuit which filters unwanted frequencies. Filtering is done by choosing circuit transfer function. Simplest analog low pass filter: The current in RC circuit can be calculated as follows: Then if we think about digital filtering, then Uin(t) and Uex(t) we can change to xn=x(nT) and yn=y(nT). Then we can rewrite equation: Then we get: yn=a0xn+a1xn-1-b1yn-1, Where a0=1/(1+T/RC), a1=-1/(1+T/RC), b1=-1/(1+T/RC). This equation now can be used to build digital filter. Filter can be described using response function. Response function of analog filter is reaction to step function while digital filter response function is response to step function in samples: u[n] = 1, if n>=0 u[n] = 0, otherwise According to method described in previous article we can calculate filter transfer function h(n); Results are in following table: Filter h at t/RC 0 0.5 1 1.5 2 Analog 1 0.779…

Continue reading

Building embedded software using algorithm flow charts

Embedded software consists of various functions performing particular tasks. Before writing any ASM or C code it is good to draw algorithm flow chart. Flow charts are visual method of representing inner algorithm. It is easer analyze the algorithm and write the code according to diagram. The main parts of diagram: Fig 1. Simple series instructions Fig 2. Parallel instructions Fig 3. if-then-else structure Fig 4. while (for) structure Fig 5. do until structure Fig 6. case structure For each function or procedure make separate algorithm flow charts – this enables easer integration of them in to main function. Sample how program flow chart may look. Fig 7. Sample program Flow Chart

Continue reading