Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

mega16 UBRRH/UCSRC

mega16 UBRRH/UCSRC

2004-04-09 by Dan

Hello,

I'm trying to write a program that implements the UART on my ATmega16 
and allow it to communicate with my PC.  In configuring the two 
registers UBRRH and UCSRC, I have run into difficulty.  I understand 
that these two registers share the same address space and that the 
first bit determines which register is written to.  However, when I 
run the simulator in AVRStudio 4, both registers are written no 
matter what that bit is.  Here is the code snippet and what happens 
in comments:

ldi temp, 0b10001100
out UCSRC, temp     ;UBRRH = xxxx1100, UCSRC = 10001100
ldi temp, 0b00000000
out UBRRH, temp     ;UBRRH = xxxx0000, UCSRC = 00000000

Is this just an issue with the simulator in AVRStudio or am I really 
making a mistake somewhere?  I do not have an STK500 because I'm in 
college (read: poor), so I have no way of knowing what the AVR is 
really doing.

Any help is greatly appreciated.
Thanks,

~Dan

P.S. - is there a way to directly input text in Hyperterminal?  What 
are some Hyperterminal alternatives?

Re: mega16 UBRRH/UCSRC

2004-04-09 by Dan

Is that what a shadow register is?  I noticed that earlier but wasn't 
certain what it was.  Thanks for your help

~Dan

--- In AVR-Chat@yahoogroups.com, "Kathy Quinlan" <kat-yahoo@k...> 
wrote:
> Read the AVR Studio 4 Bug and Help File, I think this is listed in 
there
> as a thing they are working on.
> 
> 
> Regards,
> 
> Kat.
> 
> > -----Original Message-----
> > From: Dan [mailto:danh48176@y...] 
> > Sent: Saturday, 10 April 2004 6:03 AM
> > To: AVR-Chat@yahoogroups.com
> > Subject: [AVR-Chat] mega16 UBRRH/UCSRC
> > 
> > 
> > Hello,
> > 
> > I'm trying to write a program that implements the UART on my 
ATmega16 
> > and allow it to communicate with my PC.  In configuring the two 
> > registers UBRRH and UCSRC, I have run into difficulty.  I 
understand 
> > that these two registers share the same address space and that 
the 
> > first bit determines which register is written to.  However, when 
I 
> > run the simulator in AVRStudio 4, both registers are written no 
> > matter what that bit is.  Here is the code snippet and what 
happens 
> > in comments:
> > 
> > ldi temp, 0b10001100
> > out UCSRC, temp     ;UBRRH = xxxx1100, UCSRC = 10001100
> > ldi temp, 0b00000000
> > out UBRRH, temp     ;UBRRH = xxxx0000, UCSRC = 00000000
> > 
> > Is this just an issue with the simulator in AVRStudio or am I 
really 
> > making a mistake somewhere?  I do not have an STK500 because I'm 
in 
> > college (read: poor), so I have no way of knowing what the AVR is 
> > really doing.
> > 
> > Any help is greatly appreciated.
> > Thanks,
> > 
> > ~Dan
> > 
> > P.S. - is there a way to directly input text in Hyperterminal?  
What 
Show quoted textHide quoted text
> > are some Hyperterminal alternatives?
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.642 / Virus Database: 410 - Release Date: 24/03/2004
> >  
> > 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.642 / Virus Database: 410 - Release Date: 24/03/2004

RE: [AVR-Chat] mega16 UBRRH/UCSRC

2004-04-10 by Kathy Quinlan

Read the AVR Studio 4 Bug and Help File, I think this is listed in there
as a thing they are working on.


Regards,

Kat.

> -----Original Message-----
> From: Dan [mailto:danh48176@yahoo.com] 
> Sent: Saturday, 10 April 2004 6:03 AM
> To: AVR-Chat@yahoogroups.com
> Subject: [AVR-Chat] mega16 UBRRH/UCSRC
> 
> 
> Hello,
> 
> I'm trying to write a program that implements the UART on my ATmega16 
> and allow it to communicate with my PC.  In configuring the two 
> registers UBRRH and UCSRC, I have run into difficulty.  I understand 
> that these two registers share the same address space and that the 
> first bit determines which register is written to.  However, when I 
> run the simulator in AVRStudio 4, both registers are written no 
> matter what that bit is.  Here is the code snippet and what happens 
> in comments:
> 
> ldi temp, 0b10001100
> out UCSRC, temp     ;UBRRH = xxxx1100, UCSRC = 10001100
> ldi temp, 0b00000000
> out UBRRH, temp     ;UBRRH = xxxx0000, UCSRC = 00000000
> 
> Is this just an issue with the simulator in AVRStudio or am I really 
> making a mistake somewhere?  I do not have an STK500 because I'm in 
> college (read: poor), so I have no way of knowing what the AVR is 
> really doing.
> 
> Any help is greatly appreciated.
> Thanks,
> 
> ~Dan
> 
> P.S. - is there a way to directly input text in Hyperterminal?  What 
> are some Hyperterminal alternatives?
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.642 / Virus Database: 410 - Release Date: 24/03/2004
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.642 / Virus Database: 410 - Release Date: 24/03/2004

Re: mega16 UBRRH/UCSRC

2004-04-10 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, "Dan" <danh48176@y...> wrote:
> What are some Hyperterminal alternatives?

You might look at Tera Term Pro.  It's free.  Works well.  And you 
can get the source code for it if you'd like.  You can also get an 
SSH add on for it to make it a secure terminal.

See
http://hp.vector.co.jp/authors/VA002416/teraterm.html

Re: [AVR-Chat] Re: mega16 UBRRH/UCSRC

2004-04-10 by jay marante

they're normal in the simulator. both registers are written but when you try it on the chip, it will work fine. i suggest you follow the sample program on the datasheet about the USART. there's a sample program there on configuring the USART. yu might wanna copy that. :)
 
-jay

Dan <danh48176@yahoo.com> wrote:
Is that what a shadow register is?  I noticed that earlier but wasn't 
certain what it was.  Thanks for your help

~Dan

--- In AVR-Chat@yahoogroups.com, "Kathy Quinlan" <kat-yahoo@k...> 
wrote:
> Read the AVR Studio 4 Bug and Help File, I think this is listed in 
there
> as a thing they are working on.
> 
> 
> Regards,
> 
> Kat.
> 
> > -----Original Message-----
> > From: Dan [mailto:danh48176@y...] 
> > Sent: Saturday, 10 April 2004 6:03 AM
> > To: AVR-Chat@yahoogroups.com
> > Subject: [AVR-Chat] mega16 UBRRH/UCSRC
> > 
> > 
> > Hello,
> > 
> > I'm trying to write a program that implements the UART on my 
ATmega16 
> > and allow it to communicate with my PC.  In configuring the two 
> > registers UBRRH and UCSRC, I have run into difficulty.  I 
understand 
> > that these two registers share the same address space and that 
the 
> > first bit determines which register is written to.  However, when 
I 
> > run the simulator in AVRStudio 4, both registers are written no 
> > matter what that bit is.  Here is the code snippet and what 
happens 
> > in comments:
> > 
> > ldi temp, 0b10001100
> > out UCSRC, temp     ;UBRRH = xxxx1100, UCSRC = 10001100
> > ldi temp, 0b00000000
> > out UBRRH, temp     ;UBRRH = xxxx0000, UCSRC = 00000000
> > 
> > Is this just an issue with the simulator in AVRStudio or am I 
really 
> > making a mistake somewhere?  I do not have an STK500 because I'm 
in 
> > college (read: poor), so I have no way of knowing what the AVR is 
> > really doing.
> > 
> > Any help is greatly appreciated.
> > Thanks,
> > 
> > ~Dan
> > 
> > P.S. - is there a way to directly input text in Hyperterminal?  
What 
> > are some Hyperterminal alternatives?
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.642 / Virus Database: 410 - Release Date: 24/03/2004
> >  
> > 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.642 / Virus Database: 410 - Release Date: 24/03/2004



---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
   To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th

Re: [AVR-Chat] Re: mega16 UBRRH/UCSRC

2004-04-10 by Bernd Felsche

On Saturday 10 April 2004 13:42, Don Kinzer wrote:
> --- In AVR-Chat@yahoogroups.com, "Dan" <danh48176@y...> wrote:
> > What are some Hyperterminal alternatives?

> You might look at Tera Term Pro.  It's free.  Works well.  And you
> can get the source code for it if you'd like.  You can also get an
> SSH add on for it to make it a secure terminal.

> See
> http://hp.vector.co.jp/authors/VA002416/teraterm.html

TerraTerm hasn't been maintained for a while.

Look at PuTTY.
	http://www.chiark.greenend.org.uk/~sgtatham/putty/

There are associated programs to do secure FTP, etc.

-- 
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.