I need to set up an interrupt in my code so that no matter what it's doing it can immediately react to someone touching the screen. This screen has a tp-irq pin, so I think I can do that.
I also need an interrupt so that every time the seconds in my RTC module change, it will immediately update the screen.
Does anyone know how to do this? Or would I be better off polling for both of these things?
I have to attach the code in a zip file because it is too big to copy and paste.
@Paul_KD7HB
Before my finger has even left the screen I want it to have reacted. Basically as fast as a mega can do something (1/16000000 of a second is the fastest, maybe not that fast, but fast enough that I never have to touch it twice because it didn't respond)
@JohnRob
I've already read that, however I don't know how to make it work because the touch screen interrupt pin is on pin #44 of my mega. Also, I don't think I can use a pin to trigger the interrupt for the clock to update the screen.
@Paul_KD7HB
I'd be happy with 5 milliseconds. And yes, when I put a delay in the code the touch doesn't respond. I thought that was a timing issue? But the seconds need to change every time a second ticks by, so I guess 998 milliseconds for the clock would be fine.
@anon57585045
That's likely. But if I knew what I'd done wrong I'd fix it. There are 1257 lines of code to go through and check and edit and change every time something doesn't work right...
@alto777
This code is jamming on the tab "Home", line #34. It goes off into the weather tab and starts hanging and jamming and nothing changes when it's supposed to. So far all I've done is polling, however after trying to fix it for days it isn't working, and I don't understand how to get rid of the delay in the Zambretti code in the weather tab while also checking if six other things have changed or not.
Post a schematic as you have it wired including all ground and power connections. Also include the power supply(s). Also post links to technical information on all the hardware parts. It appears you are either supper programer to get that much code in less than I am assuming 7 days a week for 8 years. Studies have shown that the average programmer in a production environment puts out about 10 lines of code per day.
I wrote programs commercially for 30+ years and many times I had to toss the program and start over because I learned something new about the goal I was programming for and that required starting over with the new concept. Every new program is a new learning experience.
Those programmers are writing and fully debugging those ten lines of code. They also know how to write concise code. A new develepor writes more lines of code because he isn't as good.
So far this project has taken me a couple months to write the code for.
A bunch of nice but useless pictures the same as the frizzy picture. I asked for a schematic as you have it wired including all ground and power connections. Also include the power supply(s). Also post links to technical information on all the hardware parts. The link to the LCD is OK. To fix move wire 3 to, the yellow one from, the orange is, you get the idea!
@gilshultz
Ok. That's great. But I do not have a way to make a schematic. If you can donate some of the expensive software to create this schematic, I will be able to draw one. Otherwise, a wiring diagram will have to suffice. For most people, it isn't hard to see how a shield connects to a board - they line up and drop on. Also, I do not have datasheets for all of my modules, as most of the datasheets for them are written in chinese. If you can read chinese, you will have to find them yourself, as I can't read chinese.