Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : DDS Signal Generator Code
Author | Message | ||||
SteveA Regular Member Joined: 10/03/2017 Location: United KingdomPosts: 48 |
I'm trying to get Geoff's code running on a SC Micromite+ LCD Backpack, but I've hit a problem. The following line of code crashes the program: SetPin Peek(byte Peek(word &H9D000090) + 23), INTL, MyInt With the message Error: Pin 3 is reserved at startup I know the pin numbers are different, so I'll need to make changes, but I don't understand what the above code fragment does. I can see it sets up an interrupt routine 'Myint' on a high to low pin change, but what do the two peeks and adding 23 do? They look a like pointers to me? |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 844 |
The Peek(byte Peek(word &H9D000090) + 23) is just a sneaky way of reading the interrupt pin assigned to the touch controller when its set up with OPTION TOUCH so it effectively doing SETPIN 3,INTL,MyInt This thread gives details of this PEEK and some others. Useful MMBasic Peeks Are you on and MM+ and not an MM ? This would explain the error message. If so you will need a GUI INTERRUPT command rather than the SETPIN used on the MM i.e. GUI INTERRUPT MyInt Regards Gerry Latest F4 Latest H7 |
||||
SteveA Regular Member Joined: 10/03/2017 Location: United KingdomPosts: 48 |
Ah, excellent. Thank you Gerry - bookmarked! Yes I'm using the Silicon Chip MM+ lcd packback which uses a MX470. Replacing the entire line with GUI INTERRUPT MyInt worked a treat. Regards Steve |
||||
Print this page |