Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

alexxx's Blog

alexxx
1 min read
Views
567
Uncategorized
For those compilers that do not have a built-in function for swapping a byte's nibbles, a simple user function can be created: unsigned char SwapNibbles (unsigned char x) { return ((x >> 4) & 0x0F) | ((x << 4) & 0xF0); } And a couple of function call examples: unsigned char...
alexxx
Updated
1 min read
Views
1K
Comments
3
Uncategorized
Some compilers may have built in functions for these convertions, but others don't. Below are two functions for converting a BCD number to decimal and vice versa: #define uint8 unsigned char uint8 BCDToDecimal (uint8 bcdByte) { return (((bcdByte & 0xF0) >> 4) * 10) + (bcdByte & 0x0F)...

Part and Inventory Search

Blog information

Author
alexxx
Blog entries
2
Last update

Share this blog

Back
Top