Post Go back to editing

Connect Feather with Adafruit 2.4" TFT FeatherWing

Category: Hardware
Product Number: MAX78000

Hi All;

i have conected the max78000 father in adafruit 2.4 featherWing , im running the TFT_Demo without Sucess.

i have also change the board type in Makefile (BOARD ?= FTHR_RevA).

but screen is constant blank.

Have you any tutorial how put the feather board working on adafruit featherWing?? 

  • hi

    I also put some printf for code analisis, and no sucess

    find my code

    /***** Includes *****/

    #include <stdio.h>

    #include <stdint.h>

    #include <stdlib.h>

    #include <string.h>

    #include "board.h"

    #include "mxc.h"

    #include "icc.h"

    #include "mxc_device.h"

    #include "mxc_delay.h"

    #include "utils.h"

    #include "state.h"

    #include "keypad.h"

    #include "led.h"

    #include "pb.h"

    #include "tft_ili9341.h"

    #define TFT_BUFF_SIZE 32 // TFT buffer size

    void TFT_Print(char *str, int x, int y, int font)

    {

    printf("TFT Printing....\n");

    // fonts id

    text_t text;

    text.data = str;

    text.len = 20;

    MXC_TFT_PrintFont(x, y, font, &text, NULL);

    }

    void TFT_Feather_test(void)

    {

    area_t _area;

    area_t *area;

    char buff[TFT_BUFF_SIZE];

    printf("Init TFT Feather Teste....\n");

    MXC_TFT_SetRotation(ROTATE_90);

    MXC_TFT_ShowImage(0, 0, (int)&img_1_rgb565[0]);

    MXC_Delay(2000000);

    MXC_TFT_SetBackGroundColor(RED);

    area = &_area;

    area->x = 10;

    area->y = 10;

    area->w = 200;

    area->h = 100;

    MXC_TFT_FillRect(area, GREEN);

    MXC_Delay(2000000);

    MXC_TFT_ClearScreen();

    MXC_TFT_Line(10, 10, 200, 200, NAVY);

    MXC_Delay(1000000);

    MXC_TFT_Rectangle(10, 10, 200, 200, NAVY);

    MXC_Delay(1000000);

    MXC_TFT_Circle(100, 100, 50, PURPLE);

    MXC_Delay(1000000);

    MXC_TFT_FillCircle(100, 100, 50, PURPLE);

    MXC_Delay(1000000);

    MXC_TFT_SetBackGroundColor(BLACK);

    MXC_TFT_SetForeGroundColor(WHITE); // set chars to white

    MXC_TFT_ClearScreen();

    }

    int main(void)

    {

    // Wait for PMIC 1.8V to become available, about 180ms after power up.

    MXC_Delay(200000);

    printf("Hello Main....\n");

    /* Enable cache */

    MXC_ICC_Enable(MXC_ICC0);

    /* Set system clock to 100 MHz */

    MXC_SYS_Clock_Select(MXC_SYS_CLOCK_IPO);

    SystemCoreClockUpdate();

    /* Initialize TFT display */

    MXC_TFT_Init(MXC_SPI0, 1, NULL, NULL);

    MXC_TFT_SetRotation(ROTATE_90);

    while (1) {

    MXC_Delay(200000);

    printf("Hello While....\n");

    TFT_Feather_test();

    }

    }

    tnks in advance

  • Hi All;

    now its working;

    1 - File -> New -> Project ->C/C++ -> Analog Devices Microcontroler - > Next

    2-Choose Project Name ->next

    3- 

    in main i put this;

    #include <stdio.h>

    #include "mxc.h"

    #include "icc.h"

    #include "mxc_device.h"

    #include "mxc_delay.h"

    #include "utils.h"

    #include "state.h"

    #include "tft_ili9341.h"

    text_t text;

    //

    // Display various shapes and text

    //

    void DisplayTest(void)

    {

    area_t _area;

    area_t* area;

    MXC_TFT_SetRotation(ROTATE_90); // 90 Degrees rotation

    MXC_Delay(SEC(2));

    MXC_TFT_SetBackGroundColor(WHITE); // Background colour White

    MXC_Delay(SEC(2));

    MXC_TFT_ClearScreen(); // Clear screen

    MXC_Delay(SEC(1));

    MXC_TFT_Line(0, 0, 100, 100, RED); // Draw a line

    MXC_Delay(SEC(1));

    MXC_TFT_Rectangle(10, 120, 160, 220, BLUE); // Draw a rectangle

    MXC_Delay(SEC(1));

    MXC_TFT_Circle(270, 110, 30, BLACK); // Draw a circle

    MXC_Delay(SEC(1));

    MXC_TFT_FillCircle(270, 40, 30, GREEN); // Draw a filled circle

    MXC_Delay(SEC(1));

    area = &_area;

    area->x = 200; // X coordinate

    area->y = 150; // Y coordinate

    area->w = 100; // Width

    area->h = 50; // HEight

    MXC_TFT_FillRect(area, RED); // Draw a filled rectangle

    MXC_Delay(SEC(1));

    text.data = "MAX78000"; // Text to be displayed

    text.len = 8;

    MXC_TFT_PrintFont(60, 10, (int)&Liberation_Sans12x12[0], &text, NULL);

    MXC_Delay(SEC(1));

    MXC_TFT_PrintFont(60, 30, (int)&Liberation_Sans24x24[0], &text, NULL);

    printf("\n Display Test OK ...");

    }

    int main(void)

    {

    MXC_Delay(200000); // Wait for 1.8V to be available

    MXC_ICC_Enable(MXC_ICC0); // Enable instr cache

    MXC_SYS_Clock_Select(MXC_SYS_CLOCK_IPO); // Set clock to 100MHz

    SystemCoreClockUpdate();

    MXC_Delay(1); //without this the program not work

    MXC_TFT_Init(MXC_SPI0, 1, NULL, NULL); // Initialize TFT display

    DisplayTest(); // Call display

    while(1){

    DisplayTest(); // Call display

    };

    }

    in my case to solve the problem,  i just put before MXC_TFT_Init the MXC_DELAY(1) , and works fine.