Código: Seleccionar todo
process( mcu_clk, mcu_kbd, mcu_reset)
begin
if ( mcu_reset = '1'  ) then
  kb_addr <= 0;
else
	if ( rising_edge( mcu_clk )) then
		-- read the key status from the micro-controller
		-- if the bit is '1' that means the key is pressed
  		kb_data( conv_integer(kb_addr)  ) <=  mcu_kbd;
	end if;
	if ( falling_edge( mcu_clk )) then
		-- increment the pointed to the address of the next 5
		kb_addr <= kb_addr + 1;
	end if;
 			 
end if;
end process;
Código: Seleccionar todo
	always@(posedge Ard_CLK or posedge Ard_Reset) begin
		if (Ard_Reset == 1'b1)
			offset <= 6'b0;
		else begin
			buff[offset] <= Ard_Data;
			offset <= offset + 1;
		end
	end
