Okay, thanks. I sitll have one question... 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. John Samperi wrote: >At 06:32 AM 2/11/2005, you wrote: > > >>What is the difference between doing: >> >>.equ IOPIN = PD0 >>.equ IOPORT= PortD >> >>then... >> >>.equ IOPIN = 0 >>.equ IOPORT=PortD >> >> > >No difference as PD0 would be defined as bit 0 somewhere else. >May want to watch the case of the labels as assembler V2 can >be setup to be case sensitive. > >Regards > >John Samperi > >******************************************************** >Ampertronics Pty. Ltd. >11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA >Tel. (02) 9674-6495 Fax (02) 9674-8745 >Email: john@ampertronics.com.au >Website http://www.ampertronics.com.au >*Electronic Design * Custom Products * Contract Assembly >******************************************************** > > > > > > >Yahoo! Groups Links > > > > > > > > > > >
Message
Re: [AVR-Chat] Re: Assembler directive equ
2005-11-02 by Gustavo Goretkin
Attachments
- No local attachments were found for this message.