Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- process (iCLK) begin
- if(inRST='0') then
- sSTATE<=CLEAR;
- sCOUNT<="00000000000000000";
- sINDEX<="00000";
- sEN <= '0';
- elsif(iCLK'event and iCLK='1') then
- case sSTANJE is
- when CLEAR =>
- if (iREADY='0') then
- sSTATE <= WAIT_LCD;
- else
- sSTATE<= CLEAR;
- end if;
- when WAIT_LCD =>
- if (iREADY='1') then
- sSTATE<=SEND_CHAR;
- else
- sSTATE<=WAIT_LCD;
- end if;
- when SEND_CHAR =>
- if (iREADY='0') then
- sSTATE <= WAIT_LCD2;
- else
- sSTATE<= SEND_CHAR;
- end if;
- when WAIT_LCD2 =>
- if (iREADY='1') then
- sSTATE <= NEXT_CHAR;
- else
- sSTATE<= WAIT_LCD2;
- end if;
- when NEXT_CHAR =>
- if (sINDEX="1F") then --last char?
- sSTATE <= WAIT_HF;
- else
- sSTATE<= SEND_CHAR;
- end if;
- when WAIT_HF =>
- if(sCOUNT=x"16D3C") then --93500
- sSTATE<=ROTATE;
- sCOUNT<="00000000000000000";
- else
- sCOUNT<=sCOUNT+1;
- sSTATE<=WAIT_HF;
- end if;
- when ROTATE=>
- sSTATE<=CLEAR;
- when others =>
- sSTATE<=WAIT_LCD;
- end case;
- end if;
- end process;
Add Comment
Please, Sign In to add comment