Forum Discussion
Altera_Forum
Honored Contributor
10 years agoAssuming your baud rate, etc settings match between the PC and FPGA board, you need to check the data valid bit. You only have input data when that bit is set. If it isn't set, come back later and check again. If the data valid bit is set the number of characters field will tell you how many bytes you can read before waiting for data valid again. The code you have doesn't do this.