Closed GoogleCodeExporter closed 9 years ago
HW SPI is not supported (did you try SW SPI also?)
To make HW SPI working, you need to patch
u8g_com_arduino_st7920_hw_spi.c
Probably lines 120 to 125 need to be updated
Original comment by olikr...@gmail.com
on 6 May 2013 at 5:56
Why doesn't it support SPI using the u8g_com_arduino_hw_spi.c file?
Original comment by giann...@gmail.com
on 6 May 2013 at 6:44
I do not own an Arduino Mega :-(
You could patch the file, do the testing and send the result back to me... then
i can add the modification.
Original comment by olikr...@gmail.com
on 6 May 2013 at 8:31
It is a really easy fix, all I did is changing the pin numbers. It works! I
can't create a patch file right now, but here are the lines I changed:
DDRB |= _BV(2); /* D0, MOSI */
DDRB |= _BV(1); /* SCK */
DDRB |= _BV(0); /* slave select */
PORTB &= ~_BV(2); /* D0, MOSI = 0 */
PORTB &= ~_BV(1); /* SCK = 0 */
If you need further testing, I'll be glad to help!
Original comment by giann...@gmail.com
on 6 May 2013 at 9:00
c code has been updated (Arduino variant uses the arduino pin definitions now)
ToDo
Test wether the Arduino Uno still works with HW SPI.
Test case: Use HW SPI with ST7920 (HelloWorld)
Original comment by olikr...@gmail.com
on 7 May 2013 at 7:31
still ok, tested during performance updates
Original comment by olikr...@gmail.com
on 5 Jun 2013 at 8:08
Original issue reported on code.google.com by
giann...@gmail.com
on 6 May 2013 at 1:50