Usual apologies... I'm not an expert on electronics (just a software engineer).
I'm trying to read a TTL signal from an Axona Data Acquisition system, though I'm not sure that's important, using a Mega2560 board. I'm using the sample code to read an analog signal, which works when I connect the ground or power (reading 0 and 1023,
respectively). However, when I connect the TTL wire to the analog connection the values vary from 0 to 1023 in a sine wave-like pattern, which is independent of the actual TTL output from the Axona system.
Using a voltmeter to check the TTL output wire against the ground on the Axona system I can see 4.96V when the SignalOut() is set to on (and 0 when it's set to off). However, when using the voltmeter to check the TTL output wire against the ground on the Mega2560 the range is roughly -80mV to 60mV, which is probably completely understandable to all the electronic engineers here.
My goal is simply to be able to read a 0 or 1 based on the TTL signal. Is this possible? What am I missing?
Any help would be appreciated.
TonyC