V
V
Vi Vola2016-11-08 07:36:05
Iron
Vi Vola, 2016-11-08 07:36:05

FT800 graphics controller and STM32 microcontroller. Has anyone worked with such a combination of iron?

The essence of the question is to display the Cyrillic alphabet on the display using the FT800 graphics controller. The library I'm using does not have a built-in function to load fonts. An attempt at self-implementation by reverse-engineering the code on arduino was not successful. If someone was engaged in similar iron I ask to help with the decision of a question. Thank you in advance.
The source code of my implementation of loading fonts into the RAM of the graphics controller.

void cmd_inflateFont(const uint8_t* font, uint32_t ptr, int length) {	
  
  //uint16_t count;
  uint16_t sizetransfered;
  uint16_t getfreespace;
  uint32_t length_ =0;
  uint32_t i;
  uint32_t length_1 =0, SizeTransfered = 0;
  unsigned char cTempAddr[3];
  
  ft800memWrite32(RAM_CMD + cli, CMD_INFLATE);
  cli += 4;
  ft800memWrite32(RAM_CMD + cli, ptr);
  cli += 4;

  do {
  length_ = length;
  
  getfree(0);
  
  if (length_ > freespace){
    length_ = freespace;
  }

  do{
    getfree(0);
    getfreespace = freespace;
  }	while(getfreespace < length_);
  

  waitcmdfifo_empty();

  FT800_CS_OFF;	// Set chip select low

  SSP_SendData ((uint8_t)((RAM_CMD)>> 16) | MEM_WRITE);
  SSP_SendData ((uint8_t)((RAM_CMD) >> 8));
  SSP_SendData ((uint8_t)(RAM_CMD));
  cli++;
  LED4_SET;
  
  while (length_--) {
    
    SSP_SendData (ft_pgm_read_byte_near(font));						// Send data byte
    font++;
    cli++;
    sizetransfered++;
  }
  
  FT800_CS_ON;		// Set chip select high
  length_ = sizetransfered;
  updatecmdfifo(cli);
  waitcmdfifo_empty();
  
  length -= length_;
  
}	while(length > 0);
  
  updatecmdfifo(cli);
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Deryabkin, 2018-12-28
@Vadimatorikda

Pretty specific question. I think you should not be tied specifically to the STM32. You just need to generally make a request for a C / C ++ library untied from iron.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question