Commit 9a6ced7b authored by Tristan Gingold's avatar Tristan Gingold

serial_dac856x.vhd: set gain

parent eefe0fce
...@@ -28,7 +28,7 @@ end serial_dac856x; ...@@ -28,7 +28,7 @@ end serial_dac856x;
architecture behav of serial_dac856x is architecture behav of serial_dac856x is
-- Initialization state machine. -- Initialization state machine.
type t_state is (S_WAIT, S_CMD_SYNC, S_CMD_REF, S_DONE); type t_state is (S_WAIT, S_CMD_SYNC, S_CMD_REF, S_CMD_GAIN, S_DONE);
signal state : t_state; signal state : t_state;
-- Serial clock generation. -- Serial clock generation.
...@@ -138,6 +138,11 @@ begin ...@@ -138,6 +138,11 @@ begin
-- Set reference -- Set reference
buf <= "XX" & "111" & "XXX" & "XXXXXXXXXXXXXXX" & g_internal_ref; buf <= "XX" & "111" & "XXX" & "XXXXXXXXXXXXXXX" & g_internal_ref;
busy <= '1'; busy <= '1';
state <= S_CMD_GAIN;
when S_CMD_GAIN =>
-- Set gain (1 on both channels)
buf <= "XX" & "010" & "XXX" & "XXXXXXXXXXXXXX" & "11";
busy <= '1';
state <= S_DONE; state <= S_DONE;
when S_DONE => when S_DONE =>
-- Choose (with implicit priority the new data to be transmitted). -- Choose (with implicit priority the new data to be transmitted).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment