Not sure if this is so much a compiler issue, as the code compiles fine. But it seems that using GLCD libs breaks my code and stops it from working. Currently using 'GCB v0.98.06
Following the previous thread I posted on, I have 3 interrupts going on:
One that happens every time I get a zero cross signal, which comes from a bridge rectifier. For 60Hz, thats once every 8ms or so.
One that happens every time timer 1 over flows as I have a 32Khz crystal on board: This is for a 1 second time base.
One that happens when Timer 2 is matched with a value: This is what will turn on a TRIAC for a certain amount of time to control a heater. What Im going for is a PID controlled heater, and need zero crossing to determine when to turn the output on.
Currently the PIC runs at 8Mhz, but only because this might be the fastest I can go before I have to play around with the pre/post settings for timer2. So the code I have now works and I have confirmed that the PIC in circuit does communicate with a ST7735 GLCD. I found this out by stripping out all the code, and just checking to see if it talks with the GLCD and can display stuff. It can, so hardware and PCB are good.
The problem becomes when I insert a simple line into my main program (which you can see that I commented out) that says “Hello world”, the program stops working. Right now I have it sending data over the serial port so I can watch things happen and make sure the program runs. This stops when I make use of the GLCD.
My theory is that the interrupts happen when the PIC is sending data to the GLCD but I have no way to confirm this. I dont know if anyone would be able to test my code without having the board in front of them though.
So Im open to suggestions or work around's. Note: I dont really need the GLCD updating every second or as fast as the micro can go. Honestly, once per 10 seconds would be fine. It doesnt need to be fast.
Not sure if this is so much a compiler issue, as the code compiles fine. But it seems that using GLCD libs breaks my code and stops it from working. Currently using 'GCB v0.98.06
Following the previous thread I posted on, I have 3 interrupts going on:
One that happens every time I get a zero cross signal, which comes from a bridge rectifier. For 60Hz, thats once every 8ms or so.
One that happens every time timer 1 over flows as I have a 32Khz crystal on board: This is for a 1 second time base.
One that happens when Timer 2 is matched with a value: This is what will turn on a TRIAC for a certain amount of time to control a heater. What Im going for is a PID controlled heater, and need zero crossing to determine when to turn the output on.
Currently the PIC runs at 8Mhz, but only because this might be the fastest I can go before I have to play around with the pre/post settings for timer2. So the code I have now works and I have confirmed that the PIC in circuit does communicate with a ST7735 GLCD. I found this out by stripping out all the code, and just checking to see if it talks with the GLCD and can display stuff. It can, so hardware and PCB are good.
The problem becomes when I insert a simple line into my main program (which you can see that I commented out) that says “Hello world”, the program stops working. Right now I have it sending data over the serial port so I can watch things happen and make sure the program runs. This stops when I make use of the GLCD.
My theory is that the interrupts happen when the PIC is sending data to the GLCD but I have no way to confirm this. I dont know if anyone would be able to test my code without having the board in front of them though.
So Im open to suggestions or work around's. Note: I dont really need the GLCD updating every second or as fast as the micro can go. Honestly, once per 10 seconds would be fine. It doesnt need to be fast.
Just for completions sake, here is the code for the GLCD test. Micro is PIC18F26Q10
We need to get you on RC20. Semd me a PM please.
Anyone using the Q10 needs to on v0.98.07 as a minimum. Just spent all day on another Q10 issue.
So, no point using v0.98.06 with the Q10s.
Ahhh well thats good to know :). Gives me some hope! PM incoming
Where is the v0.98.07 ??
@JackJames
Still not ready for prime time. We need some time from Hugh to resolve a few major changes.
See https://sourceforge.net/p/gcbasic/discussion/579125/thread/8aafd62637/#9e23 and https://sourceforge.net/p/gcbasic/discussion/579125/thread/8aafd62637/#0cdb
@Anobium
Thanks
jackjames ... I love hate interrupts. Events in gcb is handy...just got to do timing.
When events work happy days, It should be a gcb feature,maybe