Multiplication in FPGA Design!!

1 comments


 Multiplication is basically a shift add operation.  There are, however, many variations on how to do it.  Some are more suitable for FPGA use than others.   This page is a brief tutorial on multiplication hardware.  The hyperlinked items in this list are currently in the text.  The remaining items will be added in a future release of this page.

Scaling Accumulator Multipliers


bulletParallel by serial algorithm
bulletIterative shift add routine
bulletN clock cycles to complete
bulletVery compact design
bulletSerial input can be MSB or LSB first depending on direction of shift in accumulator
bulletParallel output
A scaling accumulator multiplier performs multiplication using an iterative shift-add routine.  One input is presented in bit parallel form while the other is in bit serial form.  Each bit in the serial input multiplies the parallel input by either 0 or 1.  The parallel input is held constant while each bit of the serial input is presented.  Note that the one bit multiplication either passes the parallel input unchanged or substitutes zero.  The result from each bit is added to an accumulated sum.  That sum is shifted one bit before the result of the next bit multiplication is added to it.

Cheap Ultrasonic Range Finder | Microcontroller Project

2 comments



Do you need to add a distance sensor to your embedded project ? Build this simple ultrasonic range finder !
This quick & dirty PIC ultrasonic range finder will find a place in numerous projects : presence detector, robotics, car parking, distance measurement...
With a few cheap components and less than 200 bytes of code, this sensor will work from 30 to 200 cm, around 1 cm accuracy, with underflow and overflow indication.


How does it work & Circuit schematic
Everybody knows the speed of the sound in the dry air is around 340 m/s. Send a short ultrasonic pulse at 40 Khz in the air, and try to listen to the echo. Of course you won't hear anything, but with an ultrasonic sensor the back pulse can be detected. If you know the time of the forth & back travel of the ultrasonic wave, you know the distance, divide the distance by two and you know the range from the ultrasonic sensor to the first obstacle in front of it.
Here we use an ultrasonic piezzo transmitter with its receiver, they are very efficient, easy to find and quite cheap...................................................

Microcontroller Project | Memo Game Sound

1 comments

This example will show you how to build a PIC based simple memorization game system. With only a PIC16F84A and a few cheap components, you will train your brain first to understand a few basics about PICs, second to play to a not that easy memory game !
PIC Sleep Mode and Wake-Up from PORTB Change are the keys of the software.

Game rules
You will have to memorize a melody, made of up to 62 steps.
A step is one of the four tones available in the game system.
In order to help you, each tone is associated to a color LED (yellow, green, orange, red) which lights each time the tone is played.
The game system plays the melody, then you have to repeat it correctly by pressing the button of the tone's LED. At the beginning, the melody has only one step.
If you fail, an error melody is played, the melody is played again and you can try again to repeat it.
If you succeed, a new tone is added to the melody.
The longest melody is 62 step long, will you be able to learn it by heart ?
If you get bored with one melody, press the RB4 and RB5 buttons at the same time, the game system will create a new melody.
If you want to modify the melody rythme, press the RB6 and RB7 buttons at the same time, and select a new rythme by pressing a key when the LED is on :..................................

LED Programming Status | Microcontroller Project

0 comments

Follow this steps, it will take 10 minutes of your time, and after this you will not need to watch your screen anymore when you flash your program into your MCU : just wait for the LED to turn off.



What do you need ?
Here are the parts you need : a resistor and a LED.EP3 programming 
status LED
I used a 3mm red LED but any will do the job.
The LED will be powered with +5V, select the correct resistor value for your LED (470 ohms for mine) to limit the current.



Where to place it ?
The perfect place would be between USB LINK LED and POWER LED, but there is a track in between, so that I had to shift it up a little bit.
After drilling a 3mm hole, it looked like this :

On-board Ethernet Adapter Microcontroller Project

1 comments

Turn your EasyPic2 development board into an ENC28J60 Ethernet Toolkit
 You will be surprised to see how simple it is !

  The EasyPic2 : A good candidate for this enhancement
EasyPic 2 development board
This is good old EasyPic2 development board from MikroElektronika. But it is still healthy and does a lot of good job. For those who don't know this board, here is a little review of its main features :
  • On-board USB fast programmer
  • DIP8 to DIP40 PIC sockets
  • 32 LEDs and 32 buttons, connected to I/O pins
  • 4 digits 7 segments LED display
  • Socket for 2x16 LCD text display
  • 2 trimmers for A/D conversion
  • 5 connectors, directly connected to I/O pins with pull-up/pull-down resistor arrays
  • RS232 adaptor and connector
What do we see bottom right ? Let's have a look closer..

 

Free Download Engineering Books - IEEE Books | Copyright 2009-2013 All right reserved | Design by BMW Automobiles | Created by Umair Sheikh