Arducam-LF Shield with 3.2" TFT Touchscree - Help

Status
Not open for further replies.

mjs513

Senior Member+
I just picked up a Arducam-LF Mega/uno shield with OV2640 and a 3.2inch TFT LCD Touch screen. Using a modified Arducam lib by sumotoy (https://github.com/ArduCAM/Arduino/pull/7) I managed to get it save images to the SD Card and stream video to PC over serial.

I am using the shield version since I created a mega style breakout board (https://forum.pjrc.com/threads/43353-New-Teensy-3-2-3-1-shield?p=147450&viewfull=1#post147450).

Unfortunately I can not figure out how to get it display to LCD or get any of the demos working. It is using a modified UTFT library (https://github.com/ArduCAM/Arduino/tree/master/UTFT4ArduCAM_SPI) for the arducam but looks like it should work for different screens as well - I think it has a ssd1289 but no exact details.

Update: I tested it on a Mega and it seems to work fine with the model selected. I also ran there SPI bus test but it is failing, only returning FF's here is the test pgm:
Code:
// ArduCAM demo (C)2013 Lee
// web: http://www.ArduCAM.com
// This program is a demo of how to test the ArduCAM shield SPI communication
// to check out if bus has errors.
//
// This demo was made for Omnivision OV5642 sensor.
// 1. Write ArduCHIP internal test registers.
// 2. Read out ArduCHIP internal test registers and send back to Serial Monitor
// 3. Read out ArduCHIP internal Revision registers and send back to Serial Monitor
// This program requires the ArduCAM V3.0.0 (or above) library and Rev.C ArduCAM shield
// and use Arduino IDE 1.5.2 compiler


#include <Wire.h>
#include <ArduCAM.h>
#include <SPI.h>
#include <SD.h>

// set pin 10 as the slave select for the ArduCAM shield:
const int slaveSelectPin = 10;


ArduCAM myCAM(OV2640,slaveSelectPin);

void setup()
{
  Serial.begin(115200);
  Serial.println("Test START..."); 
  // initialize SPI:
  myCAM.begin(true,false);

}

void loop()
{
  uint8_t temp1,temp2,revision;
  myCAM.write_reg(ARDUCHIP_TEST1, 0x55);		 //Write to test1 register by 0x55
  myCAM.write_reg(ARDUCHIP_TEST2, 0xAA);		 //Write to test1 register by 0xaa
  delay(1000);
  temp1 = myCAM.read_reg(ARDUCHIP_TEST1);                //Read from test1 register 
  temp2 = myCAM.read_reg(ARDUCHIP_TEST2);                //Read from test1 register
  Serial.println(temp1, HEX);
  Serial.println(temp2, HEX);
  delay(1000);
  myCAM.write_reg(ARDUCHIP_TEST1, 0xAA);		 //Write to test1 register by 0x55
  myCAM.write_reg(ARDUCHIP_TEST2, 0x55);		 //Write to test1 register by 0xaa
  delay(1000);
  temp1 = myCAM.read_reg(ARDUCHIP_TEST1);                //Read from test1 register 
  temp2 = myCAM.read_reg(ARDUCHIP_TEST2);                //Read from test1 register
  Serial.println(temp1, HEX);
  Serial.println(temp2, HEX);
  delay(1000);
  revision = myCAM.read_reg(ARDUCHIP_REV);                   //Read from REV register
  Serial.println(revision, HEX);
  delay(1000);
  
}

Beginning to look at the SPI code in Arducam. He uses a define for Teensyduino to specify using digitalwritefast, etc. Is this the way to do it?

Sympton: Backlight just stays on and nothing else gets displayed.

Any help or guidance would really be appreciated.

Thanks
Mike
 
Last edited:
In the continuing saga. Anyway, I finally got the spi test sketch working, isolated down to a bad connection then it worked fine. I also rewrote the utft_spi.h and cpp to use spi transaction like was done in the Arducam library. Still did not work. Basically it boils down to that any spi writes to the LCD are failing. Did some debugging and lots of prints. Not sure why this would be.
 
Ok. Had some issues with the transaction code I put in place so I decided to go back to the original library. Did finally manage to get that version working by commenting out some lines (per a previous post) and changing the processor speed to 24Mhz. Anything higher than that causes the display to miss updates or just not display anything. Any suggestions would be helpful. My guess is I have to go ahead and update the so it works with and without spi transactions.?
 
I changed the LCD driver to use transactions and keeping it at 8Mhz but no luck. It works only at 24Mhz. Not sure why. Supposed it works with a T3.2. I attaching the code I changed in case anybody wants to take a look at to see what mistakes I did.
 

Attachments

  • HW_AVR_SPI_defines.h
    2 KB · Views: 96
  • UTFT_SPI.cpp
    20 KB · Views: 172
  • UTFT_SPI.h
    11.2 KB · Views: 247
Status
Not open for further replies.
Back
Top