Serial Port Read

General discussion on mikroC.
Post Reply
Author
Message
syd_b
Posts: 1
Joined: 01 Apr 2011 19:06

Serial Port Read

#1 Post by syd_b » 01 Apr 2011 19:19

Hi,
How can I read 2 bytes from the serial port (USART_READ) and store this value to make a single value?

What I want is to read the bytes and then join them to convert them to a value. For example if I read 11111111 and then 0000001. Join them to make a value of 511

It´s posible to do this?

Thanks.

balazs
Posts: 37
Joined: 20 Mar 2010 14:53

Re: Serial Port Read

#2 Post by balazs » 19 Apr 2011 20:35

Hi,
you should check in your uC datasheet about UART.Maybe your uC has only 1 byte buffer and then if your sending 2 bytes at the same time your second byte will be lost.I don't know what do you mean about converting 11111111 with 00000001, please explain it detailed.

Regards, Balazs.

Post Reply

Return to “mikroC General”