Electronic – Comprehensive way to indicate error code using single LED

fpgaled

I am implementing Altera remote update mechanism, and it does not work, configuration falls back to the factory one.

I need to get the cause of it, and the only output I have is single LED.
Remote update state machine outputs 5 bits (page 35, 111 in the table).

My thoughts:

  • Blinking number of times binary represents is bad idea :), thus LED should somehow display bit states;
  • Circuit is having input clock, thus I can time the blinking for easy value readout;
  • Separating start, 1s, 0s and end: display "message" in loop, starting with 1 second long turn on (start), then one short blink for 0 or two short blinks for 1 within the second, then pause of a second, then display next bit, and at the end of 5-bit sequence the start goes again (1 second long turn on).

Is there any better way, or even standard and proven way in semaphore signalling, to achieve value readout effectively by the human?

P.S. I do not know which tags for my question are the right ones! Please edit if needed.

Best Answer

If all you really have is one LED, the best way of doing this (from an end-user perspective) will probably be to use a set of counted blinks.

Consider the following scheme, for example:

  • Break the 5-bit code into groups of 2, 2, and 1 bits. (3 bits would lead to a group of up to 8 flashes, which is too close to the limit of what a user can reliably count.)
  • Add 1 to the value of each group, resulting in numbers from 1-4, 1-4, and 1-2 in each respective group. (This is important -- having any of the groups display as zero will make the resulting sequence difficult or even impossible to read!)
  • Repeat the following sequence:
    1. Blink the LED on and off at 200 ms intervals to count off the first group.
    2. Wait for 500 ms -- just a little bit longer than it'd take to blink one more time, to make it clear that this is a gap.
    3. Blink at 200 ms intervals again for the second group.
    4. Wait for 500 ms again.
    5. Blink at 200 ms intervals again for the third group.
    6. Wait for 2000 ms before starting the loop again, to make a long, clear gap between each time the code appears.

Here's an example of what this would look like for 4/2/2 blinks (binary 11/01/1). Users should be able to describe this pretty reliably as "four flashes, then two flashes, then two more flashes".

enter image description here