| ??? 07/22/03 12:45 Read: times |
#51116 - RE: Whats wrong with BCD t.w.s ? Responding to: ???'s previous message |
First I would like to say that a thumbwheel that can output BCD code is such a convenience for user input. Yes the MCU does not care if its BCD or Binary or Octal - it is we humans who attribute a meaning to the Hi and Lows. Having said all this, I only request Nabeel to say how many thumbwheels are being used - this will decide the level of conversion. If its just one then there is no problem - use it as it is. If it is two, then you have to read each one of them and then "pack" them into a single byte - the units digit into the lower nibble and then the tens digit into the higher nibble. Having done this, you just call a standard routine for the conversion - you can refer to the Handy ASM Routines that I have provided in the User Pages and it has this.The routine is called B2HEX08. It has also another routine that can convert a 20bit BCD into Binary - that is inputs from 5 thumbwheel switches. Hope that helped. Raghu |
| Topic | Author | Date |
| conversion from BCD to binary | 01/01/70 00:00 | |
| conversion from BCD to binary | 01/01/70 00:00 | |
| RE: conversion from BCD to binary | 01/01/70 00:00 | |
| RE: conversion from BCD to binary | 01/01/70 00:00 | |
| RE: conversion from BCD to binary | 01/01/70 00:00 | |
| RE: conversion from BCD to binary | 01/01/70 00:00 | |
| RE: conversion from BCD to binary | 01/01/70 00:00 | |
| RE: conversion from BCD to binary - Alan | 01/01/70 00:00 | |
| RE: (Chris) | 01/01/70 00:00 | |
RE: Whats wrong with BCD t.w.s ? | 01/01/70 00:00 |



