1.8 tft with atmega 8515

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everyone, I just bought a cool 1.8" TFT display from Newhavendisplay and I wired it to my stk500 which has the atmega8515 on it. Now I'm trying to see if I can do anything on it, change a color, show a line, shit show a dot, but nothing seems to be working.

My Pin layout is as follows:

RD PB7
WR PB6
RS PB5
CS PB4
IMO PB3
RST PB2

PORTA = DB0-DB7
PORTC = DB8-DB15

Back light is also hooked on and comes on.

I'm using avr studio with gcc, I attached my code and I also put the documents in the zip file. I also called newhaven, they helped me with the initialization, but it's still not working. I figure it's something silly I'm not doing correctly.
Any help will be greatly appreciated.

*Edit: Sorry, the documents are too big to attach, here aer the links:
For the TFT:
http://www.newhavendisplay.com/i...

For the Driver:
http://trulylcds.com/tft/specs/D...

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would start by setting your ports to outputs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use the spi... just need 3 wires. Easier to hook up.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I would start by setting your ports to outputs.

:oops: :oops: :oops: WOWOWOWWOW :oops: :oops: :oops:

Now thats embrassing, can't believe I forgot to change them to outputs. Going to test now, will post results.

Hmmm.. spi sounds like a good option too

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
spi sounds like a good option too
Too bad they already decided which interface you can use (and can't use).

If you get something to display, post a picture.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Still no luck :(, hmmm.. im going to go back over my pins, but latest changes include:

DDRA= 0xFF;
DDRB= 0xFF;
DDRC= 0xFF;
and I just decided to gnd the IMO pin, since it needs to be low anyhow

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ahh so it was partially newhavens fault, on the doc pg 5 has reset as pin 4 and IM0 as pin 5, and on pg6 the pin connections show IM0 as pin4 and reset as pin5, after I spoke to tech support they told me 4 was IM0 and 5 is reset. So i'm able to change colors, but its not working as I wanted it to, I was trying to display a picture, by taken a pic, making it 16bit, then I use frhed hex editor to export a hexdump, but in said of the pic showing, I'm just getting a varies colors. I posted some of the pics, time to play around with it some more.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
If you get something to display, post a picture.
I should have been more specific on the meaning of 'something'. Just kidding. We still look forward to 'something' being displayed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I realized the 8515 just didn't have enough memory or flash to program this tft, so I placed a stk501 on top of my stk500 with an atmega1281. I placed the connections for the LCD in the same expansion slots, but the LCD is changing colors or displaying anything.. Do you guys have any idea why that would happen?

I used the exact same pin layout.
RD PB7
WR PB6
RS PB5
CS PB4
IMO PB3
RST PB2

PORTA = DB0-DB7
PORTC = DB8-DB15

I also tried to take back out the stk501 and connect the lcd back to the expansion slots on the stk500 and it worked again, but when I put it in the stk501 expansion slots it doesn't work :(. The ISP is connected correctly, because I can program it, but no results...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dammit noob mistake, its working :oops: , forgot to remove the 8515 lol

edit okay, back to trying to display "something"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
../LCDtest.c:577: error: size of variable 'pikachu' is too large

Has anyone seen this error? I think it might be because the array is too big?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yep thats the reason, I had to break the data into 2 arrays

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bootloadernoob wrote:
Quote:
../LCDtest.c:577: error: size of variable 'pikachu' is too large

Has anyone seen this error? I think it might be because the array is too big?

Nope, sorry! I've never seen this error because I have never (and likely will never) name a variable "pikachu".

:-)

Mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LOL, trying to show pikachu on the lcd :lol:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I really need to find an easier way to do this, geeeeez, I manage to get an H, on the screen, but my phone is dead, so no pics. Is there an easier way to program tfts? Like maybe a graphic accelerator, I'm currently researching 2D ones now

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's a VGA controller specifically for embedded use that allows the use of graphics primitives.

Note that this is just the controller (not the video circuitry), and I highly doubt it would work with your TFT. It's the only thing I know of that's anything like what you're describing.

http://www.4dsystems.com.au/prod.php?id=15

Mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Programing graphics is anythig but slow. Not too difficult, but a lot of work. My experience dictated that is a question of 'I like this' and 'I don't like this', a question of many fonts (a lot of work unless you have them prebuild or some program that build them for you), a question of Bitmaps and graphics, and memory to store the last ones.

If you do it for yourself, then do what you like, but be aware: you will need a long time and some tools. If you work for a company, try that the responsibles of the aestetics of the product fix what they want quite clearly before you begin to work.

Guillem.
"Common sense is the least common of the senses" Anonymous.