|
Post by NeX on May 30, 2015 10:16:24 GMT -8
Hi there,
I am trying to port the GD2 library to an AT90CAN128 chip but all i am getting is a white screen. What in the GD2 library is there that might be processor dependent. for example pin 8, how is that defined? by pin number or port?
thanks
|
|
|
Post by jamesbowman on May 30, 2015 11:35:39 GMT -8
First off, just making sure that you are working from the latest driver code: github.com/jamesbowman/gd2-libGiven that, the file transports/wiring.h handles the low-level issuing of commands. I would github.com/jamesbowman/gd2-lib/blob/master/transports/wiring.hA first step might be to add something at line 26, just after the FT800 has booted to print out REG_ID, for example. This would prove that basic SPI communication is running. It should print out "7C" if the FT800 is talking. digitalWrite(CS, LOW); SPI.transfer(0x10); SPI.transfer(0x24); SPI.transfer(0x00); SPI.transfer(0x00); Serial.println(SPI.transfer(0x00), HEX); digitalWrite(CS, HIGH);
|
|
|
Post by NeX on Jun 13, 2015 0:39:44 GMT -8
thanks again James for your help
It turns out that i was using the wrong pins. it works now but it is asking to calibrate the touchscreen and i don't have a touchscreen, is there any way to get it to ignore the calibration?
|
|
|
Post by jamesbowman on Jun 13, 2015 7:04:03 GMT -8
Yes, in GD.begin() do something like:
GD.begin(~GD_CALIBRATE);
which turns off calibration.
|
|
|
Post by NeX on Jun 13, 2015 21:47:18 GMT -8
perfect! thanks again!
|
|