This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can i set the serial baud rate

Please help me in setting the baud rate in 89c51.I am doing project in 8051 which is a message transmitter.What i mean is there are two blocks
in my project one is transmitter And other is receiver.

The transmitter consist of 64 keys which is obtained by 8*8 matrix key board.I am aiming
for A to Z alphabets & 0 to 9 no.

After decoding which key is pressed
i has to transmit the pressed key which will display on the receiver.I am planing to use 433Mhz transmitter & receiver the problem is that the transmitter and receiver has only 20kbps speed so i has to reduce the baud rate considerably.

Parents
  • this is the code i use for the serial

    
    void Send_Character ( unsigned int Array [] )
    $(SRC)
    {
            PUSH    ACC           ; store accumulater onto stack
            MOV     P, ACC.3      ; get the bit for later
            PUSH    B             ; store the other data
    }
            theByte = Array[1];   ; get the data from calling code
    $(SRC)
    {
            MOV     ACC, theByte  ; get the only byte
            MOV     SBUF2, theByte ; store it to uarter
    }
    
            Array = Array + 3;     ; add to next bit for later
    
    $(SRC)
    {
            POP     ACC          ; get the accumulater back
    }
    
            return DONE_IT;
    }
    

Reply
  • this is the code i use for the serial

    
    void Send_Character ( unsigned int Array [] )
    $(SRC)
    {
            PUSH    ACC           ; store accumulater onto stack
            MOV     P, ACC.3      ; get the bit for later
            PUSH    B             ; store the other data
    }
            theByte = Array[1];   ; get the data from calling code
    $(SRC)
    {
            MOV     ACC, theByte  ; get the only byte
            MOV     SBUF2, theByte ; store it to uarter
    }
    
            Array = Array + 3;     ; add to next bit for later
    
    $(SRC)
    {
            POP     ACC          ; get the accumulater back
    }
    
            return DONE_IT;
    }
    

Children