Yahoo Groups archive

AVR-Chat

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

Thread

Atmega16 assy code examples ?

Atmega16 assy code examples ?

2004-03-04 by radeohedca

I'm just getting started with AVRs.
Can anyone point me to some sites that have programming examples
in assembler to demonstrate I/O, serial coms etc.. ?
Specifically interested in the ATMEGA16 and 32.
Thanks

Re: [AVR-Chat] Atmega16 assy code examples ?

2004-03-04 by nurdin

you can try www.avrfreaks.net/ , www.blitzlogic.com/proj_avr.htm even they are not exactly code for mega16 you can modify to be used on your chips. :)
good luck!
regards,
Nurdin
Show quoted textHide quoted text
----- Original Message -----
From: radeohedca
Sent: Thursday, March 04, 2004 9:50 AM
Subject: [AVR-Chat] Atmega16 assy code examples ?

I'm just getting started with AVRs.
Can anyone point me to some sites that have programming examples
in assembler to demonstrate I/O, serial coms etc.. ?
Specifically interested in the ATMEGA16 and 32.
Thanks

Re: [AVR-Chat] Atmega16 assy code examples ?

2004-03-04 by MuRaT KaRaDeNiZ

http://www.avr-asm-tutorial.net, a good atmel avr
assembly language tutorial, also whole site is
downloadable as zip.

--- radeohedca <hduff@cogeco.ca> wrote:
> I'm just getting started with AVRs.
> Can anyone point me to some sites that have
> programming examples
> in assembler to demonstrate I/O, serial coms etc.. ?
> Specifically interested in the ATMEGA16 and 32.
> Thanks 
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

Opcodes

2004-03-04 by David VanHorn

Odd question: I know that 0000h is a nop, but what does FFFFh do?

When one leaves areas of memory unprogrammed, this makes a difference, if the program jumps there.

Re: [AVR-Chat] Opcodes

2004-03-05 by Wagner Lipnharski

1111-111r rrrr-Xbbb

Skip if Bit in Register is Set.

FFFFh means:

Skip over the next instruction if bit 7 of Register 31 (1Fh) is set.

It means that leaving the rest of the memory programmed as FFFFh, the AVR
will be running over the entire FFFFh area instruction by instruction if
Reg31 bit 7 is off. If such bit is on, it will run over the same area but
jumping one instruction after executing the previous, so the program counter
will execute only instructions addresses of multiple of 4 bytes starting at
the first FFFF found.

It means that if by some reason a block of FFFFh is found in a sequence of
program, if such bit 7 is off nothing bad will happens, since the AVR will
go completely over the FFFFh without any problem and will execute the first
valid instruction after the block.

But if bit 7 is on, and the FFFFh block size (byte count) not being multiple
of 4, then the program counter may exit the FFFFh block skiping over the
first valid instruction after the block.  The reason is that when such bit 7
is on, the counter jumps one instruction (2 bytes) and execute next, jumps
one instruction and executes next. The "next" (jumped) can be the first
valid after the block.

Wagner Lipnharski - email:  wagner@ustr.net
UST Research Inc. - Development Director
http://www.ustr.net - Orlando Florida 32837
Licensed Consultant Atmel AVR _/_/_/_/_/_/
March 5, 2004 10:34 am
Show quoted textHide quoted text
----- Original Message -----
From: "David VanHorn" <dvanhorn@cedar.net>
To: <AVR-Chat@yahoogroups.com>
Sent: Thursday, March 04, 2004 5:01 PM
Subject: [AVR-Chat] Opcodes


>
> Odd question: I know that 0000h is a nop, but what does FFFFh do?
>
> When one leaves areas of memory unprogrammed, this makes a difference, if
the program jumps there.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.600 / Virus Database: 381 - Release Date: 2/28/2004

Re: [AVR-Chat] Opcodes

2004-03-05 by David VanHorn

At 10:37 AM 3/5/2004 -0500, Wagner Lipnharski wrote:

>1111-111r rrrr-Xbbb
>
>Skip if Bit in Register is Set.

Ah, I missed that.

So filling with F's is generally a bad idea.
:)

Re: Opcodes

2004-03-06 by Jeremy Brandon

--- In AVR-Chat@yahoogroups.com, David VanHorn <dvanhorn@c...> wrote:
> >1111-111r rrrr-Xbbb
> >Skip if Bit in Register is Set.
> Ah, I missed that.

I posted all the opcodes here last year:

http://groups.yahoo.com/group/AVR-Chat/files/AVRopcodes.htm 

Take your pick!

Jeremy

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.