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 : Corious behavior
Author | Message | ||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 831 |
Hi, found a very curious behavior with following code on my Duinomite MMBasic V4.4: SetPin 17, 8 'Digital Output fuer System Enable SysENABL = 17 'declare Pin for System Enable Pin(SysENABL) = 0 'System Enable deaktivieren Print"Press any key!" Do While Inkey$ = "" : Loop Pause 10000 Pin(SysENABL) = 1 'System on When I start the program and press any key over terminal it's all ok. After pressing the key the system waits for 10 seconds and than SysENABL gets high. But when I press any key on my PS2 Keyboard, SysENABL gets high at the moment when I pressed the key, no waiting any more! WHY??? My Duinomite is always connected with Monitor, Keyboard and Teraterm and this behaviour is reproduceable! Thanks for help! Frank |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Agghh!! It is a bug. Thanks Frank for discovering it. The symptom is that if I/O pin 17 is configured as an output or is used as RTS or DE for COM1 then it will be forced high whenever a key is pressed on the PS2 keyboard. This bug has been in MMBasic since ver 4.2 and affects all Maximite and Duinomite versions. I cannot think of any workaround except to not use pin 17 as an output. I am not sure if it is worth rushing out version 4.4A just to fix this. Comments? Geoff Geoff Graham - http://geoffg.net |
||||
Blackened Regular Member Joined: 11/08/2012 Location: AustraliaPosts: 66 |
My 2c. I'm using a DM and a DM mega. If the bug has been around since 4.2 but has only been picked up just now it seems to me that there's no hurry to rush out a fix. I was in the process of altering the use of my pins in my project and was planning on using pin 17, but I'm not about to run out of pins so I can just use a different one. |
||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 831 |
Hi Geoff, thanks a lot for your quick answer! I can live too with this bug and will switch to another pin. I think it is not worth to do a new version 4.4A just only to fix this problem... Frank |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
I have a probable bug in V4.4 mono. I haven't had time to verify it fully and can't now for several weeks as I am away from home without the MM. It goes like this: do . . . on x gosub label1,label2,label3 loop end label1: . . . return When the program returns from the Gosub it bombs with an error "Nothing to return to" or similar. Sorry if the message is not exact. I was going sort this out when I got home. I have a work around by inserting a line after the On command. Example: on x gosub label1,label2,label3 dummy: loop When people started reporting bugs I thought I should speak up to avoid drip feeding the reports. |
||||
Lorenzo Newbie Joined: 27/08/2013 Location: FrancePosts: 17 |
I confirm, I talking about the problem of pin D6 (17) in the end of my article of DUINOMITE MEGA and E-MEGA on my blog : my article Leaving my program, I took care to put all ports to 0 but port 17 returns 1 on any keyboard key pressed. I'm happy because I found this bug in August, and I wrote that it was probably a problem from the Basic ... And I was right... On DUINOMITE MEGA its a real problem because change for another pin is not possible if the others pin are in use... In my relay control programm, I use all pin for my 8 relay board, this is one of the reasons that precipitated the purchase of my MAXIMITE : More free I/O ports. Lorenzo |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
The I/O pin 17 bug needs to be fixed and no other bugs have surfaced so I have just put out V4.4A. This is the only change from V4.4. Bob, I was not able to reproduce the issue that you described. Do you have a better example? Geoff Geoff Graham - http://geoffg.net |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
Give me a day or so to check into it again and I'll get back. |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1101 |
Bob/Geoff, Re the ON x GOSUB issue, tested on a CGCMM1 running 4.4 with no problems. Regards, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
I just tested again and had the same result. I then did a text copy and paste on the PC and tried again and no failure. The original file may have a corruption. I'll have a look some time. Sorry Geoff, false alarm. |
||||
Print this page |