MynaBay / DCC_Decoder

An Arduino library for creating NMRA DCC decoding devices.
www.MynaBay.com/dcc_monitor
51 stars 22 forks source link

DCC decoder, reset pin as input #3

Open ttrenger opened 4 years ago

ttrenger commented 4 years ago

Hi, I have been looking into your nice work about DCC decoders to be able to digitalize an old Märklin M layout. I am looking into utilizing every single i/o pin of an Attiny85, including the reset pin. At this stage I don't want to change the fuse for reset pin, so my idea is to use this pin as input pin with signal levels between 2.6 volt and 5 volt, so the reset is not triggered. I have made a few attempts, but so far it seems that the input pulses is not read, or the interrupt is not being triggered by these levels. Is there a way to modify the sketch or libraries to acheive this?

MynaBay commented 4 years ago

I don't think this could be handled in software. Although I haven't tried something like it, I suspect the interrupt isn't triggering between 2.6 & 5v. Maybe you could free up other IO pins by using a shift register and leave reset and interrupt alone? https://www.sparkfun.com/products/10680