bianchi77
Advanced Member level 4
- Joined
- Jun 11, 2009
- Messages
- 1,313
- Helped
- 21
- Reputation
- 44
- Reaction score
- 20
- Trophy points
- 1,318
- Location
- California
- Activity points
- 9,442
Guys,
Why can't I pass a value into a function on AVR ?
Please have look :
I tried : lcd_command(0xFF);
but 0xFF never enter into lcd_data_pin, any ideas ?
Thanks for sharing
- - - Updated - - -
If I tested it without function, it's working :
Any clues ?
thanks
Why can't I pass a value into a function on AVR ?
Please have look :
Code:
int lcd_command(char comm) // function to send command to LCD
{
lcd_data_pin=comm;
en(1);
rs(0);
rw(0);
_delay_ms(50);
en(0);
}
I tried : lcd_command(0xFF);
but 0xFF never enter into lcd_data_pin, any ideas ?
Thanks for sharing
- - - Updated - - -
If I tested it without function, it's working :
Code:
rs(0);
_delay_ms(100); //delay
rs(1);
_delay_ms(100); //delay
rw(0);
_delay_ms(100); //delay
rw(1);
_delay_ms(100); //delay
en(0);
_delay_ms(100); //delay
en(1);
_delay_ms(100); //delay
lcd_data_pin = 0xFF;
_delay_ms(100); //delay
lcd_data_pin = 0x00;
Any clues ?
thanks