MagTag Busy Pin

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mlitke
 
Posts: 25
Joined: Tue Mar 06, 2012 2:43 am

MagTag Busy Pin

Post by mlitke »

I have been playing with a MagTag in Arduino. In the "Using the E-Ink Display" sub-section of the "Arduino Basics" section in the Adafruit MagTag Guide, here, it lists to set the EPD_BUSY pin to -1. Looking at the boards schematics, here, it appears that the busy pin is connected to IO5 on the ESP32-S2. So, my question is, why does the guide recommend setting the pin to -1, if there is an actual busy pin that could be used? It seems checking the busy pin would result in less waiting (versus delaying for a set amount of time), likely not by more than a few milliseconds, but when running on battery every bit helps. I plan to do some testing to see if I can shave a few milliseconds using the pin, but I have not had a chance to run those tests yet.

Based on the circuitpython code for the board here, it appears that code sets the busy pin to pin_GPIO5 on line 159.

Thanks!

User avatar
mlitke
 
Posts: 25
Joined: Tue Mar 06, 2012 2:43 am

Re: MagTag Busy Pin

Post by mlitke »

I had a chance to run a test with the busy pin set to 5. It actually takes considerably longer (over 3 seconds vs about 1.5 seconds). However, with the pin set to -1 (just doing a delay vs waiting for the pin to go high), if I go into deep sleep right after returning from displaying a new image, the display does not finish refreshing. When waiting on the busy pin, the display finishes refreshing. So, it would seem that if the micro controller has other things to do, setting the busy pin to -1 allows the call to update the image to return faster (and do other things) while the display finishes refreshing. And, you could check the busy pin before going into deep sleep to ensure the display update is done.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”