Main Site Documentation

General Digital IO doesn't work as input



On the Rhino board, lets take IO62 for example, it has no secondary feature. Since it can be use as digital input or output according to the brochure, how come when I set it as digital input and complied it, the compilation threw an exception?

Any ideas?


P.S I know that for pins that are marked with a “*” can be used as interrupt so if set to digital input it compiled ok and can be use as a button with noise filter(glitch) or without with no problem at all.


The glitch filter uses interrupts to filter the glitch


Hi Gus,

Ah, that’s make sense now, so to make it clear, since the glitch filter uses interrupts to filter the noise, the regular pins such as IO62, IO34 etc… if use as digital input the glitch filter must be off, if not it will throw an exception.

I have included an image of the code and the exception for clarification. If that is the case I’ll put in the delay codes to filter out the noise or have a latch circuit at the input of all non-interrupt pins.

I am currently evaluating USBizi chip to produce a PLC prototype where real time is not critical for small to medium industrial machines here at our company, we do not have many electrical engineers/embedded programmer including myself, this chip will help many of our desktop programmers here to develop embedded codes quicker without the need to know the architectures of the chip such as 8051 and PIC variants where I used extensively here.



Yes, you need to disable glitch filter if you are using a pin that does not support interrupt feature. The glitch filter is on, that’s why it is throwing an exception.

USBizi can fit in the PLC market very well. Please don’t hesitate to ask us for help. You can email us or call us to discuss how USBizi might help you accomplish what you need.