system
January 20, 2010, 8:13pm
1
Hie !
I bought a Nokia 3310 LCD shield v1.0 with Joystick from nuelectronics.com .
I would like to use it with an arduino mega board.
Could u please explain me the way i ve go to follow ?
The l
#define LCD_RST PB1
#define SPI_CS PB2
#define SPI_MOSI PB3
#define SPI_SCK PB5
#define LCD_DC PB0
#define LCD_BL PD7
but where are PB1, PB2, SPI_CS ... ?
thanks a lot !
system
January 21, 2010, 12:04am
2
system
January 21, 2010, 9:10pm
3
Thanks Inopia, but I didn't find PCF8833.h
Do u think the fix will work with Nokia_3310_lcd library (given with the Nokia 3310 LCD shield v1.0 with Joystick that I bought) ?
The n3319 header says :
#ifdef PB1
#define LCD_RST PB1
#define SPI_CS PB2
#define SPI_MOSI PB3
#define SPI_SCK PB5
#define LCD_DC PB0
#define LCD_BL PD7
#else
#define LCD_RST PORTB1
#define SPI_CS PORTB2
#define SPI_MOSI PORTB3
#define SPI_SCK PORTB5
#define LCD_DC PORTB0
#define LCD_BL PORTD7
#endif
can I copy/past in that way :
#define LCD_RESET(x) PORTH = (x)? (PORTH|(1<<PH6)) : (PORTH&~(1<<PH6))
#define LCD_CS(x) PORTB = (x)? (PORTB|(1<<PB4)) : (PORTB&~(1<<PB4))
#define LCD_CLK(x) PORTB = (x)? (PORTB|(1<<PB7)) : (PORTB&~(1<<PB7))
#define LCD_DATA(x) PORTB = (x)? (PORTB|(1<<PB5)) : (PORTB&~(1<<PB5))
#define LCD_BACKLIGHT(x) PORTH = (x)? (PORTH|(1<<PH5)) : (PORTH&~(1<<PH5))
what mean 'x' when u write 'LCD_RESET(x)' ?
and the last thing i don't understand is "using pins 10, 11, 12 and 13 for SS, MOSI, MISO and SCK respectively." but
pin10 -> PB4
pin11-> PB5
pin12 -> PB6
pin13-> PB7
thanks a lot if u help me with my mega board (atmega1280)
system
January 22, 2010, 5:01pm
4
did u get what I tryed to say ? I am sure u noticed I am not English native speaker.
if :
LCD_RESET <=> LCD_RST
SPI_CS <=> LCD_RST
???? <=> SPI_MOSI
LCD_CLK(x) <=> SPI_SCK
LCD_DATA(x) <=> LCD_DC
LCD_BACKLIGHT(x) <=> LCD_BL
and other things I don't understand, like : meaning of 'x' when u write 'LCD_RESET(x)' ...
Thanks if u can help me