Pages

Monday, 25 August 2014

New TFTM1802 SPI Display Library, version Beta1 for CY8CKIT-049-42xx kit.
After an high workload on SPI (SCB mode) [v1.20] Component inside PSoC Creator, we have made a first version of our beta library for any cheap display compatible with standard S6D02A1 or ST7735.

There's lots version of this display, and lots of initializations that you can consider to work properly on these displays. So we refer, in this project, only to model TFTM1802; that you can handily purchase over ebay.

We don't guarantee that it can work with other models... at any rate right now...

The Component made available from Cypress Semiconductor it's a powerful component, but the power is nothing without control, so you have to know more in depth this component to work with it.

Our SPI configuration is for a 5 pins display, related to a port with MOSI - CLK - RS - CS - RST (BL a part); all of standard configurations need an additional pin (MISO) that we want to keep out from our setting.

For our purpose, the only configuration that allows to make a custom setting, it's the "Unconfigured SCB". This configuration needs to write in your code a structure to set every entries; we set this structure with all control datas into "ControlLCD.c" and with it you can dispose a 5 pins SPI bus on your board (CY8CKIT-049-42xx) simply with an #include "file" .

We set the oversampling value to 2 and the HFCLK=ClockSPI to 48Mhz with an accuracy of 2%, this means that we can transfert data with a bit-rate of:

Data rate = Fscbclk / Oversampling = 20 Mbps

Even the Fscbclk accuracy is important for correct data transfer operation of SPI and the actual Fscbclk it's the same one of HFCLK with a DivSCBCLK = 1 (be careful if you decide to change this value).

Another big hand it's given from the configuration of SPI Motorola Data Tranfer inside the Component and by interrupts related to the same component. With this powerful addons we can be sure of complete data tranfer and the next port available for following data/command.
Follows a series of graphical implementations to draw pixel, lines, circles, rectangles and much more.
We think we can improve this section in future release; with for example the printing of characters (much more useful).

A suggestion. Take a look to your USB cable if you don't want problems.

After all the time spent on this board, we have found that the printed USB plug, even if in serial communication, it can give you lots wrong uploads if the connection with PC USB port (or extension cable port) isn't perfect.

The method of programming used in this board, it doesn't allows you to make a verify of your uploaded code, this even for the lack of a JTAG programmer. I spent much more time than I thought for this stupid reason, that appears stupid only right now, but that has generated every kind possible problem.

We leave you to our demo video to evaluate code potentials, see you soon... at next release.