Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to drive a ST7735 TFT display with MX220?
09-10-2014, 09:52 PM,
#1
How to drive a ST7735 TFT display with MX220?
I have looked far and across but can't find anything working with the ST7735 SPI tft display. There are many libraries, but all are written in C++. I am currently looking for a simple way to implement a string print on the display; but I call here for anyone who already has some work done with this display - I am using a Mx220 32bit pinguino.
Do you have any expereience in writing code for this device?
Thanks to anyone who will kindly contribute to get the thing working!
cheers
Angelo
Reply
10-10-2014, 09:33 AM,
#2
RE: How to drive a ST7735 TFT display with MX220?
Salut Angelo,

what display are you using exactly (i.e. ITDB02-1.8SP TFT LCD from Itead)? There are displays using the ST7735, the ST7735S and the ST7735R. I am new to pinguino but quite experienced on TFT and Arduino. If you tell me how you wired the display and the model so I can check if I have it (or buy it), I am interested in supporting you. I have the PIC32MX250 board but this should work the same way as your MX220 board.

Ciao, Mathias
Reply
10-10-2014, 11:01 AM,
#3
RE: How to drive a ST7735 TFT display with MX220?
(10-10-2014, 09:33 AM)GastonLagaffe Wrote: Salut Angelo,

what display are you using exactly (i.e. ITDB02-1.8SP TFT LCD from Itead)? There are displays using the ST7735, the ST7735S and the ST7735R. I am new to pinguino but quite experienced on TFT and Arduino. If you tell me how you wired the display and the model so I can check if I have it (or buy it), I am interested in supporting you. I have the PIC32MX250 board but this should work the same way as your MX220 board.

Ciao, Mathias

Ciao Mathias, really thank you for your time!
My display does not have an indication of the model; it looks exactly like this: http://blog.simtronyx.de/wp-content/uplo...24x768.jpg

I have ported two libraries found on the internet: they compile, but I can' t get the output right (fuzzy pixels and incorrect displaying).
These libraries use a bit-bang version of SPI.

Attached are the two .pde files which compile for me... But the code is very raw.
thank you again, Salut!


Attached Files
.pde   TFT_tuttuno_OK.pde (Size: 41.8 KB / Downloads: 9)
.pde   TFT_v2_OK.pde (Size: 22.29 KB / Downloads: 5)
Reply
10-10-2014, 12:19 PM,
#4
RE: How to drive a ST7735 TFT display with MX220?
Salut Angelo,

I checked my fundus and found 3 1.8 TFT using ST7735R and ST7735. They are arduino modules and shields from sainmart, itead and elecfreaks, so they are 5/3.3 Volt tolerant. I have a PIC18F45k50 and a PIC32MX250 (from the shop) and use IDE 11.x. I will give it a try over the weekend.
I also have the Arduino Nano as in the symtronyx.de example so I can compare ...

Ciao, Mathias
Reply
10-10-2014, 12:33 PM,
#5
RE: How to drive a ST7735 TFT display with MX220?
(10-10-2014, 12:19 PM)GastonLagaffe Wrote: Salut Angelo,

I checked my fundus and found 3 1.8 TFT using ST7735R and ST7735. They are arduino modules and shields from sainmart, itead and elecfreaks, so they are 5/3.3 Volt tolerant. I have a PIC18F45k50 and a PIC32MX250 (from the shop) and use IDE 11.x. I will give it a try over the weekend.
I also have the Arduino Nano as in the symtronyx.de example so I can compare ...

Ciao, Mathias

I will experiment something too in this weekend.
I think the problem is in the bit bang SPI of my code...maybe it's better to use pinguino' s core SPI library.
Thank you so so much, have a good day
Angelo
Reply
12-10-2014, 07:57 PM,
#6
RE: How to drive a ST7735 TFT display with MX220?
(10-10-2014, 12:33 PM)prugno Wrote: Salut Angelo,

I tried the code but ran into some problems. First of all, it did not compile out of the box. I had to cleanup the code to have it pass the compiler but the display does not show signs of life.
I looked at the init screen routine which is commented out. I commented it in as I do not understand how the display should work without these commands. I then had a lok at the source you used (adafruit lib) and find it a bit hard to read. I therefore reverted back to the UTFT library I prefer to use with TFT displays on the arduino.
With this initialization sequence the display still shows no life.
I just need to check one thing on the basics: I wire the display directly to the PIC board:
pin 1 - RES
pin 2 - RS
pin 3 - CS
pin 4 - SCL
pin 5 - SDA
where pin x is the pin on the board labeled 0x
Do I need to apply and pull-up resistors?

Ciao, Mathias
Reply
12-10-2014, 08:22 PM,
#7
RE: How to drive a ST7735 TFT display with MX220?
(12-10-2014, 07:57 PM)GastonLagaffe Wrote:
(10-10-2014, 12:33 PM)prugno Wrote: Salut Angelo,

I tried the code but ran into some problems. First of all, it did not compile out of the box. I had to cleanup the code to have it pass the compiler but the display does not show signs of life.
I looked at the init screen routine which is commented out. I commented it in as I do not understand how the display should work without these commands. I then had a lok at the source you used (adafruit lib) and find it a bit hard to read. I therefore reverted back to the UTFT library I prefer to use with TFT displays on the arduino.
With this initialization sequence the display still shows no life.
I just need to check one thing on the basics: I wire the display directly to the PIC board:
pin 1 - RES
pin 2 - RS
pin 3 - CS
pin 4 - SCL
pin 5 - SDA
where pin x is the pin on the board labeled 0x
Do I need to apply and pull-up resistors?

Ciao, Mathias

Yes you may try the pull-ups... anyway for me this did not give any difference...
By the way, today I found the way to compile pinguino code with MPLAB. And it works! And it is C++. So I suppose that the normal TFT library will be very easy to port with MPLAB!
The only problem with this: I don't have a PicKit3 programmer, so I can' t upload my mplab-compiled hex file to Pinguino board... If you have a pic programmer, you may try also using MPLAB so that you can forget about the regular, C-only, buggy Pinguino IDE!

Attached is a hex file compiled with MPLAB IDE and ready to be flashed on Pinguino MX220 board.


Attached Files
.hex   PINGUINO_Template.X.production.hex (Size: 41.29 KB / Downloads: 0)
Reply
12-10-2014, 10:44 PM,
#8
RE: How to drive a ST7735 TFT display with MX220?
You can just use the command line if you don't like the IDE.

In any case if you get the ld file right you can use any compiler etc and still upload using the onboard loader.

A clone pickit3 is very cheap or you can program the MX220 using a cheap FT232RL board - incredibly cheap - but it's slow..

John
Reply
13-10-2014, 12:30 AM, (This post was last modified: 13-10-2014, 12:34 AM by prugno.)
#9
RE: How to drive a ST7735 TFT display with MX220?
(12-10-2014, 10:44 PM)pingotg Wrote: You can just use the command line if you don't like the IDE.

In any case if you get the ld file right you can use any compiler etc and still upload using the onboard loader.

A clone pickit3 is very cheap or you can program the MX220 using a cheap FT232RL board - incredibly cheap - but it's slow..

John

But using the command line will I be able to get C++? This is what I am caring about... And what tools do I need to do so on my osx 10.6?

What' s an ld file?

About the ft232 serial adapter, do you have any further explanation for me about this programming method?
with google I have only found poor described schematics (featuring just 3 resistors in the BOM, and tested only with PIC18); i am not sure they will work for PIC32, neither I am sure how to correctly address the Pinguino mx220' s ICSP signals (i mean translate the name of the ICSP pins).
I would love to hear something about this programming procedure; maybe a dedicated thread may be opened, once procedure is validated.

Thank you for your observations!
Angelo Mottolese
Reply
13-10-2014, 09:37 AM, (This post was last modified: 13-10-2014, 09:40 AM by pingotg.)
#10
RE: How to drive a ST7735 TFT display with MX220?
Use C++ if you like. I'd install gcc. Oh wait it is included with the IDE.

Look for files ending .ld
Read makefiles

So-called "2-wire" ICSP is easy for PIC32. See http://www.thebackshed.com/forum/forum_p...=6477&PN=1

(or Search the forum for FT232RL)

You don't need any resistors though it's faster with one.

May not be readily available for OSX, though, as it has very few users. Realistically if you choose to buy into OSX then that brings costs. Probably should buy a PICkit3 as just one of those costs.

Or buy a cheap PC (laptop/desktop/...), run Linux and you'll have more options.

John
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)