My understanding of programming CV values is that they are restricted to byte values, and not values that are in between byte values: For example, I can assign a value of 1, or 2 or 4 or 8 etc to a CV, but not 3 or 7 or 18, because these values are not the values of the bits in a byte. Yet the nice article by Mat Thompson in the July Model railroader specifies ranges of values ( e.g., "40 to 60" for the bell function CV) when programming sound decoders. Is my understanding incorrect?
Of course you can assign any value between 0 to 255 to CV. You need to understand binary math. In your ex. a value of 3 = 00000011, a value of 7 = 00000111 and 18 = 00010010. If you want to program 3 in a CV, simply write decimal 3 with your DCC system.
Jack W.
OK, Thanks for clearing that up for me.
A single byte can be any value between 0 and 255.
Most CVs use that as a range, but there are some exceptions where the range might be say 0-32. Using a value higher than 32 could cause erratic operation. These ranges are usually noted in the decoder instruction manuals.
Then there is CV29 which is totally different, where individual bits in the byte mean different things. The lighting function CVs are also somewhat like this if you actually take the decimal numbers for each effect and convert to binary, different bit combinations, thius different decimal numbers, indicate different effcts, like flashing, mars light, solid on, flicker, etc.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
Thanks Randy; I think that I was influenced by how CV29 works - I extended that to all the other CVs. It makes sense both that CV29 is different because of what it does, and that does not extend to many of the others CVs, again bexausse of wht they control- typically a single function such as a bell or light.
Right. Other things, such as momentum values or the start/mid/top speed are absolute values so they aren't restricted to some specific pattern of bits - you just want a number in there.