Yahoo Groups archive

AVR-Chat

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

Message

Re: Assembler directive equ

2005-11-01 by Gustavo Goretkin

What is the difference between doing:

.equ IOPIN = PD0
.equ IOPORT= PortD

then...

.equ IOPIN = 0
.equ IOPORT=PortD

thank you.
Gustavo

Gustavo Goretkin wrote:

> Hello, I'm trying to figure a better way to write my code
> Currently for each I/O pin I have something like
> .equ LCD_Enable_Port = Port C
> .equ LCD_Enable = 0
>
> and so forth for each pin. when I want to set the pint equal to one, I 
> would do
> sbi   LCD_Enable_Port, LCD_Enable.
>
> I was wondering if I could combine both equates to do something like this
> .equ LCD_Enable = Portc, 0
>
> and then to set it to one I could just do
> sbi LCD_Enable
>
> Is this possible with AVR Studio's assembler? Thank you in advance.
>

Attachments

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.