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 : Micromite Pin X is reserved on startup?
Author | Message | ||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5036 |
Hiya Building a controller based on a Micromite ver 5 and a 20x4 LCD. I've needed to use pretty much every pin on the Micromite. First thing I've done is tested the LCD, if I cant get that working on the pins I've put aside then its a day wasted. The manual says any I/O pin can be used. I'm using 22,21,16 and 15 for D4 to D7, 7 for RS and 23 for EN. When I go to initialise the LCD using LCD INIT 22,21,16,15,7,23 I got a "Pin 15 is reserved on startup". Thats the D7 line. I changed that to pin 5. Retested, I got a "Pin 7 is reserved on startup", the RS line. Kept trying, I also found pins 4, 3 and 2 are also reserved on startup? I gave up, either I'm missing something obvious or "Any I/O pin" is not entirely correct. Just adding, there is no code before this initialising line. Any suggestions? Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9081 |
I assume this is a 28-pin chip not the 64 or 100 pin SMD chips, yes? Smoke makes things work. When the smoke gets out, it stops! |
||||
GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
Have you tried doing an 'OPTION LIST' to see if the MM has been previously configured with anything? Cheers, GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9081 |
Looking at your configuration commands again - any I/O pin can be used, but you CANNOT use pins that have been assigned to other tasks. So in your case, you have assigned the 20x4 LCD to pins that you are then trying to assign to the SPI LCD, and that is why the MM chip is moaning - you have a conflict of interest there. IE, once you assign pins 22,21,16 and 15 for D4 to D7, 7 for RS and 23 for EN to the 20x4 LCD, you then CAN'T use those pins for anything else, as you have assigned them to the LCD. Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9081 |
Wait a minute - I think I am reading that wrong - sorry..... ...to be continued.... EDIT: Yes, I am reading that wrong, sorry. As posted above, type OPTION LIST and see what is currently in there as pre-saved configurations, then OPTION x DISABLE each one till they are ALL disabled, then any/all reserved pins should be released, and then you should be able to setup the LCD using the pins you specify - unless something else weird is going on. Smoke makes things work. When the smoke gets out, it stops! |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5036 |
Bingo, that was it. The chip had been configured for the LCD panel. Had to disable the LCDPANEL and TOUCH. Thanks for your help. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9081 |
Awesome. Sorry for almost putting you on the wrong track there. For some reason I thought you were trying to use both a 40x4 LCD and also an SPI LCD at the same time. WHY I thought that is anyone's guess!!! Smoke makes things work. When the smoke gets out, it stops! |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Hi Glenn, Have you seen this post? Would save you a few pins on the 28 pin chip. I got a few of the PCF8574 controllers @ a buck or so each. Get to reclaim 4 pins! Phil. |
||||
Print this page |