![]() |
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: 998 |
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 FotS |
||||
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 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |