You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added esp32 support for the 8-bit interface on the Adafruit TFT breakout board. Maybe someone will have some use of it? Anyway, thanks for your awesome products!
Hi Daan:
I notice that there was a delay of 10 uSec is built into the write routine in an ESP32. I wondered how long it would take to write all the bits from a custom list. The result was 2 uSec. So by reducing the delay slightly you should get the same performance. I tested it with this code.
int my_byte=0x55,bit_msk;
bit_msk=1; // bit zero
bool bit_val;
uint32_t start_time;
start_time=micros(); // Get the start time
for(i=0;i<8;i++){ // Eight bits
bit_val=(bool)my_byte&bit_msk; // Get the bit
digitalWrite(pin_lst[4],bit_val);
bit_msk<<=1; // Shift it
}
I also wrote code to change the pin direction and based on the same list.
Note that it does not need any special instructions and all you have to do is load the pin list. I am going to try and incorporate it into you code to see if I can get it to work. Regards
@DvDriel I noticed that as written, the code will result in an error: 'result' is used uninitialized in this function [-Werror=uninitialized]
I think that the first result |= might have to be changed to result = in the read8inline funcition?
#define read8inline(result) { \
RD_ACTIVE; \
DELAY7; \
result = ((GPIO.in & 0b00000000000000000000000000111100) >> 2); \ // <--------- Change this line from "|=" to "="
result |= ((GPIO.in & 0b00000000000001111000000000000000) >> 11); \
RD_IDLE; }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dear Adafruit,
I added esp32 support for the 8-bit interface on the Adafruit TFT breakout board. Maybe someone will have some use of it? Anyway, thanks for your awesome products!
Cheers,
Daan