Yahoo Groups archive

AVR-Chat

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

Message

Assembler directive equ

2005-10-23 by Gustavo Goretkin

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.