FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - scorpioprise

Pages: [1]
1
Discussion - Software / EVE down signal: sensing continuous
« on: March 19, 2019, 04:43:20 PM »
Hi there, have you any idea on how to detect that you have a long click on (for instance) a imagebutton ( and do something different in your code ) ?
It involves the down signal, ok, but how would you modify it?


2
Discussion - Software / I2C misunderstanding
« on: March 19, 2019, 03:51:46 PM »
Hi Everybody, I'm working on my custom board, so it's not a good starting point....
I have a 64K I2C serial eeprom. But I don't really understand what's wrong...

Of course, I tested the example on the demo board (MM900EV1A) and worked. (2K eeprom)

First problem, No read - no write.
The location address is 12bit long, so I got the source and altered, but no success.

Code: [Select]
int8_t i2cm_write_twoByte(const uint8_t addr, const uint16_t loc,
const uint8_t *data, uint16_t number_to_write) {
int8_t ret = 0;

if (isHighSpeed) {
/* In high speed mode, the following sequence has to be done before each data transfer
Write Master code 0x09 to I2CMSA and the HIGH SPEED command to I2CMCR */
I2CM->I2CM_SLV_ADDR = 0x09;
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_HS | I2C_FLAGS_RUN;

/* Wait until I2CM is no longer busy */
if (i2c_wait_for()) { /* An Error Occurred */
ret = -1;
}
}

if (ret == 0) {
/* Write slave address to SA */
I2CM->I2CM_SLV_ADDR = addr;
/* Write command byte address MSB to BUF */
I2CM->I2CM_DATA = (uint8_t) ((loc & 0xFF00) >> 8);

/* Check that the bus is not occupied by another master
(this step is not needed in single-master system or in high speed mode since
arbitration takes place during transmission of the master code) */
if (isHighSpeed == 0) {
while (I2CM->I2CM_CNTL_STATUS & MASK_I2CM_STATUS_BUS_BUSY) {
}
}

/* Write command to I2CMCR to send Start and command byte. */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_START | I2C_FLAGS_RUN;
if (i2c_wait_for()) { /* An Error Occurred */
ret = -1;
}
}
if (ret == 0) {
/* Write command byte address LSB to BUF */

I2CM->I2CM_DATA = (uint8_t) (loc & 0xFF);
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN;
if (i2c_wait_for()) { /* An Error Occurred */
ret = -1;
}
}

if (ret == 0) {
if (number_to_write) {
while (number_to_write-- && ret == 0) {
/* Write command to I2CMCR to send data byte. */
I2CM->I2CM_DATA = *data++;
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN;
if (i2c_wait_for()) { /* An Error Occurred */
ret = -1;
}
}
}
}

/* Write command to I2CMCR to send Stop. */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_STOP;
if (ret == 0) {
i2c_wait_for();
}

return ret;
}

Code: [Select]
int8_t i2cm_read_twoByte(const uint8_t addr, const uint16_t loc, uint8_t *data,
uint16_t number_to_read) {
int8_t ret = 0;

if (isHighSpeed) {
/* In high speed mode, the following sequence has to be done before each data transfer
Write Master code 0x09 to I2CMSA and the HIGH SPEED command to I2CMCR */
I2CM->I2CM_SLV_ADDR = 0x09;
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_HS | I2C_FLAGS_RUN;

/* Wait until I2CM is no longer busy */
if (i2c_wait_for()) {
ret = -1;
}
}

if (ret == 0) {
/* Write slave address to SA */
I2CM->I2CM_SLV_ADDR = addr;
/* Write command byte address to BUF */
I2CM->I2CM_DATA = (uint8_t) ((loc & 0x1f00) >> 8);

/* Check that the bus is not occupied by another master
(this step is not needed in single-master system or in high speed mode since
arbitration takes place during transmission of the master code) */
if (isHighSpeed == 0) {
while (I2CM->I2CM_CNTL_STATUS & MASK_I2CM_STATUS_BUS_BUSY) {
}
}

/* Write command to I2CMCR to send Start and command byte. */
I2CM->I2CM_CNTL_STATUS =
I2C_FLAGS_START | I2C_FLAGS_RUN | I2C_FLAGS_ACK;

if (i2c_wait_for()) {
ret = -1;
}
}
if (ret == 0) {
I2CM->I2CM_DATA = (uint8_t) (loc & 0x00ff);
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN | I2C_FLAGS_ACK;
if (i2c_wait_for()) {
ret = -1;
}
}
if (ret == 0) {
/* Write slave address to SA with R operation */
I2CM->I2CM_SLV_ADDR = addr | 0x01;

if (number_to_read <= 1)
/* Receive with a NACK */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_START | I2C_FLAGS_RUN;
else
/* Receive with an ACK */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_START | I2C_FLAGS_RUN
| I2C_FLAGS_ACK;

if (i2c_wait_for()) {
ret = -1;
}
}

if (ret == 0) {
while (number_to_read) {
*data++ = I2CM->I2CM_DATA;
number_to_read--;

if (number_to_read) {
if (number_to_read == 1)
/* Last one, Receive with a NACK */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN;
else
/* Receive with an ACK */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN | I2C_FLAGS_ACK;

/* Write command to I2CMCR to read data byte.
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_RUN; */
if (i2c_wait_for()) {
ret = -1;
break;
}
}
}
}

/* Write command to I2CMCR to send Stop. */
I2CM->I2CM_CNTL_STATUS = I2C_FLAGS_STOP;
if (ret == 0) {
i2c_wait_for();
}

return ret;
}

Memory is Microchip 24LC64, 5 pin SOT23 (no hardware address).

Any idea where to look for the problem?

3
New Member Introductions / Hello From Italy
« on: November 28, 2018, 10:24:31 AM »
Hi everybody!

I'm building my first display, and I'm juggling with ESD, Eclipse, a Ft901 demo board and a couple of Ft812 - Ft813 demo display boards.
So I'm tryng the community approach, and I hope I can bring back experience from the fields!

Filippo

4
Discussion - Software / From EVE Screen Designer to Eclipse... and back?
« on: November 27, 2018, 04:44:56 PM »
Hi, I'm new in using FTDI chips, but I'm building a custom display with FT901 and FT812/FT813.
As far as I've understood, once I export from ESD to Eclipse there is no way to get it back into ESD. Is that right?

The matter is that the GUI i'm working on will be very very complex, so I have to try and rebuild many times. And I have to add my layer of custom code in it.

Say it has a serial (UART0) interface working under the display interface, that can operate both indipendent speaking with the can-bus interface.
So both will call methods to write and read the can-bus.

First step is altering the code, ok, that's fine.
But if I have to add interface elements? How can I get it back into the ESD?

Otherwise I have to use the mighty power of git to catch the changed GUI things and keep the handcoded ones?

Hope you can help me understand.

Pages: [1]