JoseL
Newbie level 5
- Joined
- Apr 19, 2014
- Messages
- 10
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 80
hello everybody,
I’m trying to understand how is working the rs232 controller, and I thing I have understood nearly everything, the only thing I can’t understand properly is how calculate the oversampling value to get the data, I mean the baud rate.
I’m working with the digilent’s code RS232RefComp.vhd (https://github.com/ibm2030/IBM2030/blob/master/RS232RefComp.vhd) , at the line 76 is where the sampling rate is calculated, I copy/paste that line:
constant baudDivide : std_logic_vector(7 downto 0) := "10100011"; --Baud Rate dividor, set now for a rate of 9600. Found by dividing 50MHz by 9600 and 16.
When I do the same operation (50000000/9600)/16 it gives me = 325.5 which is aprox. the double than the one is at the code ("10100011" = 163) if I divide per 32 instead 16 the operations match with of the code.
What I’m doing wrong? What’s I missing?
Thank you very much in advance.
Regards.
I’m trying to understand how is working the rs232 controller, and I thing I have understood nearly everything, the only thing I can’t understand properly is how calculate the oversampling value to get the data, I mean the baud rate.
I’m working with the digilent’s code RS232RefComp.vhd (https://github.com/ibm2030/IBM2030/blob/master/RS232RefComp.vhd) , at the line 76 is where the sampling rate is calculated, I copy/paste that line:
constant baudDivide : std_logic_vector(7 downto 0) := "10100011"; --Baud Rate dividor, set now for a rate of 9600. Found by dividing 50MHz by 9600 and 16.
When I do the same operation (50000000/9600)/16 it gives me = 325.5 which is aprox. the double than the one is at the code ("10100011" = 163) if I divide per 32 instead 16 the operations match with of the code.
What I’m doing wrong? What’s I missing?
Thank you very much in advance.
Regards.