Coding and decoding of information in a bidirectional neural interface