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 to receive data from uart using this program

i am editing the program some one already made.i want help to receive the data from uart using the program.here is the interrupt program they have used.

 void serial_interrupt() interrupt 4 using 1
{
        if(RI)
                {
                RI=0;
                com_tmr_rx=5;
                com_r_busy=1;
                //datas[0]=SBUF;
                //datas[com_r_index++]=SBUF;
                if(com_r_index>=34)
                        com_r_index=0;

                }

        if(TI)
                {
                TI=0;
                TX_RX=0;
                if(com_t_index<com_t_length)
                        {
                        TX_RX=1;
                        SBUF=datas[com_t_index++];
                        }
                else
                        {
                        com_t_index=com_t_length=0;
                        TX_RX=0;
                        }

                }

}

.

Parents
  • i am editing the program some one already made

    the point always to be made is:

    if you can not make the code yourself, downloaded code is worthless.

    the only thing you can hope (not know) is that the code worked under the circumstances the Author had.

    but, if you could make the code yourself, you will have enough of an understanding of the downloaded stuff to fix/adapt it

    Erik

Reply
  • i am editing the program some one already made

    the point always to be made is:

    if you can not make the code yourself, downloaded code is worthless.

    the only thing you can hope (not know) is that the code worked under the circumstances the Author had.

    but, if you could make the code yourself, you will have enough of an understanding of the downloaded stuff to fix/adapt it

    Erik

Children