Luke, thanks for the reply. This is probably not the right place to ask for troubleshooting help, but if it’s an obvious error…
I’ve got the UART wired up: 8 inout pins, one output wire is active low to transmit, another active low output wire to receive. There’s a 4-state FSM which reads, echoes a char, does nothing, sends an ‘A’. Code snippets look like:
inout pin4, ....
wire [7:0] data; ...
assign pin4= data; ....
// UART input and output
reg [7:0] echoed_data;
reg RX=1; ...
assign data= (!TX) ? echoed_data : 8'bz;
What I’m seeing is characters being read, as I can see the RX line strobing low, and the UART has a separate pin which is low when there is data, high when no data.
I’m seeing the code transmitting the ‘A’ in the 4th FSM state. What I’m not seeing is the input character in the READ state above being echoed in the next state. TX=0 and RX=1 in the ECHO state.
So, is the echoed_data= data; line not actually storing the input value from the inout pins?
Anyway, I’m not expecting a solution, just hoping someone might spot it!