Gray-Code Umsetzung
-
Hallo Forum,
ich habe ein Problem mit einem Winkelsensor.
Der Sensor gibt sein Signal als 13-bit Graycode aus und ich muss es in meinem Programm in eine C++ verständliche Zahl umwandeln. Vielerorts findet man die umgekehrte Richtung also "Dezimal nach Gray". Ich suche allerdings die Richtung
Gray -> Dez, BCD oder was anderes.
Kennt jemand einen Umwandlungsfunktion gerne auch ohne konkrete Implementierung?
Grüße
DipplInsch
-
http://en.wikipedia.org/wiki/Gray_code#Programming_algorithms
Gray code - Wikipedia, the free encyclopedia
-
Numerical Recipes
http://www.nrbook.com/Kapitel 20.2