Algorithm baud rate decoder with the help of counter

Status
Not open for further replies.

isaac12345

Member level 2
Joined
Mar 24, 2010
Messages
47
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,634
Help with algorithm for baud rate decoder with the help of counter

Hi,

I need to make a baud rate decoder which takes a 16bit input from the output of a down counter. The down counter is simply enabled by a controller at a certain point and then stopped after some time, after which the baud rate decoder is enabled which calculates the baud rate and enables one of the 7 output lines, each line signifying a baud rate(300,600,1200 till 19200).

What I cant understand is how can I use the counter's value to calculate the baud rate? As I understand, a counter gives a binary value which represents time. As I know the number of bits that it counts over, should I simply have my baud rate decoder divide the number of bits by the counter's value?

I'm coding in VHDL.
 

It is difficult to understand what you want.
What clock frequency are you feeding to the counter?
What UART do you have? Most UART's want a clock frequency 16 times higher than the baud rate. If you design your own UART you should use a clock frequency at least 3 times higher than the baud rate.
 

I’m using microcontroller Atmel at89c52. I need to make an interface with a wireless sensor via serial port with 19200 baud rate
I have used 11.0592 MHz Crystal but the uC didn't respond for send or receive
Is there any problem with this code for serial please?

; FUNCTIONS/SUBROUTINES
SERIAL1:
MOV A, PCON
SETB ACC.7
MOV PCON, A
MOV TMOD, #20H; timer1 mode 2
MOV TH1, #0FDH
MOV SCON, #50H ; 8-BIT, 1 STOP BIT, REN ENABLED
SETB TCON.6
CLR TI
MOV SBUF, A
H_1: JNB TI, H_1
RET
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…