Close

Postmortem

A project log for MicroPort

USB-CDC Serial port for PIC18F, in under 1KiB. Refactored down from a USB-DFU bootloader, hand written in assembler to be light and fast

jesseJesse 02/09/2017 at 22:580 Comments

I've been meaning to write an update here since the contest winners were announced.

Before I do, congratulations to the winners! Some truly great entries were submitted, and from my earlier peeks at what my competitors were working on, I have to say that I feel the winners are representative of the projects I thought were the most worthy of taking the prize.

In retrospect, I saw this challenge as an opportunity to take code I was already working with, and make something simplified with general utility for others. In this spirit, general utility does not imply a 1KB limit on the firmware size, and I'll be returning some of the functionality to the state it was in before trying to reduce the code to qualify for the challenge.

While there's still work to do in achieving general utility, these are the features that can be expected in these future releases:

  1. Baud rate support down to 78 baud
  2. Baud rate dividers which produce bitrates as close as possible to the requested baud rate
  3. Serial transmit that is non-blocking (one of the compromises to favor code size was to send bytes inside the USB transfer interrupt handler, and this byte transmission would block the handler until all bytes were sent)
  4. Parity support for transmit and receive
  5. Buffer overrun detection and reporting
  6. BREAK generation/detection and reporting

Admittedly, as this work does not have a hard deadline, it will be done in my leisure time where not spent on other projects. I encourage anyone interested in these features to post a comment as motivation, but bear in mind that this is a hobby project and I will not be able to commit to deadlines.

Thanks for reading!

Discussions