Quad Rpi Interrupt Signal Generating, Routing, Evaluation Board
My learning experience of interrupt
tlfong01 wrote: ↑
Sat Sep 15, 2018 5:23 am
DHT22 directly interrupting Rpi, bypassing stupid and slow MCP23017
Now I am thinking of overcoming the slow and stupid MCP23017 interrupt thing by forgetting it altogether. Instead of using MCP23017 INTA, INTB, I will let DHT22 open drain output (already at the same time, connected to MCPO23017 GPIO pin) to itself directly interrupting RPi.
I learnt about the idea of interrupt ages ago, when I read the Operating Systems text book by Deitel. But I did not have any practical experience in studying or troubleshooting any realtime systems involved with interrupts. I only read that real time operating systems are very complicated.
Only some 10 years ago (actually, exactly 10 years ago today, 2008 Sep 15, a day to remember for Lehman Brothers and their fans), I suddenly realized that making money is really a very bad hobby.
I decided to quit making money (and losing money) and looked for a new, mentally and physically healthy hobby.
I still remember vividly that I visited the local toy street and did window shopping, and got interested in DIY things such as servos etc. I have never played servos before and found them interesting. I thought perhaps I could make electronics and making robots my new hobby.
I started reading local electronics magazines and was very surprised that, because I have not touched electronics for many years, I did not know what was going on. I never heard of SMD, and PCB tools such as Eagle etc. Everything seemed new to me.
Then I heard about Arduino. I could not find Arduino in local shops, and needed to buy from the shops in the States, NK Electronics and SparkFun.
I was getting serious and actually bought a new edition of Deitel's Operating System book to update my computer knowledge. I read again the ideas of distributed systems, concurrent programming, and interrupts
. I was planning to use the Arduino to practise these things.
It was also the first time I heard about SPI and I2C, though I knew UART/RS232 very well. I found I2C a bit scary, because I never knew that a pin can at the same time be input and output. I read the manufacturers' demo code but could not understand it. So I only played with SPI which I thought was not so weird, because there is one line for input, one line for output, not messing up input and output signals in one single line.
It was about 5 years after playing with Arduino that I decided to do the more difficult thing called interrupt. I tried the basic call back thing and found OK. But when I tried more advanced things then I found both Arduino software, hardware, and also documentation were poor. I got stuck often and finally gave up.
Then I heard about something called crowded projects, and the Raspberry Pi. It was almost two years after hearing Rpi that I actually bought one, again from the States, because local shops RS and Farnell were not selling them.
So I started playing with Rpi Linux, found it text terminal commands very unfriendly and actually gave up and switched to Windows CE, Visual Studio C++, C# etc.
It was only when Rpi 3 came along and I found Rpi GUI and Rpi IDLE python fast and friendly, then I started more seriously playing with SPI, and later I2C things.
And that is the end of looking back my Arduino and Raspberry Pi playing history, before I moved on really playing with interrupts.
The Rpi interrupt signal routing and evaluation board
I just finished assembling a quad interrupt signal routing board and will test it tomorrow.
The spec is summarized below.
1. Four cheap, bouncy push buttons with 10K pull up to 5V.
2. Push button outputs are connected to 4 input/output pins at the top edge connector of the board.
3. Input can either from push button, or from another source, such as MCP23017 GPIO pins, DH3231 RTC (32kHz, 8/4/1kHz square wave, real time interupts), DHT22 humidity and temperature measurements, etc.
5. The four 5V interrupt output signals go to the input of CD4050 (or LVC245) which level shifts signal down to 3V3 for four Rpi GPIO pins assigned as interrupt pins.
/ to continue, ...