Hi there,
I'm building a EPS32 Interface to communicate with an old Brother WL-20 Typewriter directly reading and writing the 17 Port of the Keyboard. Because it is working with 5V Logic I need converters. I'm able to read the scan and signal pins to read all kind of characters. The next step was to write characters to the machine. Therefore I use the following code part:
void writeSingle(int signalPin, int scanPin)
{
Serial.print("Writing ");
Serial.print(signalPin);
Serial.print(" - ");
Serial.println(scanPin);
// Set the signal pin to output and set it high
pinMode(signalPins[signalPin], OUTPUT);
digitalWrite(signalPins[signalPin], HIGH);
delay(10);
// Wait for a new scan cycle
while (digitalRead(scanPins[0]) != LOW)
{
}
// Wait for the scan pin to go low
while (digitalRead(scanPins[scanPin]) != LOW)
{
}
// Once the scan pin is low, set the signal pin to low
digitalWrite(signalPins[signalPin], LOW);
delay(24);
digitalWrite(signalPins[signalPin], HIGH);
delay(49);
// Change the signal pin back to input
pinMode(signalPins[signalPin], INPUT_PULLUP);
}
in principle the code is working. But every time the line
pinMode(signalPins[signalPin], OUTPUT);
is triggered there is a strange noise in the signal
- only example, sometimes ist look different and a lot wider.
the problem is, that this signal is recognized sometimes as character ...
Is it know, that the change of a pin from input to output is generating noise ?
Everything else is working perfectly.
Tanks for you replies.
A quick overview from the project