Example Code

Unsigned Integer to BCD Converter for LabVIEW FPGA

Code and Documents

Attachment

Convert 8-bit, 16-bit, and 32-bit unsigned integers into Binary Coded Decimals using LabVIEW for FPGA 2009 with loop rates as high as 160 MHz.


This code is an improvement upon the code from another IPNet article ( http://decibel.ni.com/content/docs/DOC-2225 )

Features:

Takes an input unsigned integer, and fills up a fixed size array with the ASCII Characters in reverse order along with an integer indicating the number of characters used in the array.


A "Data Valid" boolean is also set to true and remains true after the value is ready.


Instructions:


Download the zip file, extract, open the project and see "Bin-To-BCD-Test-Harness.vi"


OR


open one of the following VI Snippets


Bin-To-BCD-Test-Harness.png

U8-To-BCD.png

U16-To-BCD.png

U32-To-BCD.png


The file Bin-To-BCD-Test-Harness.png references the other three vi's and shows how to use the IP.


A 64 bit version is coming soon, see http://www.WallStreetFPGA.com/ for more information.


Thanks,

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
BlueCheese
NI Employee (retired)
on

Thanks for the code! I was able to leverage it for a demo on the NIWeek 2016 expo floor:

IMG_1787.JPG

IMG_1790.JPG

IMG_1789.JPG

Contributors