Please, where can I find the STMPE610 Library for my mikroPascal PRO Compiler (v6.2.0)?
Regards, Karl
STMPE610 Library
Re: STMPE610 Library
Hi,
Currently, porting of this library for dsPIC compiler is in our plans.
Regards,
Filip.
Currently, porting of this library for dsPIC compiler is in our plans.
Regards,
Filip.
Re: STMPE610 Library
Hi,
thank you for your answer. Could you please specify how long the porting will take? Or could you provide a preliminary version of the library? Currently I am working on a project with STMPE810 and it would be very helpful to for me to go on.
Regards,
Karl
thank you for your answer. Could you please specify how long the porting will take? Or could you provide a preliminary version of the library? Currently I am working on a project with STMPE810 and it would be very helpful to for me to go on.
Regards,
Karl
Re: STMPE610 Library
filip wrote:Hi,
Currently, porting of this library for dsPIC compiler is in our plans.
Regards,
Filip.
Can you share the stemp810 registers initialization values? I own the mx7mmb and can not get a steady touch reading.
Re: STMPE610 Library
Hi,
Are you interested in some specific registers ?
Many of them are used by the library, it will be difficult to list them here.
Regards,
Filip.
Are you interested in some specific registers ?
Many of them are used by the library, it will be difficult to list them here.
Regards,
Filip.
Re: STMPE610 Library
I am interested in the driving strength and timing registers. The touched point jumps quite a lot.
The other board I own, the green mx7mmb (with ADC touch) is very steady.
This is the actual code:
The other board I own, the green mx7mmb (with ADC touch) is very steady.
This is the actual code:
Code: Select all
if (STMPE610_get_version() == 0x811) { // chip ID
write(STMPE_SYS_CTRL2, 0x00); // turn on clocks!
write(STMPE_ADC_CTRL1, STMPE_ADC_CTRL1_12BIT | (0b110 << 5)); // 124 clocks per conversion
write(STMPE_ADC_CTRL2, STMPE_ADC_CTRL2_3_25MHZ);
write(STMPE_TSC_CFG, STMPE_TSC_CFG_4SAMPLE | STMPE_TSC_CFG_DELAY_500US | STMPE_TSC_CFG_SETTLE_500US);
write(STMPE_FIFO_TH, 1);
write(STMPE_FIFO_STA, STMPE_FIFO_STA_RESET);
write(STMPE_FIFO_STA, 0);
write(STMPE_TSC_I_DRIVE, STMPE_TSC_I_DRIVE_50MA);
write(STMPE_INT_CTRL, STMPE_INT_CTRL_POL_HIGH | STMPE_INT_CTRL_ENABLE);
write(STMPE_INT_EN, STMPE_INT_EN_TOUCHDET | STMPE_INT_EN_FIFOTH | STMPE_INT_EN_FIFOFULL);
write(STMPE_TSC_CTRL, STMPE_TSC_CTRL_XYZ | (1<<4) | STMPE_TSC_CTRL_EN);
write(STMPE_INT_STA, 0xFF); // reset all ints
return (1);
}
Code: Select all
TOUCH * STMPE610_read (TOUCH *touch) {
if ((read_byte(STMPE_TSC_CTRL) & STMPE_TSC_TOUCH_DET) == 0) {
touch->x = -1;
touch->y = -1;
}
else {
if (read_byte(STMPE_FIFO_SIZE) > 0) {
touch->x = ((COORD)read_word(STMPE_TSC_DATA_X) - 172) / 8;
touch->y = ((COORD)read_word(STMPE_TSC_DATA_Y) - 280) / 13;
} else {
return (0);
}
}
write(STMPE_FIFO_STA, STMPE_FIFO_STA_RESET);
write(STMPE_FIFO_STA, 0);
// printf("%d ; %d\n\r", touch->x, touch->y);
return (touch);
}