Re: how to initializatize/re-configure usart?
- From: Jack Klein <jackklein@xxxxxxxxxxx>
- Date: Fri, 28 Sep 2007 22:14:15 -0500
On Fri, 28 Sep 2007 06:44:14 -0500, "bcincin" <berkecincin@xxxxxxxxx>
wrote in comp.arch.embedded:
Hi. I want to change reset uart and change baud rate with an interface
(combobox) on windows. At the beginning default baud rate is 2400.
For what UART? What hardware is this program for?
ME2 |= UTXE1 + URXE1; // Enable USART1 TXD/RXD
UCTL1 |= CHAR; // 8-bit character
UTCTL1 |= SSEL0; // UCLK = ACLK
UBR01 = 0x0D; // 32k/2400 - 13.65
UBR11 = 0x00;
UMCTL1 = 0x6B; // Modulation
UCTL1 &= ~SWRST; // Initialize USART state machine
IE2 |= URXIE1; // Enable USART1 RX interrupt
..
how can i reset this later? I tried something like this but it doesn't
work
...
case 3: // set baud rate 9600
UCTL1 |= CHAR; // 8-bit character
UTCTL1 |= SSEL0; // UCLK = ACLK
UBR01=0x03;
UBR11=0x00;
UMCTL1=0x29;
UCTL1 &= ~SWRST;
IE2 |= URXIE1;
default;
....
Without knowing what part you are talking about, it's hard to do more
than guess. But perhaps you should at least disable the interrupt
while you are changing settings.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
.
- Follow-Ups:
- Re: how to initializatize/re-configure usart?
- From: Anton Erasmus
- Re: how to initializatize/re-configure usart?
- References:
- how to initializatize/re-configure usart?
- From: bcincin
- how to initializatize/re-configure usart?
- Prev by Date: Re: Found: The perfect dev board
- Next by Date: Re: DiskOnChip 2000 DOS Utils needed (www.m-sys.com inaccessible)
- Previous by thread: how to initializatize/re-configure usart?
- Next by thread: Re: how to initializatize/re-configure usart?
- Index(es):
Relevant Pages
|