Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error on AVRuc3c series microcontroller

Status
Not open for further replies.

cnandha19

Member level 3
Member level 3
Joined
Aug 28, 2015
Messages
59
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
604
Code:
#define  HIGH     1
#define  LOW      0

LOAD=HIGH;                                           // take LOAD high to begin
	
LOAD=LOW;                                           // take LOAD low to latch in data
LOAD=HIGH;                                           // take LOAD high to end

ERROR = Error on these 3 lines same error lvalue required as left operand of assignment
 

Did you even declared LOAD variable anywhere ? Anyway, in general names wrote all in CAPITAL letters are used only to define constant values, not to declare variables, which means you could not assign anything to it.
 

Did you even included in project, the file on which AVR32_PIN_PA25 is declared ?
By the way, you could be a little more communicative.
 
Code:
/pin defined
#define LOAD    AS1116_SPI1_NPCS0_PIN                //AS1116    Load-Data Input:    rising edge  pin 
#define DATAIN  AS1116_SPI1_MISO_PIN  //AS1116    Serial-Data Input:   rising edge  pin 
#define CLOCK   AVR32_SPI1_SCK_PIN    //Serial-Clock Input:  maximum 10MHz  pin 





void Write_AS1116(unsigned char address,unsigned char datout);//write AS1116 command and data
void Init_AS1116(void);//Initialize max7219

void Write_AS1116 (unsigned char address, unsigned char dataout)
{
	int i;
	LOAD=1;      //ERROR Error	1	lvalue required as left operand of assignment	

	LOAD=0;    //ERROR Error	1	lvalue required as left operand of assignment	
	for(i=0;i<8;i++)
	{
		
		CLOCK=0;                                              //ERROR Error	1	lvalue required as left operand of assignment	
		DATAIN=(address & 0x80>>i) ? 1:0;
		CLOCK=1;                                      //ERROR Error	1	lvalue required as left operand of assignment	
	}

     for(i=0;i<8;i++)
    {
	
	CLOCK=0;
	DATAIN=(address & 0x80>>i) ? 1:0;
    }
    LOAD=1;                               //ERROR Error	1	lvalue required as left operand of assignment	
}



ERROR SHOWING THAT LINES I m new to 32 bit pls help me
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top