![]() |
Forum Index : Microcontroller and PC projects : LINE command when using STM32L4
Author | Message | ||||
sawasdee01 Newbie ![]() Joined: 23/12/2016 Location: United KingdomPosts: 33 |
I was wondering whether Peter or indeed anyone with a STM32L433 board with a TFT panel might have a few seconds to load up the mini program below using MMEdit. There appears to be a problem with the LINE command, in that it always looses the minus sign from the first argument, when the program is loaded using MMEdit. It is possible that I am using the wrong version of MMEdit for the STM32L4, but the issue is so consistent, that I think that the issue may be with LINE itself, or the way that LINE is parsed. I am using MMEdit version 4.7 and the STM32L4 firmware 5.0506 (according to PRINT MM.VER) Best wishes to all. Sawasdee. ' LINE Issue Demo Prog ' Running on STM32L433 using 5.0506 Armite (version by using PRINT MM.VER) Const PH0 = 5 'TFT Backlight Pin ' *************************** Main **************************** SetPin PH0,DOUT ' Configure Hardware IO Pin(PH0)=1 ' Turn on the backlight DO_GRFX() ' Draw cross-hair in middle of screen DO WHILE (INKEY$ = "") ' Bail out on keyboard activity loop END ' ************************* Subroutines **************************** SUB DO_GRFX() LOCAL x%,y% x%=120 y%=120 LINE x%–10,y%-10,x%+10,y%+10 LINE x%–10,y%+10,x%+10,y%-10 END SUB |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Your listing has a strange character as the first minus sign. If you look closely at your post you will see the first minus in both lines is longer than the later one in the lines. If you delete the first minus and replace it with a "proper" one it loads perfectly. Very bizarre ![]() |
||||
sawasdee01 Newbie ![]() Joined: 23/12/2016 Location: United KingdomPosts: 33 |
Hi Peter, I am so sorry to have bothered you with this and a huge 'thank you' for your help. I suspect that the problem is being caused by the fact that I am using a Thai/English keyboard, which allows dynamic switching between languages - ้กเเหอก้เ้ก - a bit like that. Anyhow, I fiddled around with re-typing, manually cutting and pasting minus signs, etc and it now works perfectly. Cheers Sawasdee |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
The culprit is the "EN Dash" that is mostly used to show ranges in numbers and dates. In MS Word: Ctrl + Minus Key (with Num Lock enabled) The sort of thing that gets into our code when copy and paste from Word documents and PDFs. Just like the 'smart quotes' etc. MMEdit has an option for replacing smart quotes and I will add the EN dash to the list of characters checked for. Jim VK7JH MMedit |
||||
sawasdee01 Newbie ![]() Joined: 23/12/2016 Location: United KingdomPosts: 33 |
Very welcome help that will stop people like me from doing daft things. Best wishes. Sawasdee |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |