8 bit UART missing the msb

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just can't figure this one out, so please be kind and read along:

I using a 8515 and avrgcc. The UART will send and receive 7 bit ascii characters all day long. But, when I try to send a character with the msb set it, I can't detect it.

The hardware is a modified Olimex prototype board. So I have a MAX232 chip and the signals look fine on the scope. On the 8515 the UART transmitter is enabled. By default then it is set for 8 bit mode. The clock is 8 MHz and the UBRR is set for 51.

UCR = _BV(TXEN);

I'm using HyperTerminal to watch the UART output and it is set for 8-1-N. Both ends are set for 9600 baud.

If I send a series of characters, defined as uint8_t, like the following:

0xb3, 0xb4, 0xb5

What I see on Hyperterminal is:

0x33, 0x34, 0x35

So, any ideas about where I might be going wrong?

Thanks for you time,

Tom

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm using HyperTerminal to watch the UART output

I frequently distrust what HyperTerminal tells me. You might want to try
another terminal program. I use the Bray Terminal (Mr. Bray just calls
it "Terminal" (:-))) program I got from this site; it shows ASCII/hex/
bin and a bunch of other stuff.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks mckenney,

You were correct in distrusting HyperTerminal. The Bray Terminal displayed the characters I was expecting. Well, there was a couple days wasted.

Tom

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
But, when I try to send a character with the msb set it, I can't detect it.

You probably have the force to 7 bit box checked in the ASCII setup of Hyperterminal. If you want to use Hyperterminal to send or receive data other than ASCII (i.e. normal text) you will have to use the appropriate file send/receive commands. Also anything apart from ASCII will appear as garbage on the screen...Oh no what am I doing defending a M$ product... :?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly