Jump to content
  • 0

PMOD maxsonar


Stanislav

Question

Hello

I have some questions about UART interfacing of 'Pmod MAXSONAR' part. Datasheet says that the UART package consist of 5 bytes: start byte(ASCII 'R'), three data bytes and stop byte (ASCII '13').

1. Isn`t it  6 bytes package? Because ASCII character '13' has 2 bytes. Do we count start byte (ASCII 'R') in that case?

2. What is the order in data bytes? Is it   __'R' Data0 Data1 Data2 '13'__   or  __'R' Data2 Data1 Data0 '13'__  (here two versions of uart packages are presented)? 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

Hi @Stanislav, welcome to the forum!

ASCII character 13 in this case refers to the carriage return character '\r', rather than the string "13". The most significant digit should be transmitted first so that a straightforward UART passthrough to a serial console prints the data in human-readable form.

Thanks,

Arthur

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...