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 : Strange behavior invoking command "edit"
Author | Message | ||||
sagt3k Guru Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hello everyone, I was testing "Micromite firmware V4.7B23" and I realized ... I think this anomaly. This is my example after reset: > Micromite MKII MMBasic Ver 4.7 Beta 23 Copyright 2011-2015 Geoff Graham > setpin 4,dout > pin(4)=0 > now digit "edit" command and after I enter in edit seems I lose the set of setting pin(4), I realized this why I was working with a relay. I think it's abnormal behavior. Why the assumption that I am working in real-time with some automated system and therefore has set a few of pins, I do not expect that after the "edit" this state of my editor reset pins... or no ?? I think it must be, or another setting to prompt to change the pins or the inside "run" command that has the instructions to change the setting of the pins. Thanks |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5905 |
When you "edit", your program stops running. All pins revert to inputs. If that causes problems, you might need to put pulldown resistors in your circuit. Jim VK7JH MMedit MMBasic Help |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
Yep, that is normal, as Jim says. I had that exact same problem in one thing I designed, where you would invoke the editor via a network module which was enabled by a MM pin - as soon as you called the editor, having established a network connection, the network promptly dropped off. (as the enable pin went to an input) I fixed that one with a latching relay Smoke makes things work. When the smoke gets out, it stops! |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
The editor needs all the memory it can get so it issues a general MMBasic reset which clears the RAM and resets the program state. This last part is where the state of the I/O pins is reset to non configured. This also happens when a program is run so I did not see it as an issue because the program would be run after an edit anyway. Geoff Geoff Graham - http://geoffg.net |
||||
sagt3k Guru Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi Geoff, Thanks for your reply Not knowing how this flow, I thought some abnormality. If defined so I'll set the logic of my hardware so that it can handle the most of the setting along the pins and the interface for my software. Thanks |
||||
Print this page |