Breadboard implementation of spike encoder

Morse Spike Encoder

This project started as a way to explore purely temporal encoding schemes for spiking neural networks, using Morse code as a test case. I am an extra class amateur radio operator, call-sign KE7BKK, and have been fascinated by Morse code for years. It seemed like a natural fit to use it as a way to explore temporal encoding in SNNs, since Morse code is all about timing and patterns of short and long signals. Concurrently, I have been interested in exploring the capabilities of the RP2040 micro-controller, particularly the PIO state machines and multithreading capabilities. This project has been a fun way to combine those interests and see how well the RP2040 can handle real-time spike encoding tasks.

The Morse Spike Encoder allows the user to connect via a serial console, set a text message, and then either send it as a one-shot or loop it continuously. It utilizes a producer/consumer model where the producer thread (morse_encoder) handles the timing and generation of morse code elements (dot/dash). The Consumer threads (poisson_encoder,temporal_duration_encoder, and temporal_onset_encoder) wait for the symbol, encode it into an appropriate spike pattern, and the utilize PIO state machines to generate the actual spike train output. Protothreads are used for lightweight concurrency, allowing the producer and consumer threads to run independently while sharing data through a simple synchronization mechanism. The project demonstrates how temporal patterns can be effectively encoded into spike trains, and serves as a testbed for exploring different encoding strategies in spiking neural networks.

GitHub