Hi!
I'm doing some research on S/PDIF and I'm trying to use the mbed as a passthrough device between a Toslink (TORX) receiver and a transmitter (TOTX). Connecting the receiver to the transmitter directly works fine.
I believe my issue is with the I/O performance of the mbed, but I've read that it can go up to 24MHz and S/PDIF requires 6MHz from what I've read.
First I tried using DigitalOut/DigitalIn, but that was clearly just too slow, so I tried using FastOut, even optimizing it a bit extra, but that didn't work either.
My last test has been using the registers directly (p21 = input, p22 = output):
#include "mbed.h"
int main() {
LPC_GPIO2->FIODIR |= (1 << 4);
while (1) {
LPC_GPIO2->FIOPIN = (LPC_GPIO2->FIOPIN & 0xFFFFFFCF) | ((LPC_GPIO2->FIOPIN & (1 << 5)) >> 1);
}
}
It still doesn't work with S/PDIF, but at least the code works.
Unfortunately I don't have a scope, so I can't compare the output to the input, otherwise I could see if there was any noise in the output.
The passthrough is just a test, later on I want the mbed to encode/decode S/PDIF data.
So, does anyone know why the signal doesn't come out correctly? Wouldn't the code above be fast enough (>6MHz) to capture and output the signal properly?
Hi! I'm doing some research on S/PDIF and I'm trying to use the mbed as a passthrough device between a Toslink (TORX) receiver and a transmitter (TOTX). Connecting the receiver to the transmitter directly works fine. I believe my issue is with the I/O performance of the mbed, but I've read that it can go up to 24MHz and S/PDIF requires 6MHz from what I've read. First I tried using DigitalOut/DigitalIn, but that was clearly just too slow, so I tried using FastOut, even optimizing it a bit extra, but that didn't work either.
My last test has been using the registers directly (p21 = input, p22 = output):
It still doesn't work with S/PDIF, but at least the code works. Unfortunately I don't have a scope, so I can't compare the output to the input, otherwise I could see if there was any noise in the output.
The passthrough is just a test, later on I want the mbed to encode/decode S/PDIF data.
So, does anyone know why the signal doesn't come out correctly? Wouldn't the code above be fast enough (>6MHz) to capture and output the signal properly?