Continue to Site

Reply to thread

I suggest you use 9 bit LFSR. This will generate 1~511

then scale each value down to 359/511.

The scaling can be done as multiplication e.g.

359/511 = 0.7025 so pre-scale up by 2^10 to become round(0.7025*2^10) ~= 719

Now multiply each LSFR data by 719 and discard 10 LSBs.

Finally add two zeros as extra LSBs (this means x4)


Part and Inventory Search

Back
Top