I am writing a short I2C routine for sending characters to a character display.
I #defined LCD_Data as P0_2, and LCD_Clock as P0_3
The routines work in C, but when I create an inline assembly routine using _LCD_Data and _LCD_Clock to manipulate the port pins, I get an "unassigned global LCD_Data" and the same for LCD_Clock.
How do I need to declare them for use in assembly?
The assembler does not use the C preprocessor which converts LCD_Data to P0_2. Instead you must use P0_2 itself. You have correctly added the leading underscore, so _P0_2 should work.
I will try it...
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.