Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
euro-adc-65m-14b-40cha-gw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
eurocard
euro-adc-65m-14b-40cha
euro-adc-65m-14b-40cha-gw
Commits
b34118cf
Commit
b34118cf
authored
Aug 26, 2017
by
Dave Newbold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testing align script
parent
96a5b7a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
align_adc.py
projects/64ch/software/align_adc.py
+4
-1
No files found.
projects/64ch/software/align_adc.py
View file @
b34118cf
...
...
@@ -32,6 +32,7 @@ def spi_read(spi, addr):
return
d
&
0xffff
offsets
=
[
0
,
13
,
2
,
1
,
4
,
3
,
6
,
5
,
8
,
7
,
10
,
9
,
12
,
11
]
invert
=
[
0x1d
,
0x1e
,
0x1f
,
0x20
,
0x21
,
0x22
,
0x23
,
0x24
,
0x25
]
uhal
.
setLogLevelTo
(
uhal
.
LogLevel
.
ERROR
)
board
=
uhal
.
getDevice
(
"board"
,
"ipbusudp-2.0://192.168.235.50:50001"
,
"file://addrtab/top.xml"
)
...
...
@@ -72,7 +73,9 @@ for i_chan in chans:
board
.
getNode
(
"csr.ctrl.chan"
)
.
write
(
i_chan
)
# Talk to channel 0
board
.
getNode
(
"daq.chan.csr.ctrl.mode"
)
.
write
(
0x1
)
# Set to capture mode
board
.
getNode
(
"daq.chan.csr.ctrl.src"
)
.
write
(
0x0
)
# Set source to ADC
board
.
getNode
(
"daq.chan.csr.ctrl.en_sync"
)
.
write
(
0x1
)
# Enable sync commands for this channel
board
.
getNode
(
"daq.chan.csr.ctrl.en_sync"
)
.
write
(
0x1
)
# Enable sync commands
if
i_chan
in
invert
:
board
.
getNode
(
"daq.chan.csr.ctrl.invert"
)
.
write
(
0x1
)
# Invert the data
board
.
getNode
(
"daq.chan.csr.ctrl.en_buf"
)
.
write
(
0x1
)
# Enable this channel
board
.
dispatch
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment