Author Topic: PICkit UART tool query  (Read 1912 times)

0 Members and 1 Guest are viewing this topic.

Offline Udayan SinhaTopic starter

  • Regular Contributor
  • *
  • Posts: 71
PICkit UART tool query
« on: December 27, 2013, 04:18:10 am »
I was testing the ADC of a PIC18F4550 & got it to read values off a 10k POT. The hex values were being display on the UART monitor given with the PICkit-2 application. I noticed that each hex value being transmitted ended with a "0A". I have attached a snapshot of the same. Can anyone tell me what it is for?
Since the code & circuit seem to work fine, I have not posted any schematics or code. Let me know if you want me to upload them as well.
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5026
  • Country: ro
  • .
Re: PICkit UART tool query
« Reply #1 on: December 27, 2013, 04:29:53 am »
0x0A is short for LINE FEED

It's the ASCII character that makes the console advance to a new line.

In Windows when you press ENTER, you basically introduce two invisible characters, 0x0D + 0x0A  (CARRIAGE RETURN + LINE FEED)

CARRIAGE RETURN (the name) is from the old days of typewriters, basically puts the cursor back on the first character in the line.  Other systems only send 0x0A because it's assumed that when you say "new line" you want the cursor automatically moved on the first character position.

ps. it even says in the picture now that i had a second look ... see that "ascii newline = 0D 0A"
 

Offline Udayan SinhaTopic starter

  • Regular Contributor
  • *
  • Posts: 71
Re: PICkit UART tool query
« Reply #2 on: December 27, 2013, 05:03:18 am »
Oh...okay got it. Thanks a lot.  :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf