diff options
Diffstat (limited to '_log/e-reader.md')
| -rw-r--r-- | _log/e-reader.md | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/_log/e-reader.md b/_log/e-reader.md index 69b1e96..45363f7 100644 --- a/_log/e-reader.md +++ b/_log/e-reader.md @@ -1,12 +1,12 @@ --- -title: 512 KB e-reader +title: 512KB e-reader date: 2023-10-24 layout: post project: true thumbnail: thumb_sm.png --- -First project with e-paper displays and ESP32. +First project with e-paper. <video style="max-width:100%;" controls="" poster="poster.png"> <source src="ereader.mp4" type="video/mp4"> @@ -15,13 +15,13 @@ First project with e-paper displays and ESP32. ESP-WROOM-32, 7.5" Waveshare e-paper display, three-button interface (prev/next/sleep). -Memory: 512KB SRAM + 4MB flash. Internal 4 MB flash unsuitable for storing -books due to P/E cycle limits. HTTP Range requests for on-demand bitmap -streaming. Progress saved to RTC memory to survive deep sleep without flash -wear. +Memory: 512KB SRAM + 4MB flash. Internal flash unsuitable for storing books due +to P/E cycle limit. Used HTTP Range requests to stream them on-demand. +Progress saved to RTC memory to survive deep sleep without flash wear. -EBM format: Raw bitmap sequence. 1 byte = 8 pixels, 1 page = 48 KB (display -resolution), headerless. Optimized for HTTP Range requests: +PDFs are rasterized and stored as sequences of bitmaps on a server. 1 byte = 8 +pixels, 1 page = 48KB (display resolution), headerless. Optimized for Range +requests without server-side logic: ``` int r0 = ((page_n - 1) * PAGE_SIZE); @@ -35,8 +35,9 @@ esp_http_client_set_header(http_client, "Range", buf); esp_http_client_perform(http_client); ``` -Page buffer: Three pages (prev/current/next) in RAM—maximum possible. On -request: cycles buffer, updates screen, prefetches next page. +Three pages (prev/current/next) held in a buffer—maximum possible. Upon +request, embedded software cycles the buffer, updates the screen, prefetches +the next page. ``` c_page_num++; @@ -50,12 +51,14 @@ epd_draw_async(pages[c_page_num % PAGE_LEN], PAGE_SIZE); epd_draw_await(); ``` -Responsiveness: inadequate. Scheduling GPIO, SPI, and HTTP tasks on a single -thread causes input lag. Pinned GPIO/SPI tasks to one core and the HTTP task to -the other. +System isn't as responsive as I'd hoped. Scheduling GPIO, SPI, and HTTP tasks +on a single thread causes input lag. Pinned GPIO/SPI tasks to one core and the +HTTP task to the other. -Better, but screen updates block user input. Moved SPI buffers to DMA and made -transfers async. Few more cycles saved. +Better, but screen updates block user input. + +Moved the SPI buffers to DMA and made the transfers async. Few more cycles +saved. Can't think of anything else. |
