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.

Problem with wrong bit order from a BCD dip switch

Status
Not open for further replies.

emax0198

Member level 2
Joined
Nov 21, 2004
Messages
45
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
500
Bit order?

For an 8-bit register of PIC16F84 the data read in, is a binary number from a BCD dip switch but the bits read in are not in a uniform order (bit order is different). How to converted to a decimal value in binary format, like 54 = 00110110, but the order read in is 10110010.

What is the solution and how to code in assembly?
 

Bit order?

shift it and and oprator can help you.
 

Bit order?

First, I cannot understend your post clearly.

Second, BCD means binary coded decimal not decimal it self, so a 54 in BCD is the 01010100.

How can you say the order read 10110010 is an order read? I don't even know if what order is this, another why only give one sample of your gathered data, why not start from 0x00 to 0x0F so at least we can get the pattern.

Don;t get offended but if you want to get an answer straight, ask questions clearly, give a detailed data and always don't forget, search https://www.google.com first.

Glenjoy
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top