This website works better with JavaScript.
Home
Help
Register
Sign In
nilm
/
zoom
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
1
Wiki
Activity
Browse Source
add lookup table for DAC mapping
git-svn-id:
https://bucket.mit.edu/svn/nilm/zoom@8026
ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/zoom-1.0
jim
13 years ago
parent
2bafeaed97
commit
5cb6542c7e
3 changed files
with
1044 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+7
-0
firmware/Makefile
+13
-0
firmware/gen-dac-lookup.pl
+1024
-0
firmware/lookup.inc
+ 7
- 0
firmware/Makefile
View File
@@ -0,0 +1,7 @@
all: lookup.inc
lookup.inc: gen-dac-lookup.pl
perl gen-dac-lookup.pl > lookup.inc
show: lookup.inc
echo 'plot "lookup.inc" with lines' | gnuplot -persist
+ 13
- 0
firmware/gen-dac-lookup.pl
View File
@@ -0,0 +1,13 @@
#!/usr/bin/perl
srand(1337);
# constant bits, the rest are filled with random data
$bits = $ARGV[0] || 10;
$rem = 16 - $bits;
for ($i = 0; $i < 2**$bits; $i++)
{
$out = $i * 2**$rem + int(rand(2**$rem));
print $out . ",\n";
}
+ 1024
- 0
firmware/lookup.inc
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save